Created
July 2, 2018 11:04
-
-
Save bluedognz/d9573f47ddb6e41e9df6f65f3109fbb5 to your computer and use it in GitHub Desktop.
[c] [y] shortcode returns copyright symbol and current year
This file contains 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
/** | |
* [y] Shortcode | |
* @return string Current Year in 4 digits | |
*/ | |
function bdw_current_year() { | |
$date = getdate(); | |
return $date['year']; | |
} | |
add_shortcode( 'y', 'bdw_current_year' ); | |
/** | |
* [c] Shortcode | |
* @return string Copyright symbol | |
*/ | |
function bdw_copyright() { | |
return '©'; | |
} | |
add_shortcode( 'c', 'bdw_copyright' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment