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

Filters the array of post types to cache oEmbed results for.

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

add_filter( 'embed_cache_oembed_types', 'wp_kama_embed_cache_oembed_types_filter' );

/**
 * Function for `embed_cache_oembed_types` filter-hook.
 * 
 * @param string[] $post_types Array of post type names to cache oEmbed results for.
 *
 * @return string[]
 */
function wp_kama_embed_cache_oembed_types_filter( $post_types ){

	// filter...
	return $post_types;
}
$post_types(string[])
Array of post type names to cache oEmbed results for.
По умолчанию: post types with show_ui set to true

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

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

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

WP_Embed::cache_oembed()
embed_cache_oembed_types
wp-includes/class-wp-embed.php 416
$cache_oembed_types = apply_filters( 'embed_cache_oembed_types', $post_types );

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

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