Embeds: Introduce embed_thumbnail_id
filter for thumbnail image ID in the embed template.
Props ketuchetan, Dency, jontyravi, Ov3rfly. Fixes #39759. git-svn-id: https://develop.svn.wordpress.org/trunk@41565 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
af90dd0682
commit
fa9892a8a3
@ -22,6 +22,15 @@
|
||||
$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 );
|
||||
|
Loading…
Reference in New Issue
Block a user