embed_thumbnail_id
Filters the thumbnail image ID for use in the embed template.
Использование
add_filter( 'embed_thumbnail_id', 'wp_kama_embed_thumbnail_id_filter' );
/**
* Function for `embed_thumbnail_id` filter-hook.
*
* @param int|false $thumbnail_id Attachment ID, or false if there is none.
*
* @return int|false
*/
function wp_kama_embed_thumbnail_id_filter( $thumbnail_id ){
// filter...
return $thumbnail_id;
}
- $thumbnail_id(int|false)
- Attachment ID, or false if there is none.
Список изменений
| С версии 4.9.0 | Введена. |
Где вызывается хук
embed_thumbnail_id
wp-includes/theme-compat/embed-content.php 32
$thumbnail_id = apply_filters( 'embed_thumbnail_id', $thumbnail_id );