From cd87efd6e840c28ee35d9d11257c13d2f4634c49 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Mon, 24 Oct 2016 16:22:25 +0300 Subject: [PATCH] parse the year properly, restore a simplified schedule-config --- page-schedule.php | 17 +---------------- page-speakers.php | 11 +---------- schedule-config.php | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 26 deletions(-) create mode 100644 schedule-config.php diff --git a/page-schedule.php b/page-schedule.php index 43adda0..1de0b7c 100644 --- a/page-schedule.php +++ b/page-schedule.php @@ -3,22 +3,7 @@ get_header(); wp_nav_menu( array( 'theme_location' => 'footer-schedule', 'container_class' => 'content subnav cf' ) ); - -$requirePath = __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR; -require $requirePath . 'class.SmartCurl.php'; -require $requirePath . 'config.php'; -require $requirePath . 'load.php'; -require $requirePath . 'parse.php'; -$sched_config = getSchedConfig(date('Y')); -$data = loadData($sched_config); - -if ( preg_match('/^workshop/', $pagename) ) { - $sched_config['filterEventType'] = "workshop"; -} else { - $sched_config['filterEventType'] = "lecture"; -} -$content = parseData($sched_config, $data); - +require("schedule-config.php"); ?>
diff --git a/page-speakers.php b/page-speakers.php index 59cb7ac..c4b33d9 100644 --- a/page-speakers.php +++ b/page-speakers.php @@ -3,16 +3,7 @@ get_header(); wp_nav_menu( array( 'theme_location' => 'footer-schedule', 'container_class' => 'content subnav cf' ) ); -$requirePath = __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR; -require $requirePath . 'class.SmartCurl.php'; -require $requirePath . 'config.php'; -require $requirePath . 'load.php'; -require $requirePath . 'parse.php'; -$sched_config = getSchedConfig(date('Y')); -$data = loadData($sched_config); - -$content = parseData($sched_config, $data); - +require("schedule-config.php"); ?>
diff --git a/schedule-config.php b/schedule-config.php new file mode 100644 index 0000000..b1e08df --- /dev/null +++ b/schedule-config.php @@ -0,0 +1,21 @@ +