Make WordPress Core

Changeset 28486


Ignore:
Timestamp:
05/18/2014 11:58:38 PM (12 years ago)
Author:
wonderboymusic
Message:

Add access modifier (public) to members and methods in WP_Comments_List_Table and WP_Post_Comments_List_Table.

See #27881, #22234.

File:
1 edited

Legend:

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

    r28385 r28486  
    1818class WP_Comments_List_Table extends WP_List_Table {
    1919
    20         var $checkbox = true;
    21 
    22         var $pending_count = array();
    23 
    24         function __construct( $args = array() ) {
     20        public $checkbox = true;
     21
     22        public $pending_count = array();
     23
     24        public function __construct( $args = array() ) {
    2525                global $post_id;
    2626
     
    3838        }
    3939
    40         function ajax_user_can() {
     40        public function ajax_user_can() {
    4141                return current_user_can('edit_posts');
    4242        }
    4343
    44         function prepare_items() {
     44        public function prepare_items() {
    4545                global $post_id, $comment_status, $search, $comment_type;
    4646
     
    126126        }
    127127
    128         function get_per_page( $comment_status = 'all' ) {
     128        public function get_per_page( $comment_status = 'all' ) {
    129129                $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
    130130                /**
     
    140140        }
    141141
    142         function no_items() {
     142        public function no_items() {
    143143                global $comment_status;
    144144
     
    149149        }
    150150
    151         function get_views() {
     151        public function get_views() {
    152152                global $post_id, $comment_status, $comment_type;
    153153
     
    202202        }
    203203
    204         function get_bulk_actions() {
     204        public function get_bulk_actions() {
    205205                global $comment_status;
    206206
     
    226226        }
    227227
    228         function extra_tablenav( $which ) {
     228        public function extra_tablenav( $which ) {
    229229                global $comment_status, $comment_type;
    230230?>
     
    278278        }
    279279
    280         function current_action() {
     280        public function current_action() {
    281281                if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
    282282                        return 'delete_all';
     
    285285        }
    286286
    287         function get_columns() {
     287        public function get_columns() {
    288288                global $post_id;
    289289
     
    302302        }
    303303
    304         function get_sortable_columns() {
     304        public function get_sortable_columns() {
    305305                return array(
    306306                        'author'   => 'comment_author',
     
    309309        }
    310310
    311         function display() {
     311        public function display() {
    312312                wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    313313
     
    341341        }
    342342
    343         function single_row( $a_comment ) {
     343        public function single_row( $a_comment ) {
    344344                global $post, $comment;
    345345
     
    357357        }
    358358
    359         function column_cb( $comment ) {
     359        public function column_cb( $comment ) {
    360360                if ( $this->user_can ) { ?>
    361361                <label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>"><?php _e( 'Select comment' ); ?></label>
     
    365365        }
    366366
    367         function column_comment( $comment ) {
     367        public function column_comment( $comment ) {
    368368                global $comment_status;
    369369                $post = get_post();
     
    490490        }
    491491
    492         function column_author( $comment ) {
     492        public function column_author( $comment ) {
    493493                global $comment_status;
    494494
     
    520520        }
    521521
    522         function column_date( $comment ) {
     522        public function column_date( $comment ) {
    523523                return get_comment_date( __( 'Y/m/d \a\t g:ia' ) );
    524524        }
    525525
    526         function column_response( $comment ) {
     526        public function column_response( $comment ) {
    527527                $post = get_post();
    528528
     
    552552        }
    553553
    554         function column_default( $comment, $column_name ) {
     554        public function column_default( $comment, $column_name ) {
    555555                /**
    556556                 * Fires when the default column output is displayed for a single row.
     
    577577class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
    578578
    579         function get_column_info() {
     579        public function get_column_info() {
    580580                $this->_column_headers = array(
    581581                        array(
     
    590590        }
    591591
    592         function get_table_classes() {
     592        public function get_table_classes() {
    593593                $classes = parent::get_table_classes();
    594594                $classes[] = 'comments-box';
     
    596596        }
    597597
    598         function display( $output_empty = false ) {
     598        public function display( $output_empty = false ) {
    599599                $singular = $this->_args['singular'];
    600600
     
    614614        }
    615615
    616         function get_per_page( $comment_status = false ) {
     616        public function get_per_page( $comment_status = false ) {
    617617                return 10;
    618618        }
Note: See TracChangeset for help on using the changeset viewer.