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:
Scott Taylor
2015-06-23 18:19:43 +00:00
parent 2399de6870
commit 5beca90d40
3 changed files with 10 additions and 3 deletions

View File

@@ -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>