rest_api_init() WordPress Function
The rest_api_init() function enables the REST API for a Wordpress site. This function is typically called by the Wordpress core in the early stages of loading.
rest_api_init() #
Registers rewrite rules for the REST 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' );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |