Changeset 32913
- Timestamp:
- 06/23/2015 06:19:43 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/custom-background.php
r32734 r32913 260 260 <?php endif; ?> 261 261 262 <?php if ( current_user_can( 'upload_files' ) ): ?> 262 263 <tr> 263 264 <th scope="row"><?php _e('Select Image'); ?></th> … … 279 280 </td> 280 281 </tr> 282 <?php endif; ?> 281 283 </tbody> 282 284 </table> -
trunk/src/wp-admin/custom-header.php
r32735 r32913 510 510 <?php endif; ?> 511 511 512 <?php if ( current_ theme_supports( 'custom-header', 'uploads' ) ) : ?>512 <?php if ( current_user_can( 'upload_files' ) && current_theme_supports( 'custom-header', 'uploads' ) ) : ?> 513 513 <tr> 514 514 <th scope="row"><?php _e( 'Select Image' ); ?></th> -
trunk/src/wp-includes/class-wp-customize-control.php
r32895 r32913 722 722 $this->json['mime_type'] = $this->mime_type; 723 723 $this->json['button_labels'] = $this->button_labels; 724 $this->json['canUpload'] = current_user_can( 'upload_files' ); 724 725 725 726 $value = $this->value(); … … 824 825 </div> 825 826 <div class="actions"> 827 <# if ( data.canUpload ) { #> 826 828 <button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button> 827 829 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button> 828 830 <div style="clear:both"></div> 831 <# } #> 829 832 </div> 830 833 <# } else { #> … … 844 847 <button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button> 845 848 <# } #> 849 <# if ( data.canUpload ) { #> 846 850 <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button> 851 <# } #> 847 852 <div style="clear:both"></div> 848 853 </div> … … 1159 1164 $height = absint( get_theme_support( 'custom-header', 'height' ) ); 1160 1165 ?> 1161 1162 1163 1166 <div class="customize-control-content"> 1164 1167 <p class="customizer-section-intro"> … … 1181 1184 </div> 1182 1185 <div class="actions"> 1186 <?php if ( current_user_can( 'upload_files' ) ): ?> 1183 1187 <?php /* translators: Hide as in hide header image via the Customizer */ ?> 1184 1188 <button type="button"<?php echo $visibility ?> class="button remove"><?php _ex( 'Hide image', 'custom header' ); ?></button> … … 1186 1190 <button type="button" class="button new"><?php _ex( 'Add new image', 'header image' ); ?></button> 1187 1191 <div style="clear:both"></div> 1192 <?php endif; ?> 1188 1193 </div> 1189 1194 <div class="choices">
Note: See TracChangeset
for help on using the changeset viewer.