Skip to content

Commit 9d7752e

Browse files
Twenty Nineteen: Document the twentynineteen_can_show_post_thumbnail filter.
Follow-up to [43808]. Props pmbaldha, sabernhardt, kishanjasani, mukesh27. Fixes #63645. git-svn-id: https://develop.svn.wordpress.org/trunk@61062 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7d826c0 commit 9d7752e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/wp-content/themes/twentynineteen/inc/helper-functions.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@
1111
* Determines if post thumbnail can be displayed.
1212
*/
1313
function 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

1726
/**

0 commit comments

Comments
 (0)