Make WordPress Core


Ignore:
Timestamp:
07/02/2021 07:02:13 PM (3 years ago)
Author:
desrosj
Message:

Docs: List the expected type first instead of WP_Error in some REST API methods added in 5.8.

Follow-up to [46696], [49929], [50995], [51021].

Props SergeyBiryukov.
Merges [51286] to the 5.8 branch.
See #52628, #53461.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

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

    r51311 r51316  
    5858     * @param WP_REST_Request $request Full details about the request.
    5959     *
    60      * @return WP_Error|bool True if the request has permission, WP_Error object otherwise.
     60     * @return true|WP_Error True if the request has permission, WP_Error object otherwise.
    6161     */
    6262    public function get_items_permissions_check( $request ) {
     
    8585     * @param WP_REST_Request $request Full details about the request.
    8686     *
    87      * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     87     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    8888     */
    8989    public function get_items( $request ) {
Note: See TracChangeset for help on using the changeset viewer.