oembed_fetch_url хук-фильтрWP 2.9.0

Filters the oEmbed URL to be fetched.

Использование

add_filter( 'oembed_fetch_url', 'wp_kama_oembed_fetch_url_filter', 10, 3 );

/**
 * Function for `oembed_fetch_url` filter-hook.
 * 
 * @param string $provider URL of the oEmbed provider.
 * @param string $url      URL of the content to be embedded.
 * @param array  $args     Optional. Additional arguments for retrieving embed HTML. See wp_oembed_get() for accepted arguments.
 *
 * @return string
 */
function wp_kama_oembed_fetch_url_filter( $provider, $url, $args ){

	// filter...
	return $provider;
}
$provider(строка)
URL of the oEmbed provider.
$url(строка)
URL of the content to be embedded.
$args(массив)
Optional. Additional arguments for retrieving embed HTML. See wp_oembed_get() for accepted arguments.
По умолчанию: ''

Список изменений

С версии 2.9.0 Введена.
С версии 4.9.0 The dnt (Do Not Track) query parameter was added to all oEmbed provider URLs.

Где вызывается хук

WP_oEmbed::fetch()
oembed_fetch_url
wp-includes/class-wp-oembed.php 543
$provider = apply_filters( 'oembed_fetch_url', $provider, $url, $args );

Где используется хук в WordPress

Использование не найдено.