Embeds: Introduce `embed_thumbnail_id` filter for thumbnail image ID in the embed template.
Props ketuchetan, Dency, jontyravi, Ov3rfly. Fixes #39759. Built from https://develop.svn.wordpress.org/trunk@41565 git-svn-id: http://core.svn.wordpress.org/trunk@41398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5046ef73c3
commit
f69b784ec7
|
@ -22,6 +22,15 @@
|
||||||
$thumbnail_id = get_the_ID();
|
$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 ) {
|
if ( $thumbnail_id ) {
|
||||||
$aspect_ratio = 1;
|
$aspect_ratio = 1;
|
||||||
$measurements = array( 1, 1 );
|
$measurements = array( 1, 1 );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9-alpha-41564';
|
$wp_version = '4.9-alpha-41565';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue