From 123b819f4fe20581e56684a31027cb089e9c135f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 18 Mar 2023 12:34:21 +0000 Subject: [PATCH] Coding Standards: Remove unused variables in `WP_Comment_Query`. * `$unapproved_ids` and `$unapproved_emails` in `WP_Comment_Query::get_comment_ids()` were added in [29965] and appear to never have been used. * `$wpdb` in `WP_Comment_Query::fill_descendants()` was replaced with `$this->db` in [38275], removed in [38446], and accidentally reinstated in [38768]. Follow-up to [29965], [34546], [37625], [38275], [38446], [38768], [44546]. Props upadalavipul, dingo_d, audrasjb, SergeyBiryukov. Fixes #57482. Built from https://develop.svn.wordpress.org/trunk@55559 git-svn-id: http://core.svn.wordpress.org/trunk@55071 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-comment-query.php | 6 ------ wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index b4c8445f27..eace9ccd01 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/wp-includes/class-wp-comment-query.php @@ -584,8 +584,6 @@ class WP_Comment_Query { if ( ! empty( $this->query_vars['include_unapproved'] ) ) { $include_unapproved = wp_parse_list( $this->query_vars['include_unapproved'] ); - $unapproved_ids = array(); - $unapproved_emails = array(); foreach ( $include_unapproved as $unapproved_identifier ) { // Numeric values are assumed to be user IDs. if ( is_numeric( $unapproved_identifier ) ) { @@ -1013,14 +1011,10 @@ class WP_Comment_Query { * * @since 4.4.0 * - * @global wpdb $wpdb WordPress database abstraction object. - * * @param WP_Comment[] $comments Array of top-level comments whose descendants should be filled in. * @return array */ protected function fill_descendants( $comments ) { - global $wpdb; - $levels = array( 0 => wp_list_pluck( $comments, 'comment_ID' ), ); diff --git a/wp-includes/version.php b/wp-includes/version.php index a2c5f31937..46204db1b5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55558'; +$wp_version = '6.3-alpha-55559'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.