diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index d2d013d88a..273fe09f7a 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -481,7 +481,7 @@ class WP_Media_List_Table extends WP_List_Table { ?> post_parent ) ) { + } elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) { ?> post_type ); + if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $attachment->post_parent ) ) { $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' ); } - if ( current_user_can( 'read_post', $attachment->post_parent ) ) { + if ( $parent_type && current_user_can( 'read_post', $attachment->post_parent ) ) { $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 832e86482a..7cdee33b69 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-beta1-37951'; +$wp_version = '4.6-beta1-37952'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.