mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +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:
@@ -259,6 +259,7 @@ class Custom_Background {
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( current_user_can( 'upload_files' ) ): ?>
|
||||
<tr>
|
||||
<th scope="row"><?php _e('Select Image'); ?></th>
|
||||
<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post">
|
||||
@@ -278,6 +279,7 @@ class Custom_Background {
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user