mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-02 17:40:01 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@32913 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -509,7 +509,7 @@ class Custom_Image_Header {
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
|
||||
<?php if ( current_user_can( 'upload_files' ) && current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Select Image' ); ?></th>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user