From 25ed7f52c3e9960812d9f1eddcdd98a28ca2555a Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 24 Sep 2012 20:39:53 +0000 Subject: [PATCH] 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 --- wp-admin/includes/screen.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wp-admin/includes/screen.php b/wp-admin/includes/screen.php index 94792e03e7..3b7871e9e8 100644 --- a/wp-admin/includes/screen.php +++ b/wp-admin/includes/screen.php @@ -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; }