Ticket #32654: 32654.diff
File 32654.diff, 3.4 KB (added by , 10 years ago) |
---|
-
src/wp-admin/custom-background.php
259 259 </tr> 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> 264 265 <td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post"> … … 278 279 </form> 279 280 </td> 280 281 </tr> 282 <?php endif; ?> 281 283 </tbody> 282 284 </table> 283 285 -
src/wp-admin/custom-header.php
509 509 </tr> 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> 515 515 <td> -
src/wp-includes/class-wp-customize-control.php
721 721 $this->json['label'] = html_entity_decode( $this->label, ENT_QUOTES, get_bloginfo( 'charset' ) ); 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(); 726 727 … … 823 824 </div> 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 { #> 831 834 <div class="current"> … … 843 846 <# if ( data.defaultAttachment ) { #> 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> 849 854 <# } #> … … 1158 1163 $width = absint( get_theme_support( 'custom-header', 'width' ) ); 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"> 1165 1168 <?php … … 1180 1183 </div> 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> 1185 1189 <?php /* translators: New as in add new header image via the Customizer */ ?> 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"> 1190 1195 <span class="customize-control-title header-previously-uploaded">