parse the year properly, restore a simplified schedule-config
This commit is contained in:
parent
dd8e76cb76
commit
cd87efd6e8
|
@ -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");
|
||||
|
||||
?>
|
||||
<section class="content grid">
|
||||
|
|
|
@ -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");
|
||||
|
||||
?>
|
||||
<section class="content grid">
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
$requirePath = __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR;
|
||||
require $requirePath . 'class.SmartCurl.php';
|
||||
require $requirePath . 'config.php';
|
||||
require $requirePath . 'load.php';
|
||||
require $requirePath . 'parse.php';
|
||||
|
||||
$siteurl = get_option('siteurl');
|
||||
$year = preg_replace('%.*/([0-9]*)$%', '\1', $siteurl);
|
||||
|
||||
$sched_config = getSchedConfig($year);
|
||||
|
||||
$data = loadData($sched_config);
|
||||
|
||||
if ( preg_match('/^workshop/', $pagename) ) {
|
||||
$sched_config['filterEventType'] = "workshop";
|
||||
} else {
|
||||
$sched_config['filterEventType'] = "lecture";
|
||||
}
|
||||
$content = parseData($sched_config, $data);
|
||||
|
Loading…
Reference in New Issue