W3cubDocs

/WordPress

WP_REST_Server::set_status( int $code )

Sends an HTTP status code.

Parameters

$code

(int) (Required) HTTP status.

Source

File: wp-includes/rest-api/class-wp-rest-server.php

protected function set_status( $code ) {
		status_header( $code );
	}

Changelog

Version Description
4.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_server/set_status