embed_thumbnail_image_size filter-hookWP 4.4.0

Filters the thumbnail image size for use in the embed template.

Usage

add_filter( 'embed_thumbnail_image_size', 'wp_kama_embed_thumbnail_image_size_filter', 10, 2 );

/**
 * Function for `embed_thumbnail_image_size` filter-hook.
 * 
 * @param string $image_size   Thumbnail image size.
 * @param int    $thumbnail_id Attachment ID.
 *
 * @return string
 */
function wp_kama_embed_thumbnail_image_size_filter( $image_size, $thumbnail_id ){

	// filter...
	return $image_size;
}
$image_size(string)
Thumbnail image size.
$thumbnail_id(int)
Attachment ID.

Changelog

Since 4.4.0 Introduced.
Since 4.5.0 Added $thumbnail_id parameter.

Where the hook is called

In file: /wp-includes/theme-compat/embed-content.php
embed_thumbnail_image_size
wp-includes/theme-compat/embed-content.php 59
$image_size = apply_filters( 'embed_thumbnail_image_size', $image_size, $thumbnail_id );

Where the hook is used in WordPress

Usage not found.