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-controller.php

    r47328 r47391  
    4343     *
    4444     * @since 4.7.0
     45     *
     46     * @see register_rest_route()
    4547     */
    4648    public function register_routes() {
     
    5860     * @since 4.7.0
    5961     *
    60      * @param WP_REST_Request $request Full data about the request.
     62     * @param WP_REST_Request $request Full details about the request.
    6163     * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
    6264     */
     
    7577     * @since 4.7.0
    7678     *
    77      * @param WP_REST_Request $request Full data about the request.
     79     * @param WP_REST_Request $request Full details about the request.
    7880     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    7981     */
     
    9294     * @since 4.7.0
    9395     *
    94      * @param WP_REST_Request $request Full data about the request.
     96     * @param WP_REST_Request $request Full details about the request.
    9597     * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
    9698     */
     
    109111     * @since 4.7.0
    110112     *
    111      * @param WP_REST_Request $request Full data about the request.
     113     * @param WP_REST_Request $request Full details about the request.
    112114     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    113115     */
     
    126128     * @since 4.7.0
    127129     *
    128      * @param WP_REST_Request $request Full data about the request.
     130     * @param WP_REST_Request $request Full details about the request.
    129131     * @return true|WP_Error True if the request has access to create items, WP_Error object otherwise.
    130132     */
     
    143145     * @since 4.7.0
    144146     *
    145      * @param WP_REST_Request $request Full data about the request.
     147     * @param WP_REST_Request $request Full details about the request.
    146148     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    147149     */
     
    160162     * @since 4.7.0
    161163     *
    162      * @param WP_REST_Request $request Full data about the request.
     164     * @param WP_REST_Request $request Full details about the request.
    163165     * @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise.
    164166     */
     
    177179     * @since 4.7.0
    178180     *
    179      * @param WP_REST_Request $request Full data about the request.
     181     * @param WP_REST_Request $request Full details about the request.
    180182     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    181183     */
     
    194196     * @since 4.7.0
    195197     *
    196      * @param WP_REST_Request $request Full data about the request.
     198     * @param WP_REST_Request $request Full details about the request.
    197199     * @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
    198200     */
     
    211213     * @since 4.7.0
    212214     *
    213      * @param WP_REST_Request $request Full data about the request.
     215     * @param WP_REST_Request $request Full details about the request.
    214216     * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    215217     */
Note: See TracChangeset for help on using the changeset viewer.