Make WordPress Core

Ticket #25662: 25662.2.patch

File 25662.2.patch, 4.1 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        }
     
    181189                        ) . '</a>';
    182190                }
    183191
     192                /**
     193                 * Filter the comment status links.
     194                 *
     195                 * @since 2.5.0
     196                 *
     197                 * @param array $status_links An array of fully-formed status links. Default 'All'.
     198                 *                            Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'.
     199                 */
    184200                $status_links = apply_filters( 'comment_status_links', $status_links );
    185201                return $status_links;
    186202        }
     
    219235                        <select name="comment_type">
    220236                                <option value=""><?php _e( 'Show all comment types' ); ?></option>
    221237<?php
     238                                /**
     239                                 * Filter the comment types dropdown menu.
     240                                 *
     241                                 * @since 2.7.0
     242                                 *
     243                                 * @param array An array of comment types. Accepts 'Comments', 'Pings'.
     244                                 */
    222245                                $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
    223246                                        'comment' => __( 'Comments' ),
    224247                                        'pings' => __( 'Pings' ),
     
    229252                        ?>
    230253                        </select>
    231254<?php
     255                        /**
     256                         * Fires just before the Filter submit button for comment types.
     257                         *
     258                         * @since 3.5.0
     259                         */
    232260                        do_action( 'restrict_manage_comments' );
    233261                        submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
    234262                }
     
    238266                        $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
    239267                        submit_button( $title, 'apply', 'delete_all', false );
    240268                }
     269                /**
     270                * Fires after the Filter submit button for comment types.
     271                *
     272                * @since 2.5.0
     273                *
     274                * @param string $comment_status The comment status name. Default 'All'.
     275                */
    241276                do_action( 'manage_comments_nav', $comment_status );
    242277                echo '</div>';
    243278        }
     
    374409                comment_text();
    375410                if ( $user_can ) { ?>
    376411                <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>
     412                <textarea class="comment" rows="1" cols="1">
     413                        <?php
     414                                /** This filter is documented in wp-admin/includes/comment.php */
     415                                echo esc_textarea( apply_filters( 'comment_edit_pre', $comment->comment_content ) );
     416                        ?>
     417                </textarea>
    378418                <div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div>
    379419                <div class="author"><?php echo esc_attr( $comment->comment_author ); ?></div>
    380420                <div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div>
     
    424464                                $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>';
    425465                        }
    426466
     467                        /** This filter is documented in wp-admin/includes/dashboard.php */
    427468                        $actions = apply_filters( 'comment_row_actions', array_filter( $actions ), $comment );
    428469
    429470                        $i = 0;
     
    511552        }
    512553
    513554        function column_default( $comment, $column_name ) {
     555                /**
     556                 * Fires when the default column output is displayed for a single row.
     557                 *
     558                 * @since 2.8.0
     559                 *
     560                 * @param string $column_name         The custom column's name.
     561                 * @param int    $comment->comment_ID The custom column's unique ID number.
     562                 */
    514563                do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID );
    515564        }
    516565}