Automatisches Jahr Shortcode für Footer

Falls es ab einem bestimmten Datum angezeigt werden soll

PHP
add_filter("widget_text", "do_shortcode");

function year_site_title_shortcode()
{
    $year = date_i18n("Y");
    $site_title = get_bloginfo('name');
    $output = '<div class="copyright">' . '© ' . ' 2019 - ' . $year . ' ' . $site_title . '</div>';
    return $output;
}
add_shortcode("year_site_title", "year_site_title_shortcode");

Falls immer nur das aktuelle Jahr angezeigt werden soll

PHP
add_filter("widget_text", "do_shortcode");

function year_site_title_shortcode()
{
    $year = date_i18n("Y");
    $site_title = get_bloginfo('name');
    $output = '<div class="copyright">' . '© ' . $year . ' ' . $site_title . '</div>';
    return $output;
}
add_shortcode("year_site_title", "year_site_title_shortcode");