Make WordPress Core


Ignore:
Timestamp:
08/12/2010 11:21:05 PM (14 years ago)
Author:
scribu
Message:

Introduce WP_List_Table::check_permissions() and WP_List_Table::prepare_items(). Fixes #14596; See #14579

File:
1 edited

Legend:

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

    r15491 r15496  
    9292            add_action( 'admin_footer', array( $this, '_js_vars' ) );
    9393        }
     94    }
     95
     96    /**
     97     * Checks the current user's permissions
     98     * @uses wp_die()
     99     *
     100     * @since 3.1.0
     101     * @access public
     102     */
     103    function check_permissions() {
     104        die( 'function WP_List_Table::check_permissions() must be over-ridden in a sub-class.' );
     105    }
     106
     107    /**
     108     * Prepares the list of items for displaying.
     109     * @uses WP_List_Table::set_pagination_args()
     110     *
     111     * @since 3.1.0
     112     * @access public
     113     */
     114    function prepare_items() {
     115        die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
    94116    }
    95117
     
    569591     */
    570592    function ajax_response() {
     593        $this->check_permissions();
     594        $this->prepare_items();
     595
    571596        extract( $this->_args );
    572597        extract( $this->_pagination_args );
Note: See TracChangeset for help on using the changeset viewer.