Created
July 3, 2020 14:28
-
-
Save farookibrahim/cb4c76c1b52a799b4d5140f0944b2fa8 to your computer and use it in GitHub Desktop.
Vodi - Display Full Date in Movie Meta instead of Year
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( 'masvideos_template_single_movie_release_year' ) ) { | |
| function masvideos_template_single_movie_release_year() { | |
| global $movie; | |
| $relaese_year = ''; | |
| $release_date = $movie->get_movie_release_date(); | |
| if( ! empty( $release_date ) ) { | |
| $relaese_year = date( 'j F Y', strtotime( $release_date ) ); | |
| } | |
| if( ! empty ( $relaese_year ) ) { | |
| echo sprintf( '<span class="movie__meta--release-year">%s</span>', $relaese_year ); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment