diff --git a/wp-includes/media.php b/wp-includes/media.php index bfd2e58487..3464fbf632 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -4568,7 +4568,7 @@ function wp_prepare_attachment_for_js( $attachment ) { if ( $attachment->post_parent ) { $post_parent = get_post( $attachment->post_parent ); - if ( $post_parent ) { + if ( $post_parent && current_user_can( 'read_post', $attachment->post_parent ) ) { $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index bf0d22f0f2..e1af8259c0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '7.0-beta3-61883'; +$wp_version = '7.0-beta3-61884'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.