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: https://develop.svn.wordpress.org/trunk@21982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-09-24 20:39:53 +00:00
parent d9b4325db3
commit 93eb987e6c
1 changed files with 7 additions and 0 deletions

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;
}