From 6f3a940e64ebef785c225add9e5d6a7d82d32b83 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 8 Jan 2021 14:30:14 +0000 Subject: [PATCH] Plugins: Replace usage of `$this` in action and filter parameter docblocks with more appropriate variable names. See #51800, #52217 Fixes #52243 Built from https://develop.svn.wordpress.org/trunk@49946 git-svn-id: http://core.svn.wordpress.org/trunk@49645 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-screen.php | 8 +- wp-admin/includes/class-wp-upgrader.php | 4 +- wp-includes/class-wp-comment-query.php | 6 +- wp-includes/class-wp-customize-setting.php | 8 +- wp-includes/class-wp-network-query.php | 6 +- wp-includes/class-wp-query.php | 94 +++++++++---------- wp-includes/class-wp-site-query.php | 8 +- wp-includes/class-wp-term-query.php | 2 +- wp-includes/class-wp-theme.php | 4 +- wp-includes/class-wp-user-query.php | 16 ++-- wp-includes/class-wp-widget.php | 8 +- wp-includes/class-wp.php | 2 +- .../class-wp-customize-selective-refresh.php | 2 +- wp-includes/rest-api/class-wp-rest-server.php | 8 +- wp-includes/version.php | 2 +- .../widgets/class-wp-widget-custom-html.php | 2 +- wp-includes/widgets/class-wp-widget-media.php | 4 +- wp-includes/widgets/class-wp-widget-text.php | 8 +- 18 files changed, 96 insertions(+), 96 deletions(-) diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php index 8d9623d709..57fb4f4038 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/wp-admin/includes/class-wp-screen.php @@ -794,7 +794,7 @@ final class WP_Screen { * {@see get_current_screen()->remove_help_tab()} instead. * * @param array $old_compat_help Old contextual help. - * @param WP_Screen $this Current WP_Screen instance. + * @param WP_Screen $screen Current WP_Screen instance. */ self::$_old_compat_help = apply_filters_deprecated( 'contextual_help_list', @@ -814,7 +814,7 @@ final class WP_Screen { * * @param string $old_help Help text that appears on the screen. * @param string $screen_id Screen ID. - * @param WP_Screen $this Current WP_Screen instance. + * @param WP_Screen $screen Current WP_Screen instance. */ $old_help = apply_filters_deprecated( 'contextual_help', @@ -935,7 +935,7 @@ final class WP_Screen { * * @param array $empty_columns Empty array. * @param string $screen_id Screen ID. - * @param WP_Screen $this Current WP_Screen instance. + * @param WP_Screen $screen Current WP_Screen instance. */ $columns = apply_filters( 'screen_layout_columns', array(), $this->id, $this ); @@ -1087,7 +1087,7 @@ final class WP_Screen { * * @param bool $show_button Whether to show Screen Options submit button. * Default false. - * @param WP_Screen $this Current WP_Screen instance. + * @param WP_Screen $screen Current WP_Screen instance. */ $show_button = apply_filters( 'screen_options_show_submit', false, $this ); diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 5faac56213..3017b4851d 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -262,7 +262,7 @@ class WP_Upgrader { * @param bool $reply Whether to bail without returning the package. * Default false. * @param string $package The package file name. - * @param WP_Upgrader $this The WP_Upgrader instance. + * @param WP_Upgrader $upgrader The WP_Upgrader instance. * @param array $hook_extra Extra arguments passed to hooked filters. */ $reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra ); @@ -521,7 +521,7 @@ class WP_Upgrader { * * @param string $source File source location. * @param string $remote_source Remote file source location. - * @param WP_Upgrader $this WP_Upgrader instance. + * @param WP_Upgrader $upgrader WP_Upgrader instance. * @param array $hook_extra Extra arguments passed to hooked filters. */ $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] ); diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index 03348e74e8..46e15288a2 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/wp-includes/class-wp-comment-query.php @@ -410,7 +410,7 @@ class WP_Comment_Query { * @param array|int|null $comment_data Return an array of comment data to short-circuit WP's comment query, * the comment count as an integer if `$this->query_vars['count']` is set, * or null to allow WP to run its normal queries. - * @param WP_Comment_Query $this The WP_Comment_Query instance, passed by reference. + * @param WP_Comment_Query $query The WP_Comment_Query instance, passed by reference. */ $comment_data = apply_filters_ref_array( 'comments_pre_query', array( $comment_data, &$this ) ); @@ -494,7 +494,7 @@ class WP_Comment_Query { * @since 3.1.0 * * @param WP_Comment[] $_comments An array of comments. - * @param WP_Comment_Query $this Current instance of WP_Comment_Query (passed by reference). + * @param WP_Comment_Query $query Current instance of WP_Comment_Query (passed by reference). */ $_comments = apply_filters_ref_array( 'the_comments', array( $_comments, &$this ) ); @@ -904,7 +904,7 @@ class WP_Comment_Query { * @since 3.1.0 * * @param string[] $pieces An associative array of comment query clauses. - * @param WP_Comment_Query $this Current instance of WP_Comment_Query (passed by reference). + * @param WP_Comment_Query $query Current instance of WP_Comment_Query (passed by reference). */ $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) ); diff --git a/wp-includes/class-wp-customize-setting.php b/wp-includes/class-wp-customize-setting.php index 18f2fb7440..4f63937799 100644 --- a/wp-includes/class-wp-customize-setting.php +++ b/wp-includes/class-wp-customize-setting.php @@ -606,7 +606,7 @@ class WP_Customize_Setting { * * @param WP_Error $validity Filtered from `true` to `WP_Error` when invalid. * @param mixed $value Value of the setting. - * @param WP_Customize_Setting $this WP_Customize_Setting instance. + * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ $validity = apply_filters( "customize_validate_{$this->id}", $validity, $value, $this ); @@ -762,7 +762,7 @@ class WP_Customize_Setting { * @since 4.6.0 Added the `$this` setting instance as the second parameter. * * @param mixed $default The setting default value. Default empty. - * @param WP_Customize_Setting $this The setting instance. + * @param WP_Customize_Setting $setting The setting instance. */ $value = apply_filters( "customize_value_{$id_base}", $value, $this ); } elseif ( $this->is_multidimensional_aggregated ) { @@ -795,8 +795,8 @@ class WP_Customize_Setting { * * @since 3.4.0 * - * @param mixed $value The setting value. - * @param WP_Customize_Setting $this WP_Customize_Setting instance. + * @param mixed $value The setting value. + * @param WP_Customize_Setting $setting WP_Customize_Setting instance. */ $value = apply_filters( "customize_sanitize_js_{$this->id}", $this->value(), $this ); diff --git a/wp-includes/class-wp-network-query.php b/wp-includes/class-wp-network-query.php index e08375cf70..8ddea39ed5 100644 --- a/wp-includes/class-wp-network-query.php +++ b/wp-includes/class-wp-network-query.php @@ -227,7 +227,7 @@ class WP_Network_Query { * @param array|int|null $network_data Return an array of network data to short-circuit WP's network query, * the network count as an integer if `$this->query_vars['count']` is set, * or null to allow WP to run its normal queries. - * @param WP_Network_Query $this The WP_Network_Query instance, passed by reference. + * @param WP_Network_Query $query The WP_Network_Query instance, passed by reference. */ $network_data = apply_filters_ref_array( 'networks_pre_query', array( $network_data, &$this ) ); @@ -303,7 +303,7 @@ class WP_Network_Query { * @since 4.6.0 * * @param WP_Network[] $_networks An array of WP_Network objects. - * @param WP_Network_Query $this Current instance of WP_Network_Query (passed by reference). + * @param WP_Network_Query $query Current instance of WP_Network_Query (passed by reference). */ $_networks = apply_filters_ref_array( 'the_networks', array( $_networks, &$this ) ); @@ -446,7 +446,7 @@ class WP_Network_Query { * @since 4.6.0 * * @param string[] $pieces An associative array of network query clauses. - * @param WP_Network_Query $this Current instance of WP_Network_Query (passed by reference). + * @param WP_Network_Query $query Current instance of WP_Network_Query (passed by reference). */ $clauses = apply_filters_ref_array( 'networks_clauses', array( compact( $pieces ), &$this ) ); diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index 34c76e9bb6..339acdb520 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -1078,7 +1078,7 @@ class WP_Query { * * @since 1.5.0 * - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ do_action_ref_array( 'parse_query', array( &$this ) ); } @@ -1319,7 +1319,7 @@ class WP_Query { * * @since 3.7.0 * - * @param WP_Query $this The WP_Query instance. + * @param WP_Query $query The WP_Query instance. */ do_action( 'parse_tax_query', $this ); } @@ -1718,7 +1718,7 @@ class WP_Query { * * @since 5.5.0 * - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ do_action_ref_array( 'set_404', array( $this ) ); } @@ -1779,7 +1779,7 @@ class WP_Query { * * @since 2.0.0 * - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ do_action_ref_array( 'pre_get_posts', array( &$this ) ); @@ -2126,7 +2126,7 @@ class WP_Query { * @since 3.0.0 * * @param string $search Search SQL for WHERE clause. - * @param WP_Query $this The current WP_Query object. + * @param WP_Query $query The current WP_Query object. */ $search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) ); } @@ -2381,7 +2381,7 @@ class WP_Query { * @since 3.7.0 * * @param string $search_orderby The ORDER BY clause. - * @param WP_Query $this The current WP_Query instance. + * @param WP_Query $query The current WP_Query instance. */ $search_orderby = apply_filters( 'posts_search_orderby', $search_orderby, $this ); } @@ -2563,7 +2563,7 @@ class WP_Query { * @since 1.5.0 * * @param string $where The WHERE clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $where = apply_filters_ref_array( 'posts_where', array( $where, &$this ) ); @@ -2572,8 +2572,8 @@ class WP_Query { * * @since 1.5.0 * - * @param string $join The JOIN clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param string $join The JOIN clause of the query. + * @param WP_Query $query The WP_Query instance (passed by reference). */ $join = apply_filters_ref_array( 'posts_join', array( $join, &$this ) ); } @@ -2614,7 +2614,7 @@ class WP_Query { * @since 2.2.0 * * @param string $cjoin The JOIN clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $cjoin = apply_filters_ref_array( 'comment_feed_join', array( $cjoin, &$this ) ); @@ -2624,7 +2624,7 @@ class WP_Query { * @since 2.2.0 * * @param string $cwhere The WHERE clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $cwhere = apply_filters_ref_array( 'comment_feed_where', array( $cwhere, &$this ) ); @@ -2634,7 +2634,7 @@ class WP_Query { * @since 2.2.0 * * @param string $cgroupby The GROUP BY clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( $cgroupby, &$this ) ); @@ -2644,7 +2644,7 @@ class WP_Query { * @since 2.8.0 * * @param string $corderby The ORDER BY clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); @@ -2654,7 +2654,7 @@ class WP_Query { * @since 2.8.0 * * @param string $climits The JOIN clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) ); } @@ -2699,7 +2699,7 @@ class WP_Query { * @since 1.5.0 * * @param string $where The WHERE clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) ); @@ -2709,7 +2709,7 @@ class WP_Query { * @since 2.0.0 * * @param string $groupby The GROUP BY clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) ); @@ -2720,8 +2720,8 @@ class WP_Query { * * @since 1.5.0 * - * @param string $join The JOIN clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param string $join The JOIN clause of the query. + * @param WP_Query $query The WP_Query instance (passed by reference). */ $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) ); @@ -2731,7 +2731,7 @@ class WP_Query { * @since 1.5.1 * * @param string $orderby The ORDER BY clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) ); @@ -2741,7 +2741,7 @@ class WP_Query { * @since 2.1.0 * * @param string $distinct The DISTINCT clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) ); @@ -2751,7 +2751,7 @@ class WP_Query { * @since 2.1.0 * * @param string $limits The LIMIT clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) ); @@ -2761,7 +2761,7 @@ class WP_Query { * @since 2.1.0 * * @param string $fields The SELECT clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) ); @@ -2774,7 +2774,7 @@ class WP_Query { * @since 3.1.0 * * @param string[] $clauses Associative array of the clauses for the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) ); @@ -2811,7 +2811,7 @@ class WP_Query { * @since 2.5.0 * * @param string $where The WHERE clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) ); @@ -2823,7 +2823,7 @@ class WP_Query { * @since 2.5.0 * * @param string $groupby The GROUP BY clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) ); @@ -2834,8 +2834,8 @@ class WP_Query { * * @since 2.5.0 * - * @param string $join The JOIN clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param string $join The JOIN clause of the query. + * @param WP_Query $query The WP_Query instance (passed by reference). */ $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) ); @@ -2847,7 +2847,7 @@ class WP_Query { * @since 2.5.0 * * @param string $orderby The ORDER BY clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) ); @@ -2859,7 +2859,7 @@ class WP_Query { * @since 2.5.0 * * @param string $distinct The DISTINCT clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) ); @@ -2871,7 +2871,7 @@ class WP_Query { * @since 2.5.0 * * @param string $fields The SELECT clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) ); @@ -2883,7 +2883,7 @@ class WP_Query { * @since 2.5.0 * * @param string $limits The LIMIT clause of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) ); @@ -2898,7 +2898,7 @@ class WP_Query { * @since 3.1.0 * * @param string[] $pieces Associative array of the pieces of the query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) ); @@ -2933,7 +2933,7 @@ class WP_Query { * @since 2.0.0 * * @param string $request The complete SQL query. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $this->request = apply_filters_ref_array( 'posts_request', array( $this->request, &$this ) ); } @@ -2952,7 +2952,7 @@ class WP_Query { * * @param WP_Post[]|int[]|null $posts Return an array of post data to short-circuit WP's query, * or null to allow WP to run its normal queries. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $this->posts = apply_filters_ref_array( 'posts_pre_query', array( null, &$this ) ); @@ -3002,7 +3002,7 @@ class WP_Query { * @since 3.4.0 * * @param bool $split_the_query Whether or not to split the query. - * @param WP_Query $this The WP_Query instance. + * @param WP_Query $query The WP_Query instance. */ $split_the_query = apply_filters( 'split_the_query', $split_the_query, $this ); @@ -3017,7 +3017,7 @@ class WP_Query { * @since 3.4.0 * * @param string $request The post ID request. - * @param WP_Query $this The WP_Query instance. + * @param WP_Query $query The WP_Query instance. */ $this->request = apply_filters( 'posts_request_ids', $this->request, $this ); @@ -3049,7 +3049,7 @@ class WP_Query { * @since 2.3.0 * * @param WP_Post[] $posts Array of post objects. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) ); } @@ -3132,7 +3132,7 @@ class WP_Query { * @since 2.7.0 * * @param WP_Post $post_preview The Post object. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $this->posts[0] = get_post( apply_filters_ref_array( 'the_preview', array( $this->posts[0], &$this ) ) ); } @@ -3195,7 +3195,7 @@ class WP_Query { * @since 1.5.0 * * @param WP_Post[] $posts Array of post objects. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $this->posts = apply_filters_ref_array( 'the_posts', array( $this->posts, &$this ) ); } @@ -3253,7 +3253,7 @@ class WP_Query { * @since 2.1.0 * * @param string $found_posts_query The query to run to find the found posts. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ); @@ -3276,7 +3276,7 @@ class WP_Query { * @since 2.1.0 * * @param int $found_posts The number of posts found. - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ $this->found_posts = (int) apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); @@ -3321,7 +3321,7 @@ class WP_Query { * * @since 2.0.0 * - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ do_action_ref_array( 'loop_start', array( &$this ) ); } @@ -3348,7 +3348,7 @@ class WP_Query { * * @since 2.0.0 * - * @param WP_Query $this The WP_Query instance (passed by reference). + * @param WP_Query $query The WP_Query instance (passed by reference). */ do_action_ref_array( 'loop_end', array( &$this ) ); // Do some cleaning up after the loop. @@ -3359,7 +3359,7 @@ class WP_Query { * * @since 4.9.0 * - * @param WP_Query $this The WP_Query instance. + * @param WP_Query $query The WP_Query instance. */ do_action( 'loop_no_results', $this ); } @@ -4314,10 +4314,10 @@ class WP_Query { * Fires once the post data has been set up. * * @since 2.8.0 - * @since 4.1.0 Introduced `$this` parameter. + * @since 4.1.0 Introduced `$query` parameter. * - * @param WP_Post $post The Post object (passed by reference). - * @param WP_Query $this The current Query object (passed by reference). + * @param WP_Post $post The Post object (passed by reference). + * @param WP_Query $query The current Query object (passed by reference). */ do_action_ref_array( 'the_post', array( &$post, &$this ) ); diff --git a/wp-includes/class-wp-site-query.php b/wp-includes/class-wp-site-query.php index cd562cb245..39e689b464 100644 --- a/wp-includes/class-wp-site-query.php +++ b/wp-includes/class-wp-site-query.php @@ -318,7 +318,7 @@ class WP_Site_Query { * @param array|int|null $site_data Return an array of site data to short-circuit WP's site query, * the site count as an integer if `$this->query_vars['count']` is set, * or null to run the normal queries. - * @param WP_Site_Query $this The WP_Site_Query instance, passed by reference. + * @param WP_Site_Query $query The WP_Site_Query instance, passed by reference. */ $site_data = apply_filters_ref_array( 'sites_pre_query', array( $site_data, &$this ) ); @@ -396,7 +396,7 @@ class WP_Site_Query { * @since 4.6.0 * * @param WP_Site[] $_sites An array of WP_Site objects. - * @param WP_Site_Query $this Current instance of WP_Site_Query (passed by reference). + * @param WP_Site_Query $query Current instance of WP_Site_Query (passed by reference). */ $_sites = apply_filters_ref_array( 'the_sites', array( $_sites, &$this ) ); @@ -600,7 +600,7 @@ class WP_Site_Query { * * @param string[] $search_columns Array of column names to be searched. * @param string $search Text being searched. - * @param WP_Site_Query $this The current WP_Site_Query instance. + * @param WP_Site_Query $query The current WP_Site_Query instance. */ $search_columns = apply_filters( 'site_search_columns', $search_columns, $this->query_vars['search'], $this ); @@ -637,7 +637,7 @@ class WP_Site_Query { * @since 4.6.0 * * @param string[] $pieces An associative array of site query clauses. - * @param WP_Site_Query $this Current instance of WP_Site_Query (passed by reference). + * @param WP_Site_Query $query Current instance of WP_Site_Query (passed by reference). */ $clauses = apply_filters_ref_array( 'sites_clauses', array( compact( $pieces ), &$this ) ); diff --git a/wp-includes/class-wp-term-query.php b/wp-includes/class-wp-term-query.php index 920046aefc..b507a0f874 100644 --- a/wp-includes/class-wp-term-query.php +++ b/wp-includes/class-wp-term-query.php @@ -696,7 +696,7 @@ class WP_Term_Query { * * @param array|null $terms Return an array of term data to short-circuit WP's term query, * or null to allow WP queries to run normally. - * @param WP_Term_Query $this The WP_Term_Query instance, passed by reference. + * @param WP_Term_Query $query The WP_Term_Query instance, passed by reference. */ $this->terms = apply_filters_ref_array( 'terms_pre_query', array( $this->terms, &$this ) ); diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index f75b957c71..338df4b8f4 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -1258,7 +1258,7 @@ final class WP_Theme implements ArrayAccess { * @since 4.9.6 * * @param string[] $post_templates Array of template header names keyed by the template file name. - * @param WP_Theme $this The theme object. + * @param WP_Theme $theme The theme object. * @param WP_Post|null $post The post being edited, provided for context, or null. * @param string $post_type Post type to get the templates for. */ @@ -1274,7 +1274,7 @@ final class WP_Theme implements ArrayAccess { * @since 4.7.0 Added the `$post_type` parameter. * * @param string[] $post_templates Array of template header names keyed by the template file name. - * @param WP_Theme $this The theme object. + * @param WP_Theme $theme The theme object. * @param WP_Post|null $post The post being edited, provided for context, or null. * @param string $post_type Post type to get the templates for. */ diff --git a/wp-includes/class-wp-user-query.php b/wp-includes/class-wp-user-query.php index ca2dd0ff33..f760c25288 100644 --- a/wp-includes/class-wp-user-query.php +++ b/wp-includes/class-wp-user-query.php @@ -224,7 +224,7 @@ class WP_User_Query { * * @since 4.0.0 * - * @param WP_User_Query $this Current instance of WP_User_Query (passed by reference). + * @param WP_User_Query $query Current instance of WP_User_Query (passed by reference). */ do_action_ref_array( 'pre_get_users', array( &$this ) ); @@ -544,7 +544,7 @@ class WP_User_Query { * * @param string[] $search_columns Array of column names to be searched. * @param string $search Text being searched. - * @param WP_User_Query $this The current WP_User_Query instance. + * @param WP_User_Query $query The current WP_User_Query instance. */ $search_columns = apply_filters( 'user_search_columns', $search_columns, $search, $this ); @@ -575,7 +575,7 @@ class WP_User_Query { * * @since 3.1.0 * - * @param WP_User_Query $this Current instance of WP_User_Query (passed by reference). + * @param WP_User_Query $query Current instance of WP_User_Query (passed by reference). */ do_action_ref_array( 'pre_user_query', array( &$this ) ); } @@ -604,9 +604,9 @@ class WP_User_Query { * * @since 5.1.0 * - * @param array|null $results Return an array of user data to short-circuit WP's user query - * or null to allow WP to run its normal queries. - * @param WP_User_Query $this The WP_User_Query instance (passed by reference). + * @param array|null $results Return an array of user data to short-circuit WP's user query + * or null to allow WP to run its normal queries. + * @param WP_User_Query $query The WP_User_Query instance (passed by reference). */ $this->results = apply_filters_ref_array( 'users_pre_query', array( null, &$this ) ); @@ -628,8 +628,8 @@ class WP_User_Query { * * @global wpdb $wpdb WordPress database abstraction object. * - * @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query. - * @param WP_User_Query $this The current WP_User_Query instance. + * @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query. + * @param WP_User_Query $query The current WP_User_Query instance. */ $found_users_query = apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()', $this ); diff --git a/wp-includes/class-wp-widget.php b/wp-includes/class-wp-widget.php index db8e205513..8d1de7c375 100644 --- a/wp-includes/class-wp-widget.php +++ b/wp-includes/class-wp-widget.php @@ -363,7 +363,7 @@ class WP_Widget { * @since 2.8.0 * * @param array $instance The current widget instance's settings. - * @param WP_Widget $this The current widget instance. + * @param WP_Widget $widget The current widget instance. * @param array $args An array of default widget arguments. */ $instance = apply_filters( 'widget_display_callback', $instance, $this, $args ); @@ -457,7 +457,7 @@ class WP_Widget { * @param array $instance The current widget instance's settings. * @param array $new_instance Array of new widget settings. * @param array $old_instance Array of old widget settings. - * @param WP_Widget $this The current widget instance. + * @param WP_Widget $widget The current widget instance. */ $instance = apply_filters( 'widget_update_callback', $instance, $new_instance, $old_instance, $this ); if ( false !== $instance ) { @@ -510,7 +510,7 @@ class WP_Widget { * @since 2.8.0 * * @param array $instance The current widget instance's settings. - * @param WP_Widget $this The current widget instance. + * @param WP_Widget $widget The current widget instance. */ $instance = apply_filters( 'widget_form_callback', $instance, $this ); @@ -530,7 +530,7 @@ class WP_Widget { * * @since 2.8.0 * - * @param WP_Widget $this The widget instance (passed by reference). + * @param WP_Widget $widget The widget instance (passed by reference). * @param null $return Return null if new fields are added. * @param array $instance An array of the widget's settings. */ diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 9e163ab633..fe956ed958 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -485,7 +485,7 @@ class WP { * @since 2.8.0 * * @param string[] $headers Associative array of headers to be sent. - * @param WP $this Current WordPress environment instance. + * @param WP $wp Current WordPress environment instance. */ $headers = apply_filters( 'wp_headers', $headers, $this ); diff --git a/wp-includes/customize/class-wp-customize-selective-refresh.php b/wp-includes/customize/class-wp-customize-selective-refresh.php index e8658b30a2..9d379af40d 100644 --- a/wp-includes/customize/class-wp-customize-selective-refresh.php +++ b/wp-includes/customize/class-wp-customize-selective-refresh.php @@ -428,7 +428,7 @@ final class WP_Customize_Selective_Refresh { * @type array $errors List of errors triggered during rendering of partials, if `WP_DEBUG_DISPLAY` * is enabled. * } - * @param WP_Customize_Selective_Refresh $this Selective refresh component. + * @param WP_Customize_Selective_Refresh $refresh Selective refresh component. * @param array $partials Placements' context data for the partials rendered in the request. * The array is keyed by partial ID, with each item being an array of * the placements' context data. diff --git a/wp-includes/rest-api/class-wp-rest-server.php b/wp-includes/rest-api/class-wp-rest-server.php index 6a972b6468..5cf1353f9a 100644 --- a/wp-includes/rest-api/class-wp-rest-server.php +++ b/wp-includes/rest-api/class-wp-rest-server.php @@ -457,7 +457,7 @@ class WP_REST_Server { * @since 4.5.0 Applied to embedded responses. * * @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`. - * @param WP_REST_Server $this Server instance. + * @param WP_REST_Server $server Server instance. * @param WP_REST_Request $request Request used to generate the response. */ $result = apply_filters( 'rest_post_dispatch', rest_ensure_response( $result ), $this, $request ); @@ -486,7 +486,7 @@ class WP_REST_Server { * Default false. * @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`. * @param WP_REST_Request $request Request used to generate the response. - * @param WP_REST_Server $this Server instance. + * @param WP_REST_Server $server Server instance. */ $served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this ); @@ -508,7 +508,7 @@ class WP_REST_Server { * @since 4.8.1 * * @param array $result Response data to send to the client. - * @param WP_REST_Server $this Server instance. + * @param WP_REST_Server $server Server instance. * @param WP_REST_Request $request Request used to generate the response. */ $result = apply_filters( 'rest_pre_echo_response', $result, $this, $request ); @@ -966,7 +966,7 @@ class WP_REST_Server { * * @param mixed $result Response to replace the requested version with. Can be anything * a normal endpoint can return, or null to not hijack the request. - * @param WP_REST_Server $this Server instance. + * @param WP_REST_Server $server Server instance. * @param WP_REST_Request $request Request used to generate the response. */ $result = apply_filters( 'rest_pre_dispatch', null, $this, $request ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 43f43c2dde..596f243860 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-49945'; +$wp_version = '5.7-alpha-49946'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-custom-html.php b/wp-includes/widgets/class-wp-widget-custom-html.php index 0e25dd6b15..301b0ff565 100644 --- a/wp-includes/widgets/class-wp-widget-custom-html.php +++ b/wp-includes/widgets/class-wp-widget-custom-html.php @@ -156,7 +156,7 @@ class WP_Widget_Custom_HTML extends WP_Widget { * * @param string $content The widget content. * @param array $instance Array of settings for the current widget. - * @param WP_Widget_Custom_HTML $this Current Custom HTML widget instance. + * @param WP_Widget_Custom_HTML $widget Current Custom HTML widget instance. */ $content = apply_filters( 'widget_custom_html_content', $content, $instance, $this ); diff --git a/wp-includes/widgets/class-wp-widget-media.php b/wp-includes/widgets/class-wp-widget-media.php index 59aeeeacdb..09c2b0dd1f 100644 --- a/wp-includes/widgets/class-wp-widget-media.php +++ b/wp-includes/widgets/class-wp-widget-media.php @@ -162,7 +162,7 @@ abstract class WP_Widget_Media extends WP_Widget { * @since 4.9.0 * * @param array $schema Instance schema. - * @param WP_Widget_Media $this Widget object. + * @param WP_Widget_Media $widget Widget object. */ $schema = apply_filters( "widget_{$this->id_base}_instance_schema", $schema, $this ); @@ -245,7 +245,7 @@ abstract class WP_Widget_Media extends WP_Widget { * * @param array $instance Instance data. * @param array $args Widget args. - * @param WP_Widget_Media $this Widget object. + * @param WP_Widget_Media $widget Widget object. */ $instance = apply_filters( "widget_{$this->id_base}_instance", $instance, $args, $this ); diff --git a/wp-includes/widgets/class-wp-widget-text.php b/wp-includes/widgets/class-wp-widget-text.php index 642e075d1a..b2a7a412d5 100644 --- a/wp-includes/widgets/class-wp-widget-text.php +++ b/wp-includes/widgets/class-wp-widget-text.php @@ -270,12 +270,12 @@ class WP_Widget_Text extends WP_Widget { * Filters the content of the Text widget. * * @since 2.3.0 - * @since 4.4.0 Added the `$this` parameter. - * @since 4.8.1 The `$this` param may now be a `WP_Widget_Custom_HTML` object in addition to a `WP_Widget_Text` object. + * @since 4.4.0 Added the `$widget` parameter. + * @since 4.8.1 The `$widget` param may now be a `WP_Widget_Custom_HTML` object in addition to a `WP_Widget_Text` object. * * @param string $text The widget content. * @param array $instance Array of settings for the current widget. - * @param WP_Widget_Text|WP_Widget_Custom_HTML $this Current Text widget instance. + * @param WP_Widget_Text|WP_Widget_Custom_HTML $widget Current text or HTML widget instance. */ $text = apply_filters( 'widget_text', $text, $instance, $this ); @@ -290,7 +290,7 @@ class WP_Widget_Text extends WP_Widget { * * @param string $text The widget content. * @param array $instance Array of settings for the current widget. - * @param WP_Widget_Text $this Current Text widget instance. + * @param WP_Widget_Text $widget Current Text widget instance. */ $text = apply_filters( 'widget_text_content', $text, $instance, $this ); } else {