rest_api_init

Registers rewrite rules for the API.

Description

rest_api_init(); 

Usage

  1. if ( !function_exists( 'rest_api_init' ) ) { 
  2. require_once ABSPATH . WPINC . '/rest-api.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = rest_api_init(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/rest-api.php  
  1. function rest_api_init() { 
  2.  
  3. global $wp; 
  4. $wp->add_query_var( 'rest_route' );