年份短代码

Avatar of Chris Coyier
Chris Coyier

用于 functions.php 文件

function year_shortcode() {
  $year = date('Y');
  return $year;
}
add_shortcode('year', 'year_shortcode');

使用说明

在您的帖子中使用 [year]。