Make WordPress Core


Ignore:
Timestamp:
11/11/2019 02:41:15 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of WP_Error.

See #48303.

File:
1 edited

Legend:

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

    r46626 r46696  
    8585     *
    8686     * @param WP_REST_Request $request Full details about the request.
    87      * @return WP_Error|true Boolean true if the attachment may be created, or a WP_Error if not.
     87     * @return true|WP_Error Boolean true if the attachment may be created, or a WP_Error if not.
    8888     */
    8989    public function create_item_permissions_check( $request ) {
     
    117117     *
    118118     * @param WP_REST_Request $request Full details about the request.
    119      * @return WP_Error|WP_REST_Response Response object on success, WP_Error object on failure.
     119     * @return WP_REST_Response|WP_Error Response object on success, WP_Error object on failure.
    120120     */
    121121    public function create_item( $request ) {
     
    275275     *
    276276     * @param WP_REST_Request $request Full details about the request.
    277      * @return WP_Error|WP_REST_Response Response object on success, WP_Error object on failure.
     277     * @return WP_REST_Response|WP_Error Response object on success, WP_Error object on failure.
    278278     */
    279279    public function update_item( $request ) {
     
    353353     *
    354354     * @param WP_REST_Request $request Request object.
    355      * @return WP_Error|stdClass $prepared_attachment Post object.
     355     * @return stdClass|WP_Error Post object.
    356356     */
    357357    protected function prepare_item_for_database( $request ) {
Note: See TracChangeset for help on using the changeset viewer.