W3cubDocs

/WordPress

wp_oembed_remove_provider( string $format )

Removes an oEmbed provider.

Description

See also

Parameters

$format

(string) (Required) The URL format for the oEmbed provider to remove.

Return

(bool) Was the provider removed successfully?

Source

File: wp-includes/embed.php

function wp_oembed_remove_provider( $format ) {
	if ( did_action( 'plugins_loaded' ) ) {
		$oembed = _wp_oembed_get_object();

		if ( isset( $oembed->providers[ $format ] ) ) {
			unset( $oembed->providers[ $format ] );
			return true;
		}
	} else {
		WP_oEmbed::_remove_provider_early( $format );
	}

	return false;
}

Changelog

Version Description
3.5.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_oembed_remove_provider