wphooks.info - embed_cache_oembed_types

embed_cache_oembed_types

(trunk - 5.0-alpha-43293)

The hook occurs in the following file:

wp-includes/class-wp-embed.php:
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
		$post = get_post( $post_ID );

		$post_types = get_post_types( array( 'show_ui' => true ) );
		/**
		 * Filters the array of post types to cache oEmbed results for.
		 *
		 * @since 2.9.0
		 *
		 * @param string[] $post_types Array of post type names to cache oEmbed results for. Defaults to post types with `show_ui` set to true.
		 */
		if ( empty( $post->ID ) || ! in_array( $post->post_type, apply_filters( 'embed_cache_oembed_types', $post_types ) ) ) {
			return;
		}

		// Trigger a caching
		if ( ! empty( $post->post_content ) ) {
			$this->post_ID  = $post->ID;
			$this->usecache = false;

			$content = $this->run_shortcode( $post->post_content );