WordPress.org

Make WordPress Core

Changeset 49610


Ignore:
Timestamp:
11/16/2020 11:02:32 AM (10 months ago)
Author:
johnbillion
Message:

Docs: Corrections and improvements to inline docs relating to the REST API.

See #50768

Location:
trunk/src/wp-includes
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-oembed-controller.php

    r48526 r49610  
    1111 * oEmbed API endpoint controller.
    1212 *
    13  * Registers the API route and delivers the response data.
     13 * Registers the REST API route and delivers the response data.
    1414 * The output format (XML or JSON) is handled by the REST API.
    1515 *
  • trunk/src/wp-includes/rest-api.php

    r49536 r49610  
    131131 *                                          is 'null', the value cannot be set or updated. The function will be passed
    132132 *                                          the model object, like WP_Post.
    133  *     @type array|null $schema             Optional. The callback function used to create the schema for this field.
     133 *     @type array|null $schema             Optional. The schema for this field.
    134134 *                                          Default is 'null', no schema entry will be returned.
    135135 * }
     
    154154
    155155/**
    156  * Registers rewrite rules for the API.
     156 * Registers rewrite rules for the REST API.
    157157 *
    158158 * @since 4.4.0
     
    499499         * Filters the REST Server Class.
    500500         *
    501          * This filter allows you to adjust the server class used by the API, using a
     501         * This filter allows you to adjust the server class used by the REST API, using a
    502502         * different class to handle requests.
    503503         *
     
    510510
    511511        /**
    512          * Fires when preparing to serve an API request.
     512         * Fires when preparing to serve a REST API request.
    513513         *
    514514         * Endpoint objects should be created and register their hooks on this action rather
     
    803803
    804804/**
    805  * Filters the API response to include only a white-listed set of response object fields.
     805 * Filters the REST API response to include only a white-listed set of response object fields.
    806806 *
    807807 * @since 4.8.0
  • trunk/src/wp-includes/rest-api/class-wp-rest-response.php

    r47122 r49610  
    263263
    264264        /**
    265          * Filters extra CURIEs available on API responses.
     265         * Filters extra CURIEs available on REST API responses.
    266266         *
    267267         * CURIEs allow a shortened version of URI relations. This allows a more
     
    285285         * @since 4.5.0
    286286         *
    287          * @param array $additional Additional CURIEs to register with the API.
     287         * @param array $additional Additional CURIEs to register with the REST API.
    288288         */
    289289        $additional = apply_filters( 'rest_response_link_curies', array() );
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r49257 r49610  
    260260
    261261    /**
    262      * Handles serving an API request.
     262     * Handles serving a REST API request.
    263263     *
    264264     * Matches the current server URI to a route and runs the first matching
     
    287287             * This is done because for authentications such as Application
    288288             * Passwords, we don't want it to be accepted unless the current HTTP
    289              * request is an API request, which can't always be identified early
     289             * request is a REST API request, which can't always be identified early
    290290             * enough in evaluation.
    291291             */
     
    368368         * @since 4.4.0
    369369         * @deprecated 4.7.0 Use the {@see 'rest_authentication_errors'} filter to
    370          *                   restrict access to the API.
     370         *                   restrict access to the REST API.
    371371         *
    372372         * @param bool $rest_enabled Whether the REST API is enabled. Default true.
     
    450450
    451451        /**
    452          * Filters the API response.
     452         * Filters the REST API response.
    453453         *
    454454         * Allows modification of the response before returning.
     
    457457         * @since 4.5.0 Applied to embedded responses.
    458458         *
    459          * @param WP_HTTP_Response $result  Result to send to the client. Usually a WP_REST_Response.
     459         * @param WP_HTTP_Response $result  Result to send to the client. Usually a `WP_REST_Response`.
    460460         * @param WP_REST_Server   $this    Server instance.
    461461         * @param WP_REST_Request  $request Request used to generate the response.
     
    476476
    477477        /**
    478          * Filters whether the request has already been served.
     478         * Filters whether the REST API request has already been served.
    479479         *
    480480         * Allow sending the request manually - by returning true, the API result
     
    485485         * @param bool             $served  Whether the request has already been served.
    486486         *                                           Default false.
    487          * @param WP_HTTP_Response $result  Result to send to the client. Usually a WP_REST_Response.
     487         * @param WP_HTTP_Response $result  Result to send to the client. Usually a `WP_REST_Response`.
    488488         * @param WP_REST_Request  $request Request used to generate the response.
    489489         * @param WP_REST_Server   $this    Server instance.
     
    501501
    502502            /**
    503              * Filters the API response.
     503             * Filters the REST API response.
    504504             *
    505505             * Allows modification of the response data after inserting
     
    12491249
    12501250        /**
    1251          * Filters the API root index data.
     1251         * Filters the REST API root index data.
    12521252         *
    12531253         * This contains the data describing the API. This includes information
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php

    r49300 r49610  
    426426
    427427        /**
    428          * Filters a revision returned from the API.
     428         * Filters a revision returned from the REST API.
    429429         *
    430430         * Allows modification of the revision right before it is returned.
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r49303 r49610  
    11211121
    11221122        /**
    1123          * Filters a comment returned from the API.
     1123         * Filters a comment returned from the REST API.
    11241124         *
    11251125         * Allows modification of the comment right before it is returned.
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php

    r48526 r49610  
    242242
    243243        /**
    244          * Filters a post type returned from the API.
     244         * Filters a post type returned from the REST API.
    245245         *
    246246         * Allows modification of the post type data right before it is returned.
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php

    r47850 r49610  
    622622
    623623        /**
    624          * Filters a revision returned from the API.
     624         * Filters a revision returned from the REST API.
    625625         *
    626626         * Allows modification of the revision right before it is returned.
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r48840 r49610  
    829829
    830830        /**
    831          * Filters a term item returned from the API.
     831         * Filters a term item returned from the REST API.
    832832         *
    833833         * The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
Note: See TracChangeset for help on using the changeset viewer.