Created
December 2, 2020 05:35
-
-
Save yousufansa/d0e63928ea647b47be7bf44b1420428d to your computer and use it in GitHub Desktop.
Vodi - Display Person Died on Single Person
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( ! function_exists( 'vodi_child_single_person_deathday' ) ) { | |
| /** | |
| * Person deathday in the single person. | |
| */ | |
| function vodi_child_single_person_deathday() { | |
| global $person; | |
| $deathday = $person->get_deathday(); | |
| if( ! empty( $deathday ) ) : | |
| $date = $deathday->getOffsetTimestamp(); | |
| $title = apply_filters( 'vodi_child_single_person_deathday_title_text', __( 'Died', 'masvideos' ) ); | |
| $format = apply_filters( 'vodi_child_single_person_deathday_format', 'd-m-Y' ); | |
| ?> | |
| <div class="single-person__deathday"> | |
| <h4 class="single-person__sidebar-title deathday-title"><?php echo esc_html( $title ); ?></h4> | |
| <?php echo date_i18n( $format, $date ); ?> | |
| </div> | |
| <?php | |
| endif; | |
| } | |
| } | |
| add_action( 'masvideos_template_single_person_content_sidebar', 'vodi_child_single_person_deathday', 55 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment