Customize: Harden site_icon control template to account for when full image size is missing.

Props aussieguy123, westonruter.
See #36749.
Fixes #40010.

Built from https://develop.svn.wordpress.org/trunk@40314


git-svn-id: http://core.svn.wordpress.org/trunk@40221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-03-23 06:13:44 +00:00
parent 84ed6f665f
commit 80bb51634a
2 changed files with 3 additions and 3 deletions

View File

@ -67,11 +67,11 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" /> <img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" />
<div class="favicon"> <div class="favicon">
<img src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/> <img src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
</div> </div>
<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span> <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
</div> </div>
<img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/> <img class="app-icon-preview" src="{{ data.attachment.sizes.full ? data.attachment.sizes.full.url : data.attachment.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
</div> </div>
<# } #> <# } #>
<div class="actions"> <div class="actions">

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.8-alpha-40313'; $wp_version = '4.8-alpha-40314';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.