Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace josh\api\error;
- class response extends \WP_REST_Response{
- public function __construct( $data, $status, array $headers ) {
- parent::__construct( $data, $status, $headers );
- if( empty( $data ) ){
- $this->set_status( 404 );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement