From 040afa7ae31c8beae86c6d44ac3ba4aab0605029 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 6 Sep 2022 13:57:23 +0000 Subject: [PATCH] Docs: Simplify a comment in `WP_Network_Query::get_networks()` and `WP_Site_Query::get_sites()`. This aims to improve readability. The arguments ignored are listed in the line directly below, so there is no need to mention them twice. Follow-up to [41059], [41063], [53097], [53098], [54080]. See #55646. git-svn-id: https://develop.svn.wordpress.org/trunk@54081 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-network-query.php | 2 +- src/wp-includes/class-wp-site-query.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-network-query.php b/src/wp-includes/class-wp-network-query.php index 85d8b53590..e8ff1a5e50 100644 --- a/src/wp-includes/class-wp-network-query.php +++ b/src/wp-includes/class-wp-network-query.php @@ -245,7 +245,7 @@ class WP_Network_Query { // $args can include anything. Only use the args defined in the query_var_defaults to compute the key. $_args = wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ); - // Ignore the $fields, $update_network_cache, and $update_network_meta_cache arguments as the queried result will be the same regardless. + // Ignore these arguments, as the queried result will be the same regardless. unset( $_args['fields'], $_args['update_network_cache'], $_args['update_network_meta_cache'] ); $key = md5( serialize( $_args ) ); diff --git a/src/wp-includes/class-wp-site-query.php b/src/wp-includes/class-wp-site-query.php index 18961253f1..b620713989 100644 --- a/src/wp-includes/class-wp-site-query.php +++ b/src/wp-includes/class-wp-site-query.php @@ -350,7 +350,7 @@ class WP_Site_Query { // $args can include anything. Only use the args defined in the query_var_defaults to compute the key. $_args = wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ); - // Ignore the $fields, $update_site_cache, $update_site_meta_cache argument as the queried result will be the same regardless. + // Ignore these arguments, as the queried result will be the same regardless. unset( $_args['fields'], $_args['update_site_cache'], $_args['update_site_meta_cache'] ); $key = md5( serialize( $_args ) );