Skip to content

Commit d7efb28

Browse files
Twenty Twenty: Fix twentytwenty_get_post_meta to return output from action hooks when no default meta exists
1 parent a50e061 commit d7efb28

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/wp-content/themes/twentytwenty/inc/template-tags.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,8 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
524524
$meta_output = ob_get_clean();
525525

526526
// If there is meta to output, return it.
527-
if ( $has_meta && $meta_output ) {
527+
$meta_output_inner = trim( strip_tags( $meta_output ) );
528+
if ( ( $has_meta || '' !== $meta_output_inner ) && $meta_output ) {
528529

529530
return $meta_output;
530531

0 commit comments

Comments
 (0)