wp_oembed_remove_provider() WordPress Function

The wp_oembed_remove_provider() function removes an oEmbed provider.

wp_oembed_remove_provider( string $format ) #

Removes an oEmbed provider.


Description

Top ↑

See also


Top ↑

Parameters

$format

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


Top ↑

Return

(bool) Was the provider removed successfully?


Top ↑

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;
}


Top ↑

Changelog

Changelog
VersionDescription
3.5.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.