Customize: Separate preview and actions in the site icon control.
Reverts [37456] to allow users to remove/change a site icon even if the attachment has corrupt/missing data about sizes. Fixes #36749. Built from https://develop.svn.wordpress.org/trunk@37724 git-svn-id: http://core.svn.wordpress.org/trunk@37690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8c8b3ba5ff
commit
2a76ccac4e
|
@ -59,19 +59,21 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
|
|||
<# } #>
|
||||
</label>
|
||||
|
||||
<# if ( data.attachment && data.attachment.id && data.attachment.sizes ) { #>
|
||||
<# if ( data.attachment && data.attachment.id ) { #>
|
||||
<div class="attachment-media-view">
|
||||
<div class="site-icon-preview">
|
||||
<div class="favicon-preview">
|
||||
<img src="<?php echo esc_url( admin_url( 'images/browser.png' ) ); ?>" class="browser-preview" width="182" alt="" />
|
||||
<# if ( data.attachment.sizes ) { #>
|
||||
<div class="site-icon-preview">
|
||||
<div class="favicon-preview">
|
||||
<img src="<?php echo esc_url( admin_url( 'images/browser.png' ) ); ?>" class="browser-preview" width="182" alt="" />
|
||||
|
||||
<div class="favicon">
|
||||
<img id="preview-favicon" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
|
||||
<div class="favicon">
|
||||
<img id="preview-favicon" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
|
||||
</div>
|
||||
<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
|
||||
</div>
|
||||
<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
|
||||
<img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
|
||||
</div>
|
||||
<img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
|
||||
</div>
|
||||
<# } #>
|
||||
<div class="actions">
|
||||
<# if ( data.canUpload ) { #>
|
||||
<button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37723';
|
||||
$wp_version = '4.6-alpha-37724';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue