Created
July 13, 2021 19:25
-
-
Save jorpdesigns/d5166affc578e972d5803630a65bcf7e to your computer and use it in GitHub Desktop.
Shortcode that returns current 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
<?php | |
add_shortcode( 'current_year', 'current_year' ); | |
function current_year() { | |
return date("Y"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment