Make WordPress Core

Changeset 61062


Ignore:
Timestamp:
10/25/2025 10:50:46 PM (3 weeks ago)
Author:
SergeyBiryukov
Message:

Twenty Nineteen: Document the twentynineteen_can_show_post_thumbnail filter.

Follow-up to [43808].

Props pmbaldha, sabernhardt, kishanjasani, mukesh27.
Fixes #63645.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/inc/helper-functions.php

    r59090 r61062  
    1212 */
    1313function twentynineteen_can_show_post_thumbnail() {
    14     return apply_filters( 'twentynineteen_can_show_post_thumbnail', ! post_password_required() && ! is_attachment() && has_post_thumbnail() );
     14    $show_post_thumbnail = ! post_password_required() && ! is_attachment() && has_post_thumbnail();
     15
     16    /**
     17     * Filters whether to show post thumbnail.
     18     *
     19     * @since Twenty Nineteen 1.0
     20     *
     21     * @param bool $show_post_thumbnail Whether to show post thumbnail.
     22     */
     23    return apply_filters( 'twentynineteen_can_show_post_thumbnail', $show_post_thumbnail );
    1524}
    1625
Note: See TracChangeset for help on using the changeset viewer.