Enable selecting date from widgets

This commit is contained in:
Brian Miyaji
2014-06-18 23:17:34 +10:00
parent 51b115377e
commit 96786dc365
5 changed files with 46 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
* @version 0.8
* @version 1.1
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -13,6 +13,7 @@ $primary_result = get_option( 'sportspress_primary_result', null );
$defaults = array(
'status' => 'default',
'date' => 'default',
'number' => -1,
'link_teams' => get_option( 'sportspress_calendar_link_teams', 'no' ) == 'yes' ? true : false,
'paginated' => get_option( 'sportspress_calendar_paginated', 'yes' ) == 'yes' ? true : false,
@@ -26,6 +27,8 @@ extract( $defaults, EXTR_SKIP );
$calendar = new SP_Calendar( $id );
if ( $status != 'default' )
$calendar->status = $status;
if ( $date != 'default' )
$calendar->date = $date;
if ( $order != 'default' )
$calendar->order = $order;
$data = $calendar->data();