wp_oembed_register_route() WordPress Function

The wp_oembed_register_route function is used to register the oEmbed REST API route. This function is used to add the oEmbed endpoint to the WordPress REST API. The oEmbed endpoint allows for fetching information about a WordPress post using the post ID. This function is used to add the oEmbed route to the WordPress REST API.

wp_oembed_register_route() #

Registers the oEmbed REST API route.


Source

File: wp-includes/embed.php

function wp_oembed_register_route() {
	$controller = new WP_oEmbed_Controller();
	$controller->register_routes();
}

Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.