WP_oEmbed::_add_provider_early( string $format, string $provider, bool $regex = false )

Adds an oEmbed provider.


Description Description

The provider is added just-in-time when wp_oembed_add_provider() is called before the ‘plugins_loaded’ hook.

The just-in-time addition is for the benefit of the ‘oembed_providers’ filter.

See also See also


Top ↑

Parameters Parameters

$format

(string) (Required) Format of URL that this provider can handle. You can use asterisks as wildcards.

$provider

(string) (Required) The URL to the oEmbed provider..

$regex

(bool) (Optional) Whether the $format parameter is in a regex format.

Default value: false


Top ↑

Source Source

File: wp-includes/class-oembed.php

	public static function _add_provider_early( $format, $provider, $regex = false ) {
		if ( empty( self::$early_providers['add'] ) ) {
			self::$early_providers['add'] = array();
		}

		self::$early_providers['add'][ $format ] = array( $provider, $regex );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.