The edit-tags screen ID does not contain the post_type. Fallback to post_type in the REQUEST. Fixes AJAX term addtions from edit-tags.php. fixes #21871

git-svn-id: http://core.svn.wordpress.org/trunk@21982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-09-24 20:39:53 +00:00
parent 70edf4111b
commit 25ed7f52c3

View File

@ -496,6 +496,13 @@ final class WP_Screen {
case 'edit-tags' :
if ( null === $taxonomy )
$taxonomy = 'post_tag';
// The edit-tags ID does not contain the post type. Look for it in the request.
if ( null === $post_type ) {
$post_type = 'post';
if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
$post_type = $_REQUEST['post_type'];
}
$id = 'edit-' . $taxonomy;
break;
}