rest_api_init()WP 4.4.0

Registers rewrite rules for the REST API.

No Hooks.

Return

null. Nothing.

Usage

rest_api_init();

Notes

Changelog

Since 4.4.0 Introduced.

Code of rest_api_init() WP 6.0

function rest_api_init() {
	rest_api_register_rewrites();

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