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
This commit is contained in:
duck_ 2011-11-23 15:20:45 +00:00
parent 4cd52de33b
commit 84b34160fa
1 changed files with 1 additions and 3 deletions

View File

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