FriendlyWP
10/26/2013 - 12:54 AM

Shortcode to insert current year.

Shortcode to insert current year.

/* SHORTCODE WHICH INSERTS CURRENT YEAR
 * usage: [year]
*/
add_shortcode('year', 'year_shortcode');
function year_shortcode() {
  $year = date('Y');
  return $year;
}