sfw_rest_success

Description

Create a rest response

Since: 1.0.0

For further information see: WP_REST_Response

Code

<?php function sfw_rest_success( $message = '', $status = 200 ){ 
	 … 
 } ?>

Parameter

$message
(string) Any message describing what was done

Default: ''

$status
(integer) A status indicating a succesful request

Default: 200

Return

(WP_REST_Response)

File

core/includes/functions-wp-rest.php