WordPress.org

Make WordPress Core

Changeset 19415


Ignore:
Timestamp:
11/23/11 15:20:45 (3 years ago)
Author:
duck_
Message:

Go back to $post_type global as get_current_screen()->post_type is empty during add/edit-tag AJAX requests. Fixes #18722.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-terms-list-table.php

    r19383 r19415  
    284284 
    285285    function column_posts( $tag ) { 
    286         global $taxonomy; 
     286        global $taxonomy, $post_type; 
    287287 
    288288        $count = number_format_i18n( $tag->count ); 
     
    290290        $tax = get_taxonomy( $taxonomy ); 
    291291 
    292         $post_type = get_current_screen()->post_type; 
    293292        $ptype_object = get_post_type_object( $post_type ); 
    294  
    295293        if ( ! $ptype_object->show_ui ) 
    296294            return $count; 
Note: See TracChangeset for help on using the changeset viewer.