Make WordPress Core

Ticket #25662: 25662.patch

File 25662.patch, 4.5 KB (added by siobhyb, 12 years ago)

Updated patch.

  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    127127
    128128        function get_per_page( $comment_status = 'all' ) {
    129129                $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                 */
    130138                $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
    131139                return $comments_per_page;
    132140        }
     
    180188                                number_format_i18n( $num_comments->$status )
    181189                        ) . '</a>';
    182190                }
    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                 */
    184199                $status_links = apply_filters( 'comment_status_links', $status_links );
    185200                return $status_links;
    186201        }
     
    219234                        <select name="comment_type">
    220235                                <option value=""><?php _e( 'Show all comment types' ); ?></option>
    221236<?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                                 */
    222244                                $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
    223245                                        'comment' => __( 'Comments' ),
    224246                                        'pings' => __( 'Pings' ),
     
    229251                        ?>
    230252                        </select>
    231253<?php
     254                        /**
     255                         * Fires just before the Filter submit button for comment types.
     256                         *
     257                         * @since 3.5.0
     258                         */
    232259                        do_action( 'restrict_manage_comments' );
    233260                        submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
    234261                }
     
    238265                        $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
    239266                        submit_button( $title, 'apply', 'delete_all', false );
    240267                }
     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                */
    241275                do_action( 'manage_comments_nav', $comment_status );
    242276                echo '</div>';
    243277        }
     
    311345                global $post, $comment;
    312346
    313347                $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 ) ) );
    316349
    317350                $post = get_post( $comment->comment_post_ID );
    318351
     
    374407                comment_text();
    375408                if ( $user_can ) { ?>
    376409                <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>
    378416                <div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div>
    379417                <div class="author"><?php echo esc_attr( $comment->comment_author ); ?></div>
    380418                <div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div>
     
    424462                                $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>';
    425463                        }
    426464
     465                        /** This filter is documented in wp-admin/includes/dashboard.php */
    427466                        $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
    428467
    429468                        $i = 0;
     
    511550        }
    512551
    513552        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                 */
    514561                do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID );
    515562        }
    516563}