Ticket #25662: class-wp-comments-list-table.2.patch
File class-wp-comments-list-table.2.patch, 4.5 KB (added by , 10 years ago) |
---|
-
class-wp-comments-list-table.php
127 127 128 128 function get_per_page( $comment_status = 'all' ) { 129 129 $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' ); 130 /** 131 * Filter the number of comments listed per page in the comments list table. 132 * 133 * @since 2.6.0 134 * 135 * @param int $comments_per_page The number of comments to list per page. 136 * @param string $comment_status The comment status name. Default is 'All'. 137 */ 130 138 $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status ); 131 139 return $comments_per_page; 132 140 } … … 180 188 number_format_i18n( $num_comments->$status ) 181 189 ) . '</a>'; 182 190 } 183 191 192 /** 193 * Filter the comment status links. 194 * 195 * Allows the status links used to filter the comments list table to be modified. 196 * The default comment statuses are 'All', 'Pending', 'Approved', 'Spam', and 'Trash'. 197 * 198 * @since 2.5.0 199 * 200 * @param array $status_links An array of fully-formed status links. 201 */ 184 202 $status_links = apply_filters( 'comment_status_links', $status_links ); 185 203 return $status_links; 186 204 } … … 219 237 <select name="comment_type"> 220 238 <option value=""><?php _e( 'Show all comment types' ); ?></option> 221 239 <?php 240 /** 241 * Filter the comment types drop down menu. 242 * 243 * Allows the options supplied to the comment types drop down in the Comments screen to be modified. 244 * The built-in comment type values are 'Comments' and 'Pings'. 245 * 246 * @since 2.7.0 247 * 248 * @param array An array of comment types to be used as options in the drop down. 249 */ 222 250 $comment_types = apply_filters( 'admin_comment_types_dropdown', array( 223 251 'comment' => __( 'Comments' ), 224 252 'pings' => __( 'Pings' ), … … 229 257 ?> 230 258 </select> 231 259 <?php 260 /** 261 * Fires just before the "Filter" submit button on the comments list table. 262 * 263 * Allows additional filtering capabilities for the comments list table. 264 * 265 * @since 3.5.0 266 */ 232 267 do_action( 'restrict_manage_comments' ); 233 268 submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); 234 269 } … … 238 273 $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); 239 274 submit_button( $title, 'apply', 'delete_all', false ); 240 275 } 276 /** 277 * Fires after the "Filter" submit button on the comments list table. 278 * 279 * Allows the filtering options menu for the comments list table to be extended. 280 * 281 * @since 2.5.0 282 * 283 * @param string $comment_status The comment status name. Default is 'All'. 284 */ 241 285 do_action( 'manage_comments_nav', $comment_status ); 242 286 echo '</div>'; 243 287 } … … 373 417 comment_text(); 374 418 if ( $user_can ) { ?> 375 419 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 376 <textarea class="comment" rows="1" cols="1"><?php echo esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) ); ?></textarea> 420 <textarea class="comment" rows="1" cols="1"> 421 <?php 422 /** This filter is documented in wp-admin/includes/comment.php */ 423 echo esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) ); 424 ?> 425 </textarea> 377 426 <div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div> 378 427 <div class="author"><?php echo esc_attr( $comment->comment_author ); ?></div> 379 428 <div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div> … … 423 472 $actions['reply'] = '<a onclick="commentReply.open( \''.$comment->comment_ID.'\',\''.$post->ID.'\' );return false;" class="vim-r" title="'.esc_attr__( 'Reply to this comment' ).'" href="#">' . __( 'Reply' ) . '</a>'; 424 473 } 425 474 475 /** This filter is documented in wp-admin/includes/dashboard.php */ 426 476 $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment ); 427 477 428 478 $i = 0; … … 510 560 } 511 561 512 562 function column_default( $comment, $column_name ) { 563 /** 564 * Fires in comments list table's custom columns. 565 * 566 * Allows content to be added to custom columns in the comments list table. 567 * 568 * @since 2.8.0 569 * 570 * @param string $column_name The custom column's name. 571 * @param int $comment->comment_ID The custom column's unique ID number. 572 */ 513 573 do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID ); 514 574 } 515 575 }