WordPress.org

Make WordPress Core

Ticket #23983: 23983.2.patch

File 23983.2.patch, 814 bytes (added by sebastian.pisula, 3 years ago)
  • wp-includes/post-thumbnail-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    3636        if ( ! $post ) {
    3737                return '';
    3838        }
    39         return get_post_meta( $post->ID, '_thumbnail_id', true );
     39
     40        /**
     41         * Filters the post thumbnail ID.
     42         *
     43         * @since 4.8.0
     44         *
     45         * @param string  $post_thumbnail_id The post thumbnail ID.
     46         * @param WP_Post $post              The post object.
     47         */
     48        return (int) apply_filters( 'post_thumbnail_id', get_post_meta( $post->ID, '_thumbnail_id', true ), $post );
    4049}
    4150
    4251/**