Ticket #25662: 25662.patch
| File 25662.patch, 4.5 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/includes/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 '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 * Filter the comment status links. 193 * 194 * @since 2.5.0 195 * 196 * @param array $status_links An array of fully-formed status links. Default 'All'. 197 * Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'. 198 */ 184 199 $status_links = apply_filters( 'comment_status_links', $status_links ); 185 200 return $status_links; 186 201 } … … 219 234 <select name="comment_type"> 220 235 <option value=""><?php _e( 'Show all comment types' ); ?></option> 221 236 <?php 237 /** 238 * Filter the comment types dropdown menu. 239 * 240 * @since 2.7.0 241 * 242 * @param array An array of comment types. Accepts 'Comments', 'Pings'. 243 */ 222 244 $comment_types = apply_filters( 'admin_comment_types_dropdown', array( 223 245 'comment' => __( 'Comments' ), 224 246 'pings' => __( 'Pings' ), … … 229 251 ?> 230 252 </select> 231 253 <?php 254 /** 255 * Fires just before the Filter submit button for comment types. 256 * 257 * @since 3.5.0 258 */ 232 259 do_action( 'restrict_manage_comments' ); 233 260 submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); 234 261 } … … 238 265 $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); 239 266 submit_button( $title, 'apply', 'delete_all', false ); 240 267 } 268 /** 269 * Fires after the Filter submit button for comment types. 270 * 271 * @since 2.5.0 272 * 273 * @param string $comment_status The comment status name. Default 'All'. 274 */ 241 275 do_action( 'manage_comments_nav', $comment_status ); 242 276 echo '</div>'; 243 277 } … … 311 345 global $post, $comment; 312 346 313 347 $comment = $a_comment; 314 $the_comment_class = wp_get_comment_status( $comment->comment_ID ); 315 $the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment->comment_ID, $comment->comment_post_ID ) ); 348 $the_comment_class = join( ' ', get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) ); 316 349 317 350 $post = get_post( $comment->comment_post_ID ); 318 351 … … 374 407 comment_text(); 375 408 if ( $user_can ) { ?> 376 409 <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden"> 377 <textarea class="comment" rows="1" cols="1"><?php echo esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) ); ?></textarea> 410 <textarea class="comment" rows="1" cols="1"><?php echo 411 <?php 412 /** This filter is documented in wp-admin/includes/comment.php */ 413 esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) ); 414 ?> 415 </textarea> 378 416 <div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div> 379 417 <div class="author"><?php echo esc_attr( $comment->comment_author ); ?></div> 380 418 <div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div> … … 424 462 $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>'; 425 463 } 426 464 465 /** This filter is documented in wp-admin/includes/dashboard.php */ 427 466 $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment ); 428 467 429 468 $i = 0; … … 511 550 } 512 551 513 552 function column_default( $comment, $column_name ) { 553 /** 554 * Fires when the default column output is displayed for a single row. 555 * 556 * @since 2.8.0 557 * 558 * @param string $column_name The custom column's name. 559 * @param int $comment->comment_ID The custom column's unique ID number. 560 */ 514 561 do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID ); 515 562 } 516 563 }