Add blocks layout to calendar close #22

This commit is contained in:
Brian Miyaji
2014-04-28 01:38:03 +10:00
parent bb8169f139
commit 24f95d75b6
20 changed files with 292 additions and 46 deletions

View File

@@ -15,6 +15,9 @@ class SP_Calendar extends SP_Custom_Post {
/** @var array The events status. */
public $status;
/** @var array The events order. */
public $order;
/**
* __construct function.
*
@@ -31,9 +34,13 @@ class SP_Calendar extends SP_Custom_Post {
endif;
$this->status = $this->__get( 'status' );
$this->order = $this->__get( 'order' );
if ( ! $this->status )
$this->status = 'any';
if ( ! $this->order )
$this->order = 'ASC';
}
/**
@@ -49,8 +56,8 @@ class SP_Calendar extends SP_Custom_Post {
'post_type' => 'sp_event',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'post_date',
'order' => 'ASC',
'orderby' => 'date',
'order' => $this->order,
'post_status' => $this->status,
'tax_query' => array(
'relation' => 'AND'