Display the Current Year with this WordPress Shortcode

With this simple shortcode, you can display the current year in any shortcode-enabled text area. This includes typical Post/Page content, Text Widgets, HTML Widgets, Thesis Text Boxes, the Thesis Attribution Box, Focus Cards, Modular Content, and most content areas served by WordPress plugins.

Simply add this custom PHP to your working environment, and then you can use the [current_year] shortcode to output the current year wherever you want!

add_shortcode('current_year', 'shortcode_current_year');

function shortcode_current_year() {
	return date('Y');
}