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-ms-sites-list-table.php

    r27029 r28493  
    1010class WP_MS_Sites_List_Table extends WP_List_Table {
    1111
    12     function __construct( $args = array() ) {
     12    public function __construct( $args = array() ) {
    1313        parent::__construct( array(
    1414            'plural' => 'sites',
     
    1717    }
    1818
    19     function ajax_user_can() {
     19    public function ajax_user_can() {
    2020        return current_user_can( 'manage_sites' );
    2121    }
    2222
    23     function prepare_items() {
     23    public function prepare_items() {
    2424        global $s, $mode, $wpdb;
    2525
     
    121121    }
    122122
    123     function no_items() {
     123    public function no_items() {
    124124        _e( 'No sites found.' );
    125125    }
    126126
    127     function get_bulk_actions() {
     127    protected function get_bulk_actions() {
    128128        $actions = array();
    129129        if ( current_user_can( 'delete_sites' ) )
     
    135135    }
    136136
    137     function pagination( $which ) {
     137    protected function pagination( $which ) {
    138138        global $mode;
    139139
     
    144144    }
    145145
    146     function get_columns() {
     146    protected function get_columns() {
    147147        $blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
    148148        $sites_columns = array(
     
    170170    }
    171171
    172     function get_sortable_columns() {
     172    protected function get_sortable_columns() {
    173173        return array(
    174174            'blogname'    => 'blogname',
     
    178178    }
    179179
    180     function display_rows() {
     180    protected function display_rows() {
    181181        global $mode;
    182182
Note: See TracChangeset for help on using the changeset viewer.