Created
October 26, 2013 00:54
-
-
Save FriendlyWP/7164021 to your computer and use it in GitHub Desktop.
Shortcode to insert 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
/* SHORTCODE WHICH INSERTS CURRENT YEAR | |
* usage: [year] | |
*/ | |
add_shortcode('year', 'year_shortcode'); | |
function year_shortcode() { | |
$year = date('Y'); | |
return $year; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment