wp_oembed_register_route

Registers the oEmbed REST API route.

Description

wp_oembed_register_route(); 

Usage

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

Defined (1)

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

/wp-includes/embed.php  
  1. function wp_oembed_register_route() { 
  2. $controller = new WP_oEmbed_Controller(); 
  3. $controller->register_routes();