WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wp_filter_pre_oembed_result() WP 4.5.3

Filters the oEmbed result before any HTTP requests are made.

If the URL belongs to the current site, the result is fetched directly instead of going through the oEmbed discovery process.

Хуков нет.

Возвращает

null/Строку. The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. Null if the URL does not belong to the current site.

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

wp_filter_pre_oembed_result( $result, $url, $args );
$result(null/строка) (обязательный)
The UNSANITIZED (and potentially unsafe) HTML that should be used to embed.
По умолчанию: null
$url(строка) (обязательный)
The URL that should be inspected for discovery <link> tags.
$args(массив) (обязательный)
oEmbed remote get arguments.

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

С версии 4.5.3 Введена.

Код wp filter pre oembed result: wp-includes/embed.php WP 5.2.2

<?php
function wp_filter_pre_oembed_result( $result, $url, $args ) {
	$data = get_oembed_response_data_for_url( $url, $args );

	if ( $data ) {
		return _wp_oembed_get_object()->data2html( $data, $url );
	}

	return $result;
}