Make WordPress Core

Changeset 51295


Ignore:
Timestamp:
07/01/2021 06:49:30 PM (5 years ago)
Author:
desrosj
Message:

Docs: Correct documentation for rest_{$post_type}_query and rest_{$taxonomy}_query` filters.

Synchronize documentation for related rest_{$object_type}_query filters for consistency.

Props dlh.
Merges [51293] to the 5.8 branch.
Fixes #53568.

Location:
branches/5.8
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r51000 r51295  
    262262
    263263                /**
    264                  * Filters arguments, before passing to WP_Comment_Query, when querying comments via the REST API.
     264                 * Filters WP_Comment_Query arguments when querying comments via the REST API.
    265265                 *
    266266                 * @since 4.7.0
    … …  
    269269                 *
    270270                 * @param array           $prepared_args Array of arguments for WP_Comment_Query.
    271                  * @param WP_REST_Request $request       The current request.
     271                 * @param WP_REST_Request $request       The REST API request.
    272272                 */
    273273                $prepared_args = apply_filters( 'rest_comment_query', $prepared_args, $request );
  • branches/5.8/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r51026 r51295  
    327327
    328328                /**
    329                  * Filters WP_Query arguments when querying users via the REST API.
     329                 * Filters WP_Query arguments when querying posts via the REST API.
    330330                 *
    331331                 * The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
    … …  
    344344                 * @link https://developer.wordpress.org/reference/classes/wp_query/
    345345                 *
    346                  * @param array           $args    Array of arguments to be passed to WP_Query.
     346                 * @param array           $args    Array of arguments for WP_Query.
    347347                 * @param WP_REST_Request $request The REST API request.
    348348                 */
  • branches/5.8/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r51000 r51295  
    234234
    235235                /**
    236                  * Filters get_terms() arguments when querying users via the REST API.
     236                 * Filters get_terms() arguments when querying terms via the REST API.
    237237                 *
    238238                 * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
    … …  
    250250                 * @link https://developer.wordpress.org/reference/functions/get_terms/
    251251                 *
    252                  * @param array           $prepared_args Array of arguments to be
    253                  *                                       passed to get_terms().
     252                 * @param array           $prepared_args Array of arguments for get_terms().
    254253                 * @param WP_REST_Request $request       The REST API request.
    255254                 */
Note: See TracChangeset for help on using the changeset viewer.