WordPress.org

Make WordPress Core

Ticket #23983: 23983.patch

File 23983.patch, 548 bytes (added by gilbitron, 5 years ago)
  • wp-includes/post-thumbnail-template.php

     
    3131 */
    3232function get_post_thumbnail_id( $post_id = null ) {
    3333        $post_id = ( null === $post_id ) ? get_the_ID() : $post_id;
    34         return get_post_meta( $post_id, '_thumbnail_id', true );
     34        return apply_filters( 'post_thumbnail_id', get_post_meta( $post_id, '_thumbnail_id', true ), $post_id );
    3535}
    3636
    3737/**