Customize: Fix site icon preview in RTL.

* Set the direction of previews to LTR.
* Remove the ID attribute from the favicon preview in the customizer panel. The preview in the media modal uses the same ID which prevented updating the correct favicon preview.

Fixes #37286.

git-svn-id: https://develop.svn.wordpress.org/trunk@37964 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling 2016-07-05 12:41:38 +00:00
parent 9c4f1a3431
commit 59b0096dfe
2 changed files with 7 additions and 1 deletions

View File

@ -38,6 +38,12 @@
margin-top: 5px;
}
/* rtl:ignore */
.site-icon-preview .favicon,
.site-icon-preview .app-icon-preview {
direction: ltr;
}
.customize-control-site_icon .favicon-preview {
float: left;
margin-right: 12px;

View File

@ -67,7 +67,7 @@ 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="" />
<div class="favicon">
<img id="preview-favicon" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
<img 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>