From 84b34160fa99efa8ff81ac79a44ddf01a566e269 Mon Sep 17 00:00:00 2001 From: duck_ Date: Wed, 23 Nov 2011 15:20:45 +0000 Subject: [PATCH] Go back to $post_type global as get_current_screen()->post_type is empty during add/edit-tag AJAX requests. Fixes #18722. git-svn-id: http://svn.automattic.com/wordpress/trunk@19415 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-terms-list-table.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index 76b5756a75..d7cb5261fe 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -283,15 +283,13 @@ class WP_Terms_List_Table extends WP_List_Table { } function column_posts( $tag ) { - global $taxonomy; + global $taxonomy, $post_type; $count = number_format_i18n( $tag->count ); $tax = get_taxonomy( $taxonomy ); - $post_type = get_current_screen()->post_type; $ptype_object = get_post_type_object( $post_type ); - if ( ! $ptype_object->show_ui ) return $count;