From e01bbd48f49b8702229a943ba10f755f5b24a185 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 18 Apr 2021 13:54:00 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@50768 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-comments-list-table.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 563187ffe497..45f63631d873 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -61,11 +61,11 @@ public function __construct( $args = array() ) { * @since 3.1.0 * * @param string $name Comment author name. - * @param int $comment_ID Comment ID. + * @param int $comment_id Comment ID. * @return string Avatar with the user name. */ - public function floated_admin_avatar( $name, $comment_ID ) { - $comment = get_comment( $comment_ID ); + public function floated_admin_avatar( $name, $comment_id ) { + $comment = get_comment( $comment_id ); $avatar = get_avatar( $comment, 32, 'mystery' ); return "$avatar $name"; } @@ -832,7 +832,7 @@ protected function handle_row_actions( $comment, $column_name, $primary ) { } elseif ( ( 'untrash' === $action && 'trash' === $the_comment_status ) || ( 'unspam' === $action && 'spam' === $the_comment_status ) ) { - if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) ) { + if ( '1' === get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) ) { $action .= ' approve'; } else { $action .= ' unapprove'; @@ -1026,7 +1026,7 @@ public function column_default( $comment, $column_name ) { * @since 2.8.0 * * @param string $column_name The custom column's name. - * @param int $comment_ID The custom column's unique ID number. + * @param int $comment_id The custom column's unique ID number. */ do_action( 'manage_comments_custom_column', $column_name, $comment->comment_ID ); }