Consistently set taxnow/typenow and the current screen's post_type/taxnomy, whenever it can be detected. Allow WP_Screen::get() to accept a post type as a hook_name. Fixes issues with the meta box $page/$screen argument. fixes #19080. see #18785.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -88,13 +88,13 @@ if ( isset($_GET['page']) ) {
|
||||
$plugin_page = plugin_basename($plugin_page);
|
||||
}
|
||||
|
||||
if ( isset($_GET['post_type']) )
|
||||
$typenow = sanitize_key($_GET['post_type']);
|
||||
if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
|
||||
$typenow = $_REQUEST['post_type'];
|
||||
else
|
||||
$typenow = '';
|
||||
|
||||
if ( isset($_GET['taxonomy']) )
|
||||
$taxnow = sanitize_key($_GET['taxonomy']);
|
||||
if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) )
|
||||
$taxnow = $_REQUEST['taxonomy'];
|
||||
else
|
||||
$taxnow = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user