Make WordPress Core

Ticket #18475: 18475.diff

File 18475.diff, 2.1 KB (added by scribu, 13 years ago)
  • wp-admin/includes/class-wp-posts-list-table.php

    diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php
    index 95b8301..5c30b07 100644
    a b  
    88 * @access private
    99 */
    1010class WP_Posts_List_Table extends WP_List_Table {
    11 
    1211        /**
    1312         * Whether the items should be displayed hierarchically or linearly
    1413         *
    class WP_Posts_List_Table extends WP_List_Table { 
    8685        }
    8786
    8887        function prepare_items() {
    89                 global $post_type_object, $post_type, $avail_post_stati, $wp_query, $per_page, $mode;
     88                global $post_type_object, $avail_post_stati, $wp_query, $per_page, $mode;
    9089
    9190                $avail_post_stati = wp_edit_posts_query();
    9291
    class WP_Posts_List_Table extends WP_List_Table { 
    9493
    9594                $total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts;
    9695
    97                 $per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' );
    98                 $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );
     96                $per_page = $this->get_items_per_page( 'edit_' . $post_type_object->name . '_per_page' );
     97                $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type_object->name );
    9998
    10099                if ( $this->hierarchical_display )
    101100                        $total_pages = ceil( $total_items / $per_page );
    class WP_Posts_List_Table extends WP_List_Table { 
    127126        }
    128127
    129128        function get_views() {
    130                 global $post_type, $post_type_object, $locked_post_status, $avail_post_stati;
     129                global $post_type_object, $locked_post_status, $avail_post_stati;
     130
     131                $post_type = $post_type_object->name;
    131132
    132133                if ( !empty($locked_post_status) )
    133134                        return array();
    class WP_Posts_List_Table extends WP_List_Table { 
    202203        }
    203204
    204205        function extra_tablenav( $which ) {
    205                 global $post_type, $post_type_object, $cat;
     206                global $post_type_object, $cat;
     207
     208                $post_type = $post_type_object->name;
     209
    206210?>
    207211                <div class="alignleft actions">
    208212<?php
    class WP_Posts_List_Table extends WP_List_Table { 
    857861
    858862        <?php
    859863                        endif; // hierarchical
    860        
     864
    861865                        if ( !$bulk ) : ?>
    862866
    863867                        <label>