Include status selector for calendars

This commit is contained in:
Brian Miyaji
2014-04-27 18:32:40 +10:00
parent 07727cdecd
commit dbb63247fd
5 changed files with 46 additions and 5 deletions

View File

@@ -21,13 +21,17 @@ class SP_Calendar extends SP_Custom_Post {
public function data() {
global $pagenow;
$post_status = $this->status;
if ( ! $post_status )
$post_status = 'any';
$args = array(
'post_type' => 'sp_event',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => 'post_date',
'order' => 'ASC',
'post_status' => 'any',
'post_status' => $post_status,
'tax_query' => array(
'relation' => 'AND'
),