From 7d43d71800a8db58d1b3426be659c4c76d221def Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Fri, 19 May 2017 18:29:42 +0000 Subject: [PATCH] Media: Ensure WP_Screen sets post type on wp-admin/upload.php. The post type property is set to 'attachment' when on the upload screen. Props postpostmodern. Fixes #39509. Built from https://develop.svn.wordpress.org/trunk@40800 git-svn-id: http://core.svn.wordpress.org/trunk@40658 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-screen.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php index de65c86a2f..b92ad5c7be 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/wp-admin/includes/class-wp-screen.php @@ -308,6 +308,9 @@ final class WP_Screen { if ( null === $post_type && is_object_in_taxonomy( 'post', $taxonomy ? $taxonomy : 'post_tag' ) ) $post_type = 'post'; break; + case 'upload': + $post_type = 'attachment'; + break; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 61e378f65a..ab95ede03d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-beta1-40799'; +$wp_version = '4.8-beta1-40800'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.