wphooks.info - embed_thumbnail_id

embed_thumbnail_id

(trunk - 5.0-alpha-42177)

*** New in trunk ***

The hook occurs in the following file:

wp-includes/theme-compat/embed-content.php:
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
			$thumbnail_id = get_the_ID();
		}

		/**
		 * Filters the thumbnail image ID for use in the embed template.
		 *
		 * @since 4.9.0
		 *
		 * @param int $thumbnail_id Attachment ID.
		 */
		$thumbnail_id = apply_filters( 'embed_thumbnail_id', $thumbnail_id );

		if ( $thumbnail_id ) {
			$aspect_ratio = 1;
			$measurements = array( 1, 1 );
			$image_size   = 'full'; // Fallback.

			$meta = wp_get_attachment_metadata( $thumbnail_id );
			if ( ! empty( $meta['sizes'] ) ) {
				foreach ( $meta['sizes'] as $size => $data ) {