Plugins: Replace usage of $this in action and filter parameter docblocks with more appropriate variable names.

See #51800, #52217

Fixes #52243


git-svn-id: https://develop.svn.wordpress.org/trunk@49946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2021-01-08 14:28:46 +00:00
parent 5553e0112a
commit 31476dc27c
17 changed files with 95 additions and 95 deletions

View File

@@ -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 ) );