W3cubDocs

/WordPress

rest_api_init()

Registers rewrite rules for the API.

Description

See also

Source

File: wp-includes/rest-api.php

function rest_api_init() {
	rest_api_register_rewrites();

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

Changelog

Version Description
4.4.0 Introduced.

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