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
This commit is contained in:
parent
0e55b6ab84
commit
123b819f4f
|
@ -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' ),
|
||||
);
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue