Make WordPress Core

Ticket #40547: 40547.patch

File 40547.patch, 1.1 KB (added by ibenic, 9 years ago)

40547 - Patch with filter

  • src/wp-includes/post-thumbnail-template.php

    diff --git a/src/wp-includes/post-thumbnail-template.php b/src/wp-includes/post-thumbnail-template.php
    index 5aa8beb..4722565 100644
    a b function get_the_post_thumbnail_url( $post = null, $size = 'post-thumbnail' ) { 
    192192        if ( ! $post_thumbnail_id ) {
    193193                return false;
    194194        }
    195 
    196         $thumbnail_url = wp_get_attachment_image_url( $post_thumbnail_id, $size );
    197 
    198         /**
    199          * Filters the post thumbnail URL
    200          *
    201          * @since 4.8.0
    202          *
    203          * @param string                $thumbnail_url          The post thumbnail URL.
    204          * @param int                   $post_id                        The post ID.
    205          * @param int                   $post_thumbnail_id  The post thumbnail ID.
    206          * @param string|array  $size                           The post thumbnail size. Image size or array of width and height
    207          *                                          values (in that order). Default 'post-thumbnail'.
    208          */
    209         return apply_filters( 'get_the_post_thumbnail_url', $thumbnail_url, $post->ID, $post_thumbnail_id, $size );
     195        return wp_get_attachment_image_url( $post_thumbnail_id, $size );
    210196}
    211197
    212198/**