Changeset 36769
- Timestamp:
- 02/29/2016 12:39:33 AM (9 years ago)
- Location:
- trunk/src/wp-includes/customize
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-image-control.php
r35389 r36769 32 32 parent::__construct( $manager, $id, $args ); 33 33 34 $this->button_labels = array(34 $this->button_labels = wp_parse_args( $this->button_labels, array( 35 35 'select' => __( 'Select Image' ), 36 36 'change' => __( 'Change Image' ), … … 40 40 'frame_title' => __( 'Select Image' ), 41 41 'frame_button' => __( 'Choose Image' ), 42 ) ;42 ) ); 43 43 } 44 44 -
trunk/src/wp-includes/customize/class-wp-customize-media-control.php
r35567 r36769 56 56 parent::__construct( $manager, $id, $args ); 57 57 58 $this->button_labels = array( 59 'select' => __( 'Select File' ), 60 'change' => __( 'Change File' ), 61 'default' => __( 'Default' ), 62 'remove' => __( 'Remove' ), 63 'placeholder' => __( 'No file selected' ), 64 'frame_title' => __( 'Select File' ), 65 'frame_button' => __( 'Choose File' ), 66 ); 58 if ( ! ( $this instanceof WP_Customize_Image_Control ) ) { 59 $this->button_labels = wp_parse_args( $this->button_labels, array( 60 'select' => __( 'Select File' ), 61 'change' => __( 'Change File' ), 62 'default' => __( 'Default' ), 63 'remove' => __( 'Remove' ), 64 'placeholder' => __( 'No file selected' ), 65 'frame_title' => __( 'Select File' ), 66 'frame_button' => __( 'Choose File' ), 67 ) ); 68 } 67 69 } 68 70 … … 194 196 <div class="actions"> 195 197 <# if ( data.canUpload ) { #> 196 <button type="button" class="button remove-button"> <?php echo $this->button_labels['remove']; ?></button>197 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"> <?php echo $this->button_labels['change']; ?></button>198 <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button> 199 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button> 198 200 <div style="clear:both"></div> 199 201 <# } #> … … 205 207 <div class="inner"> 206 208 <span> 207 <?php echo $this->button_labels['placeholder']; ?>209 {{ data.button_labels.placeholder }} 208 210 </span> 209 211 </div> … … 213 215 <div class="actions"> 214 216 <# if ( data.defaultAttachment ) { #> 215 <button type="button" class="button default-button"> <?php echo $this->button_labels['default']; ?></button>217 <button type="button" class="button default-button">{{ data.button_labels.default }}</button> 216 218 <# } #> 217 219 <# if ( data.canUpload ) { #> 218 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"> <?php echo $this->button_labels['select']; ?></button>220 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.select }}</button> 219 221 <# } #> 220 222 <div style="clear:both"></div>
Note: See TracChangeset
for help on using the changeset viewer.