WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/19/2014 01:16:16 AM (7 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-ms-users-list-table.php

    r28295 r28493  
    1010class WP_MS_Users_List_Table extends WP_List_Table {
    1111
    12     function ajax_user_can() {
     12    public function ajax_user_can() {
    1313        return current_user_can( 'manage_network_users' );
    1414    }
    1515
    16     function prepare_items() {
     16    public function prepare_items() {
    1717        global $usersearch, $role, $wpdb, $mode;
    1818
     
    7070    }
    7171
    72     function get_bulk_actions() {
     72    protected function get_bulk_actions() {
    7373        $actions = array();
    7474        if ( current_user_can( 'delete_users' ) )
     
    8080    }
    8181
    82     function no_items() {
     82    public function no_items() {
    8383        _e( 'No users found.' );
    8484    }
    8585
    86     function get_views() {
     86    protected function get_views() {
    8787        global $role;
    8888
     
    100100    }
    101101
    102     function pagination( $which ) {
     102    protected function pagination( $which ) {
    103103        global $mode;
    104104
     
    109109    }
    110110
    111     function get_columns() {
     111    protected function get_columns() {
    112112        $users_columns = array(
    113113            'cb'         => '<input type="checkbox" />',
     
    131131    }
    132132
    133     function get_sortable_columns() {
     133    protected function get_sortable_columns() {
    134134        return array(
    135135            'username'   => 'login',
     
    140140    }
    141141
    142     function display_rows() {
     142    protected function display_rows() {
    143143        global $mode;
    144144
Note: See TracChangeset for help on using the changeset viewer.