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. git-svn-id: https://develop.svn.wordpress.org/trunk@37724 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
62bd8ecdd7
commit
f50f50cd0b
@ -59,8 +59,9 @@ 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">
|
||||
<# 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="" />
|
||||
@ -72,6 +73,7 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
|
||||
</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>
|
||||
|
Loading…
Reference in New Issue
Block a user