simply-code/storage/snippets/current-year.php

10 lines
165 B
PHP

<?php
// Current year shortcode
if (!defined('ABSPATH')) exit;
function current_year() {
return date('Y');
}
add_shortcode( 'year', 'current_year' );