- Timestamp:
- 05/18/2014 11:58:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-comments-list-table.php
r28385 r28486 18 18 class WP_Comments_List_Table extends WP_List_Table { 19 19 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() ) { 25 25 global $post_id; 26 26 … … 38 38 } 39 39 40 function ajax_user_can() {40 public function ajax_user_can() { 41 41 return current_user_can('edit_posts'); 42 42 } 43 43 44 function prepare_items() {44 public function prepare_items() { 45 45 global $post_id, $comment_status, $search, $comment_type; 46 46 … … 126 126 } 127 127 128 function get_per_page( $comment_status = 'all' ) {128 public function get_per_page( $comment_status = 'all' ) { 129 129 $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' ); 130 130 /** … … 140 140 } 141 141 142 function no_items() {142 public function no_items() { 143 143 global $comment_status; 144 144 … … 149 149 } 150 150 151 function get_views() {151 public function get_views() { 152 152 global $post_id, $comment_status, $comment_type; 153 153 … … 202 202 } 203 203 204 function get_bulk_actions() {204 public function get_bulk_actions() { 205 205 global $comment_status; 206 206 … … 226 226 } 227 227 228 function extra_tablenav( $which ) {228 public function extra_tablenav( $which ) { 229 229 global $comment_status, $comment_type; 230 230 ?> … … 278 278 } 279 279 280 function current_action() {280 public function current_action() { 281 281 if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) 282 282 return 'delete_all'; … … 285 285 } 286 286 287 function get_columns() {287 public function get_columns() { 288 288 global $post_id; 289 289 … … 302 302 } 303 303 304 function get_sortable_columns() {304 public function get_sortable_columns() { 305 305 return array( 306 306 'author' => 'comment_author', … … 309 309 } 310 310 311 function display() {311 public function display() { 312 312 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); 313 313 … … 341 341 } 342 342 343 function single_row( $a_comment ) {343 public function single_row( $a_comment ) { 344 344 global $post, $comment; 345 345 … … 357 357 } 358 358 359 function column_cb( $comment ) {359 public function column_cb( $comment ) { 360 360 if ( $this->user_can ) { ?> 361 361 <label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>"><?php _e( 'Select comment' ); ?></label> … … 365 365 } 366 366 367 function column_comment( $comment ) {367 public function column_comment( $comment ) { 368 368 global $comment_status; 369 369 $post = get_post(); … … 490 490 } 491 491 492 function column_author( $comment ) {492 public function column_author( $comment ) { 493 493 global $comment_status; 494 494 … … 520 520 } 521 521 522 function column_date( $comment ) {522 public function column_date( $comment ) { 523 523 return get_comment_date( __( 'Y/m/d \a\t g:ia' ) ); 524 524 } 525 525 526 function column_response( $comment ) {526 public function column_response( $comment ) { 527 527 $post = get_post(); 528 528 … … 552 552 } 553 553 554 function column_default( $comment, $column_name ) {554 public function column_default( $comment, $column_name ) { 555 555 /** 556 556 * Fires when the default column output is displayed for a single row. … … 577 577 class WP_Post_Comments_List_Table extends WP_Comments_List_Table { 578 578 579 function get_column_info() {579 public function get_column_info() { 580 580 $this->_column_headers = array( 581 581 array( … … 590 590 } 591 591 592 function get_table_classes() {592 public function get_table_classes() { 593 593 $classes = parent::get_table_classes(); 594 594 $classes[] = 'comments-box'; … … 596 596 } 597 597 598 function display( $output_empty = false ) {598 public function display( $output_empty = false ) { 599 599 $singular = $this->_args['singular']; 600 600 … … 614 614 } 615 615 616 function get_per_page( $comment_status = false ) {616 public function get_per_page( $comment_status = false ) { 617 617 return 10; 618 618 }
Note: See TracChangeset
for help on using the changeset viewer.