Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

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

    r47034 r47122  
    9191            }
    9292
    93             return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to manage post statuses.' ), array( 'status' => rest_authorization_required_code() ) );
     93            return new WP_Error(
     94                'rest_cannot_view',
     95                __( 'Sorry, you are not allowed to manage post statuses.' ),
     96                array( 'status' => rest_authorization_required_code() )
     97            );
    9498        }
    9599
     
    136140
    137141        if ( empty( $status ) ) {
    138             return new WP_Error( 'rest_status_invalid', __( 'Invalid status.' ), array( 'status' => 404 ) );
     142            return new WP_Error(
     143                'rest_status_invalid',
     144                __( 'Invalid status.' ),
     145                array( 'status' => 404 )
     146            );
    139147        }
    140148
     
    142150
    143151        if ( ! $check ) {
    144             return new WP_Error( 'rest_cannot_read_status', __( 'Cannot view status.' ), array( 'status' => rest_authorization_required_code() ) );
     152            return new WP_Error(
     153                'rest_cannot_read_status',
     154                __( 'Cannot view status.' ),
     155                array( 'status' => rest_authorization_required_code() )
     156            );
    145157        }
    146158
     
    186198
    187199        if ( empty( $obj ) ) {
    188             return new WP_Error( 'rest_status_invalid', __( 'Invalid status.' ), array( 'status' => 404 ) );
     200            return new WP_Error(
     201                'rest_status_invalid',
     202                __( 'Invalid status.' ),
     203                array( 'status' => 404 )
     204            );
    189205        }
    190206
     
    335351
    336352        $this->schema = $schema;
     353
    337354        return $this->add_additional_fields_schema( $this->schema );
    338355    }
Note: See TracChangeset for help on using the changeset viewer.