WP_oEmbed::_add_provider_early()
Adds an oEmbed provider.
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.
Метод класса: WP_oEmbed{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = WP_oEmbed::_add_provider_early( $format, $provider, $regex );
- $format(строка) (обязательный)
- Format of URL that this provider can handle. You can use asterisks as wildcards.
- $provider(строка) (обязательный)
- The URL to the oEmbed provider..
- $regex(true|false)
- Whether the $format parameter is in a regex format.
По умолчанию: false
Заметки
- Смотрите: wp_oembed_add_provider()
Список изменений
С версии 4.0.0 | Введена. |
Код WP_oEmbed::_add_provider_early() WP oEmbed:: add provider early WP 6.6.2
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 ); }