Make WordPress Core

Changeset 50768


Ignore:
Timestamp:
04/18/2021 01:54:00 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-comments-list-table.php.

  • Rename method argument in WP_Comments_List_Table::floated_admin_avatar() per the naming conventions.
  • Use strict comparison in WP_Comments_List_Table::handle_row_actions().

See #52627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r49193 r50768  
    6262     *
    6363     * @param string $name       Comment author name.
    64      * @param int    $comment_ID Comment ID.
     64     * @param int    $comment_id Comment ID.
    6565     * @return string Avatar with the user name.
    6666     */
    67     public function floated_admin_avatar( $name, $comment_ID ) {
    68         $comment = get_comment( $comment_ID );
     67    public function floated_admin_avatar( $name, $comment_id ) {
     68        $comment = get_comment( $comment_id );
    6969        $avatar  = get_avatar( $comment, 32, 'mystery' );
    7070        return "$avatar $name";
     
    833833                || ( 'unspam' === $action && 'spam' === $the_comment_status )
    834834            ) {
    835                 if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) ) {
     835                if ( '1' === get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) ) {
    836836                    $action .= ' approve';
    837837                } else {
     
    10271027         *
    10281028         * @param string $column_name The custom column's name.
    1029          * @param int    $comment_ID  The custom column's unique ID number.
     1029         * @param int    $comment_id  The custom column's unique ID number.
    10301030         */
    10311031        do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID );
Note: See TracChangeset for help on using the changeset viewer.