Make WordPress Core

Ticket #39030: 39030.1.diff

File 39030.1.diff, 833 bytes (added by NathanAtmoz, 7 years ago)

first pass at a patch

  • 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 4722565..9ca2a0c 100644
    a b function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = 
    122122         * Filters the post thumbnail size.
    123123         *
    124124         * @since 2.9.0
     125         * @since 4.9.0 Added the `$post` parameter
    125126         *
    126127         * @param string|array $size The post thumbnail size. Image size or array of width and height
    127128         *                           values (in that order). Default 'post-thumbnail'.
     129         * @param WP_Post      $post The post object
    128130         */
    129         $size = apply_filters( 'post_thumbnail_size', $size );
     131        $size = apply_filters( 'post_thumbnail_size', $size, $post );
    130132
    131133        if ( $post_thumbnail_id ) {
    132134