Changeset 47122 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php
r47034 r47122 91 91 } 92 92 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 ); 94 98 } 95 99 … … 136 140 137 141 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 ); 139 147 } 140 148 … … 142 150 143 151 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 ); 145 157 } 146 158 … … 186 198 187 199 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 ); 189 205 } 190 206 … … 335 351 336 352 $this->schema = $schema; 353 337 354 return $this->add_additional_fields_schema( $this->schema ); 338 355 }
Note: See TracChangeset
for help on using the changeset viewer.