Make WordPress Core

Ticket #44859: 44859.diff

File 44859.diff, 752 bytes (added by rzen, 8 years ago)
  • wp-includes/post-thumbnail-template.php

     
    2323 * @return bool Whether the post has an image attached.
    2424 */
    2525function has_post_thumbnail( $post = null ) {
    26         return (bool) get_post_thumbnail_id( $post );
     26        /**
     27         * Filters the response for whether a post has an image attached.
     28         *
     29         * @since 5.0.0
     30         *
     31         * @param bool $has_thumbnail True if post has an image attached, otherwise false.
     32         * @param int  $post_id       The post ID.
     33         */
     34        return (bool) apply_filters( 'has_post_thumbnail', get_post_thumbnail_id( $post ), $post );
    2735}
    2836
    2937/**