Embeds: Provide a site icon via srcset for HiDPI screens.

Fixes #34433.

git-svn-id: https://develop.svn.wordpress.org/trunk@35409 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-10-27 20:59:37 +00:00
parent 88cdbb6a49
commit 60f6db0c06

View File

@ -124,10 +124,11 @@ if ( have_posts() ) :
<div class="wp-embed-site-title"> <div class="wp-embed-site-title">
<?php <?php
printf( printf(
'<a href="%s" target="_top"><img src="%s" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>', '<a href="%s" target="_top"><img src="%s" srcset="%s 2x" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>',
esc_url( home_url() ), esc_url( home_url() ),
esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ), esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_attr( get_bloginfo( 'name' ) ) esc_url( get_site_icon_url( 64, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_html( get_bloginfo( 'name' ) )
); );
?> ?>
</div> </div>
@ -214,9 +215,10 @@ else :
<div class="wp-embed-site-title"> <div class="wp-embed-site-title">
<?php <?php
printf( printf(
'<a href="%s" target="_top"><img src="%s" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>', '<a href="%s" target="_top"><img src="%s" srcset="%s 2x" width="32" height="32" alt="" class="wp-embed-site-icon"/><span>%s</span></a>',
esc_url( home_url() ), esc_url( home_url() ),
esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ), esc_url( get_site_icon_url( 32, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_url( get_site_icon_url( 64, admin_url( 'images/w-logo-blue.png' ) ) ),
esc_html( get_bloginfo( 'name' ) ) esc_html( get_bloginfo( 'name' ) )
); );
?> ?>