// [current_year] auto update year anywhere shortcodes can be used

// [current_year] auto updates for footer
function current_year_shortcode() {
    // Get the current year
    $current_year = date('Y');

    // Return the year inside a span
    return '<span class="current-year">' . $current_year . '</span>';
}
add_shortcode('current_year', 'current_year_shortcode');