Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created December 2, 2020 05:28
Show Gist options
  • Select an option

  • Save yousufansa/9d7cfe655f7edb50e7f112feae40a1ce to your computer and use it in GitHub Desktop.

Select an option

Save yousufansa/9d7cfe655f7edb50e7f112feae40a1ce to your computer and use it in GitHub Desktop.
Vodi - Single Person Birthday Date Showing Previous Date Fix
if ( ! function_exists( 'masvideos_template_single_person_birthday' ) ) {
/**
* Person birthday in the single person.
*/
function masvideos_template_single_person_birthday() {
global $person;
$birthday = $person->get_birthday();
if( ! empty( $birthday ) ) :
$date = $birthday->getOffsetTimestamp();
$title = apply_filters( 'masvideos_template_single_person_birthday_title_text', __( 'Birthday', 'masvideos' ) );
$format = apply_filters( 'masvideos_template_single_person_birthday_format', 'd-m-Y' );
?>
<div class="single-person__birthday">
<h4 class="single-person__sidebar-title birthday-title"><?php echo esc_html( $title ); ?></h4>
<?php echo date_i18n( $format, $date ); ?>
</div>
<?php
endif;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment