Get schedule year from blog slug

This commit is contained in:
Vencislav Atanasov 2023-10-16 20:58:57 +03:00
parent a0b6b4f6d9
commit 43f83c1ca4
1 changed files with 1 additions and 2 deletions

View File

@ -5,8 +5,7 @@ require $requirePath . 'config.php';
require $requirePath . 'load.php'; require $requirePath . 'load.php';
require $requirePath . 'parse.php'; require $requirePath . 'parse.php';
$siteurl = get_option('siteurl'); $year = get_blog_slug();
$year = preg_replace('%.*/([0-9]*)$%', '\1', $siteurl);
$sched_config = getSchedConfig($year); $sched_config = getSchedConfig($year);