Customizer: Improve IE 8 compatibility.

* Use square bracket notation for `default` keywords.
* Use Underscores `indexOf` for arrays.

props westonruter, ocean90.
fixes #30781 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@30991 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-12-23 17:04:47 +00:00
parent 8dbce12a61
commit c05e46e4d1
2 changed files with 5 additions and 5 deletions

View File

@@ -738,7 +738,7 @@ class WP_Customize_Upload_Control extends WP_Customize_Control {
*/
public function content_template() {
?>
<label for="{{ data.settings.default }}-button">
<label for="{{ data.settings['default'] }}-button">
<# if ( data.label ) { #>
<span class="customize-control-title">{{ data.label }}</span>
<# } #>
@@ -775,7 +775,7 @@ class WP_Customize_Upload_Control extends WP_Customize_Control {
</div>
<div class="actions">
<button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
<button type="button" class="button upload-button" id="{{ data.settings.default }}-button"><?php echo $this->button_labels['change']; ?></button>
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>
<div style="clear:both"></div>
</div>
<# } else { #>
@@ -794,7 +794,7 @@ class WP_Customize_Upload_Control extends WP_Customize_Control {
<# if ( data.defaultAttachment ) { #>
<button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button>
<# } #>
<button type="button" class="button upload-button" id="{{ data.settings.default }}-button"><?php echo $this->button_labels['select']; ?></button>
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>
<div style="clear:both"></div>
</div>
<# } #>