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.
Built from https://develop.svn.wordpress.org/trunk@50768


git-svn-id: http://core.svn.wordpress.org/trunk@50377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-04-18 13:55:07 +00:00
parent ed067531ec
commit 81ad8ccdf6
2 changed files with 6 additions and 6 deletions

View File

@ -61,11 +61,11 @@ class WP_Comments_List_Table extends WP_List_Table {
* @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 @@ class WP_Comments_List_Table extends WP_List_Table {
} 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 @@ class WP_Comments_List_Table extends WP_List_Table {
* @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 );
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50767';
$wp_version = '5.8-alpha-50768';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.