You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: src/endpoints/class-papi-rest-api-options-controller.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ public function delete_option( WP_REST_Request $request ) {
24
24
return (object) ['deleted' => true];
25
25
}
26
26
27
-
returnnewWP_Error( 'papi_delete_option_error', __( 'Delete option value did not work. The property may not be found', 'papi-rest-api' ), ['status' => 500] );
27
+
returnnewWP_Error( 'papi_delete_option_error', __( 'Delete option value did not work. The property may not be found.', 'papi-rest-api' ), ['status' => 500] );
28
28
}
29
29
30
30
/**
@@ -37,7 +37,7 @@ public function delete_option( WP_REST_Request $request ) {
returnnewWP_Error( 'papi_cannot_delete_option', __( 'Sorry, you are not allowed to delete the option value', 'papi-rest-api' ), ['status' => 403] );
40
+
returnnewWP_Error( 'papi_cannot_delete_option', __( 'Sorry, you are not allowed to delete the option value.', 'papi-rest-api' ), ['status' => rest_authorization_required_code()] );
@@ -189,7 +189,7 @@ public function update_option( WP_REST_Request $request ) {
189
189
return$this->get_option_property( $request );
190
190
}
191
191
192
-
returnnewWP_Error( 'papi_update_option_error', __( 'Update option value did not work. The property may not be found', 'papi-rest-api' ), ['status' => 500] );
192
+
returnnewWP_Error( 'papi_update_option_error', __( 'Update option value did not work. The property may not be found.', 'papi-rest-api' ), ['status' => 500] );
193
193
}
194
194
195
195
/**
@@ -202,7 +202,7 @@ public function update_option( WP_REST_Request $request ) {
returnnewWP_Error( 'papi_cannot_update_option', __( 'Sorry, you are not allowed to update the option value', 'papi-rest-api' ), ['status' => 403] );
205
+
returnnewWP_Error( 'papi_cannot_update_option', __( 'Sorry, you are not allowed to update the option value.', 'papi-rest-api' ), ['status' => rest_authorization_required_code()] );
0 commit comments