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-plugin-install-list-table.php

    r28388 r28493  
    1010class WP_Plugin_Install_List_Table extends WP_List_Table {
    1111
    12     function ajax_user_can() {
     12    public function ajax_user_can() {
    1313        return current_user_can('install_plugins');
    1414    }
    1515
    16     function prepare_items() {
     16    public function prepare_items() {
    1717        include( ABSPATH . 'wp-admin/includes/plugin-install.php' );
    1818
     
    134134    }
    135135
    136     function no_items() {
     136    public function no_items() {
    137137        _e( 'No plugins match your request.' );
    138138    }
    139139
    140     function get_views() {
     140    protected function get_views() {
    141141        global $tabs, $tab;
    142142
     
    151151    }
    152152
    153     function display_tablenav( $which ) {
     153    protected function display_tablenav( $which ) {
    154154        if ( 'top' ==  $which ) { ?>
    155155            <div class="tablenav top">
     
    175175    }
    176176
    177     function get_table_classes() {
     177    protected function get_table_classes() {
    178178        return array( 'widefat', $this->_args['plural'] );
    179179    }
    180180
    181     function get_columns() {
     181    protected function get_columns() {
    182182        return array(
    183183            'name'        => _x( 'Name', 'plugin name' ),
     
    188188    }
    189189
    190     function display_rows() {
     190    protected function display_rows() {
    191191        $plugins_allowedtags = array(
    192192            'a' => array( 'href' => array(),'title' => array(), 'target' => array() ),
Note: See TracChangeset for help on using the changeset viewer.