diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
index c5718ae..28a7838 100644
|
|
function wp_ajax_upload_attachment() { |
1855 | 1855 | |
1856 | 1856 | if ( isset( $_REQUEST['post_id'] ) ) { |
1857 | 1857 | $post_id = $_REQUEST['post_id']; |
1858 | | if ( ! current_user_can( 'edit_post', $post_id ) ) { |
| 1858 | if ( ! current_user_can( 'edit_posts', $post_id ) ) { |
1859 | 1859 | wp_send_json_error( array( |
1860 | 1860 | 'message' => __( "You don't have permission to attach files to this post." ), |
1861 | 1861 | 'filename' => $_FILES['async-upload']['name'], |