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: https://develop.svn.wordpress.org/trunk@19415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave
2011-11-23 15:20:45 +00:00
parent a7170b0b03
commit 07f811b765

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;