embed_cache_oembed_types filter-hookWP 2.9.0

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

Usage

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.
Default: post types with show_ui set to true

Changelog

Since 2.9.0 Introduced.

Where the hook is called

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 );

Where the hook is used in WordPress

Usage not found.