Make WordPress Core

Changeset 41565


Ignore:
Timestamp:
09/22/2017 05:34:24 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Embeds: Introduce embed_thumbnail_id filter for thumbnail image ID in the embed template.

Props ketuchetan, Dency, jontyravi, Ov3rfly.
Fixes #39759.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme-compat/embed-content.php

    r37988 r41565  
    2222            $thumbnail_id = get_the_ID();
    2323        }
     24
     25        /**
     26         * Filters the thumbnail image ID for use in the embed template.
     27         *
     28         * @since 4.9.0
     29         *
     30         * @param int $thumbnail_id Attachment ID.
     31         */
     32        $thumbnail_id = apply_filters( 'embed_thumbnail_id', $thumbnail_id );
    2433
    2534        if ( $thumbnail_id ) {
Note: See TracChangeset for help on using the changeset viewer.