WordPress at a glance

wp_oembed_add_provider() WP 1.0

Adds a URL format and oEmbed provider URL pair.

No Hooks.


null. Nothing.


wp_oembed_add_provider( $format, $provider, $regex );
$format(string) (required)
The format of URL that this provider can handle. You can use asterisks as wildcards.
$provider(string) (required)
The URL to the oEmbed provider.
Whether the $format parameter is in a RegEx format.
Default: false



Since 2.9.0 Introduced.

Code of wp_oembed_add_provider() WP 5.7.2

function wp_oembed_add_provider( $format, $provider, $regex = false ) {
	if ( did_action( 'plugins_loaded' ) ) {
		$oembed                       = _wp_oembed_get_object();
		$oembed->providers[ $format ] = array( $provider, $regex );
	} else {
		WP_oEmbed::_add_provider_early( $format, $provider, $regex );

From tag: oEmbed (WP response to embed request)

More from category: Other

No comments
    Log In