Make WordPress Core


Ignore:
Timestamp:
02/28/2020 12:29:53 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for WP_REST_Attachments_Controller.

This adds a missing DocBlock for ::register_routes() and parameter descriptions for ::post_process_item().

Includes minor documenation fixes in other REST API classes for consistency.

Props dkarfa, mukesh27, SergeyBiryukov.
Fixes #48841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php

    r47297 r47391  
    1717class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
    1818
     19    /**
     20     * Registers the routes for attachments.
     21     *
     22     * @since 5.3.0
     23     *
     24     * @see register_rest_route()
     25     */
    1926    public function register_routes() {
    2027        parent::register_routes();
     
    345352     * @since 5.3.0
    346353     *
    347      * @param WP_REST_Request $request
    348      * @return WP_REST_Response|WP_Error
     354     * @param WP_REST_Request $request Full details about the request.
     355     * @return WP_REST_Response|WP_Error Response object on success, WP_Error object on failure.
    349356     */
    350357    public function post_process_item( $request ) {
Note: See TracChangeset for help on using the changeset viewer.