Skip to content

Commit

Permalink
Change $details to boolean false if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed May 11, 2024
1 parent 751410e commit fe10a9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/templates/legacy-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ function mc_legacy_template_draw_event( $event, $type, $process_date, $time, $te
$template = apply_filters( 'mc_use_custom_template', $template, $tags, $event, $type, $process_date, $time );
if ( false === $details ) {
$details = wp_kses_post( mc_get_details( $tags, $template, $type ) );
// Set details to false if it has no content.
$details = ( '' === trim( strip_tags( $details ) ) ) ? false : $details;
}
}

Expand Down

0 comments on commit fe10a9b

Please sign in to comment.