rest_api_init()WP 4.4.0

Registers rewrite rules for the REST API.

No Hooks.

Return

null. Nothing (null).

Usage

rest_api_init();

Notes

Changelog

Since 4.4.0 Introduced.

rest_api_init() code WP 6.6.2

function rest_api_init() {
	rest_api_register_rewrites();

	global $wp;
	$wp->add_query_var( 'rest_route' );
}