Make WordPress Core


Ignore:
Timestamp:
06/23/2015 06:19:43 PM (11 years ago)
Author:
wonderboymusic
Message:

The query-attachments AJAX action immediately errors out if the user doesn't have the upload_files cap. As such, the Customizer shouldn't show buttons that launch the media modal when the user doesn't have the proper permissions to query attachments.

See #32654.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-header.php

    r32735 r32913  
    510510<?php endif; ?>
    511511
    512 <?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
     512<?php if ( current_user_can( 'upload_files' ) && current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
    513513<tr>
    514514<th scope="row"><?php _e( 'Select Image' ); ?></th>
Note: See TracChangeset for help on using the changeset viewer.