Make WordPress Core


Ignore:
Timestamp:
02/10/2015 01:40:13 AM (12 years ago)
Author:
dd32
Message:

Customizer: Improve IE 8 compatibility.

  • Use square bracket notation for default keywords.
  • Use Underscores indexOf for arrays.

Props westonruter, ocean90.
Merges [30991] to the 4.1 branch.
Fixes #30781.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-includes/class-wp-customize-control.php

    r30931 r31397  
    739739        public function content_template() {
    740740                ?>
    741                 <label for="{{ data.settings.default }}-button">
     741                <label for="{{ data.settings['default'] }}-button">
    742742                        <# if ( data.label ) { #>
    743743                                <span class="customize-control-title">{{ data.label }}</span>
    … …  
    776776                        <div class="actions">
    777777                                <button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
    778                                 <button type="button" class="button upload-button" id="{{ data.settings.default }}-button"><?php echo $this->button_labels['change']; ?></button>
     778                                <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>
    779779                                <div style="clear:both"></div>
    780780                        </div>
    … …  
    795795                                        <button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button>
    796796                                <# } #>
    797                                 <button type="button" class="button upload-button" id="{{ data.settings.default }}-button"><?php echo $this->button_labels['select']; ?></button>
     797                                <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>
    798798                                <div style="clear:both"></div>
    799799                        </div>
Note: See TracChangeset for help on using the changeset viewer.