mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55559 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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' ),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user