WordPress at a glance
function is not described

rest_api_init() WP 4.4.0

Registers rewrite rules for the API.

  • See: rest_api_register_rewrites()
  • Global. WP. $wp Current WordPress environment instance.

No Hooks.

Return

Nothing (null).

Usage

rest_api_init();

Code of rest api init: wp-includes/rest-api.php WP 5.2.2

<?php
function rest_api_init() {
	rest_api_register_rewrites();

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