Registers rewrite rules for the REST API.
Description
See also
Source
function rest_api_init() {
rest_api_register_rewrites();
global $wp;
$wp->add_query_var( 'rest_route' );
}
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |
Registers rewrite rules for the REST API.
function rest_api_init() {
rest_api_register_rewrites();
global $wp;
$wp->add_query_var( 'rest_route' );
}
Uses | Description |
---|---|
rest_api_register_rewrites()wp-includes/rest-api.php | Adds REST rewrite rules. |
WP::add_query_var()wp-includes/class-wp.php | Adds a query variable to the list of public query variables. |
Version | Description |
---|---|
4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.