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

    r27029 r28493  
    1010class WP_Links_List_Table extends WP_List_Table {
    1111
    12     function __construct( $args = array() ) {
     12    public function __construct( $args = array() ) {
    1313        parent::__construct( array(
    1414            'plural' => 'bookmarks',
     
    1717    }
    1818
    19     function ajax_user_can() {
     19    public function ajax_user_can() {
    2020        return current_user_can( 'manage_links' );
    2121    }
    2222
    23     function prepare_items() {
     23    public function prepare_items() {
    2424        global $cat_id, $s, $orderby, $order;
    2525
     
    4040    }
    4141
    42     function no_items() {
     42    public function no_items() {
    4343        _e( 'No links found.' );
    4444    }
    4545
    46     function get_bulk_actions() {
     46    protected function get_bulk_actions() {
    4747        $actions = array();
    4848        $actions['delete'] = __( 'Delete' );
     
    5151    }
    5252
    53     function extra_tablenav( $which ) {
     53    protected function extra_tablenav( $which ) {
    5454        global $cat_id;
    5555
     
    7676    }
    7777
    78     function get_columns() {
     78    protected function get_columns() {
    7979        return array(
    8080            'cb'         => '<input type="checkbox" />',
     
    8888    }
    8989
    90     function get_sortable_columns() {
     90    protected function get_sortable_columns() {
    9191        return array(
    9292            'name'    => 'name',
     
    9797    }
    9898
    99     function display_rows() {
     99    protected function display_rows() {
    100100        global $cat_id;
    101101
Note: See TracChangeset for help on using the changeset viewer.