Make WordPress Core


Ignore:
Timestamp:
05/19/2014 01:16:16 AM (11 years ago)
Author:
wonderboymusic
Message:

Add access modifiers to methods and members of list table classes:

  • WP_List_Table is the base class that implements __get() and __call() for BC
  • Adds unit tests to confirm that subclasses properly inherit magic methods
  • Add modifiers to subclasses: WP_Links_List_Table, WP_Media_List_Table, WP_MS_Sites_List_Table, WP_MS_Themes_List_Table, WP_MS_Users_List_Table, WP_Plugin_Install_List_Table, WP_Plugins_List_Table, WP_Posts_List_Table, WP_Terms_List_Table, WP_Theme_Install_List_Table, WP_Themes_List_Table

See #27881, #22234.

File:
1 edited

Legend:

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

    r27507 r28493  
    1010class WP_Plugins_List_Table extends WP_List_Table {
    1111
    12     function __construct( $args = array() ) {
     12    public function __construct( $args = array() ) {
    1313        global $status, $page;
    1414
     
    2828    }
    2929
    30     function get_table_classes() {
     30    protected function get_table_classes() {
    3131        return array( 'widefat', $this->_args['plural'] );
    3232    }
    3333
    34     function ajax_user_can() {
     34    public function ajax_user_can() {
    3535        return current_user_can('activate_plugins');
    3636    }
    3737
    38     function prepare_items() {
     38    public function prepare_items() {
    3939        global $status, $plugins, $totals, $page, $orderby, $order, $s;
    4040
     
    173173    }
    174174
    175     function _search_callback( $plugin ) {
     175    public function _search_callback( $plugin ) {
    176176        static $term;
    177177        if ( is_null( $term ) )
     
    187187    }
    188188
    189     function _order_callback( $plugin_a, $plugin_b ) {
     189    public function _order_callback( $plugin_a, $plugin_b ) {
    190190        global $orderby, $order;
    191191
     
    202202    }
    203203
    204     function no_items() {
     204    public function no_items() {
    205205        global $plugins;
    206206
     
    211211    }
    212212
    213     function get_columns() {
     213    protected function get_columns() {
    214214        global $status;
    215215
     
    221221    }
    222222
    223     function get_sortable_columns() {
     223    protected function get_sortable_columns() {
    224224        return array();
    225225    }
    226226
    227     function get_views() {
     227    protected function get_views() {
    228228        global $totals, $status;
    229229
     
    269269    }
    270270
    271     function get_bulk_actions() {
     271    protected function get_bulk_actions() {
    272272        global $status;
    273273
     
    290290    }
    291291
    292     function bulk_actions() {
     292    public function bulk_actions() {
    293293        global $status;
    294294
     
    299299    }
    300300
    301     function extra_tablenav( $which ) {
     301    protected function extra_tablenav( $which ) {
    302302        global $status;
    303303
     
    317317    }
    318318
    319     function current_action() {
     319    public function current_action() {
    320320        if ( isset($_POST['clear-recent-list']) )
    321321            return 'clear-recent-list';
     
    324324    }
    325325
    326     function display_rows() {
     326    protected function display_rows() {
    327327        global $status;
    328328
     
    334334    }
    335335
    336     function single_row( $item ) {
     336    protected function single_row( $item ) {
    337337        global $status, $page, $s, $totals;
    338338
Note: See TracChangeset for help on using the changeset viewer.