Make WordPress Core

Ticket #39759: updated-39759.patch

File updated-39759.patch, 548 bytes (added by Dency, 9 years ago)

updated code filter for the thumbnail_id

  • embed-content.php

     
    2121                if ( 'attachment' === get_post_type() && wp_attachment_is_image() ) {
    2222                        $thumbnail_id = get_the_ID();
    2323                }
    24 
     24        /**
     25         * Added filter for the embed_thumbnail_id
     26         */
     27        $thumbnail_id = apply_filters( 'embed_thumbnail_id', $thumbnail_id );
    2528                if ( $thumbnail_id ) {
    2629                        $aspect_ratio = 1;
    2730                        $measurements = array( 1, 1 );