From 93eb987e6caf4c1a099e04582b3065ab921fa2e3 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: https://develop.svn.wordpress.org/trunk@21982 602fd350-edb4-49c9-b593-d223f7449a82 --- 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; }