wp_oembed_remove_provider( string $format ): bool
Removes an oEmbed provider.
Contents
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
.
View all references
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. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Removes the WordPress TV provider
Top ↑
Feedback
This is an old comment doesn’t appear to be accurate any more. The $format parameter is a regular expression string and must exactly match what’s in class-wp-oembed.php. In the example given, the format string is:
"#https?://wordpress\.tv/.*#i"
— By Chad Cloman —