Fix absolute date ranges not applying to secondary post types

This commit is contained in:
Brian Miyaji
2017-11-15 22:47:10 +11:00
parent 9312cc0bdd
commit db885ccc20
3 changed files with 10 additions and 24 deletions

View File

@@ -85,18 +85,12 @@ class SP_Calendar extends SP_Secondary_Post {
if ( $this->relative ) {
if ( ! $this->past )
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
if ( ! $this->future )
$this->future = get_post_meta( $this->ID, 'sp_date_future', true );
} else {
if ( ! $this->from )
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
if ( ! $this->to )
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
}

View File

@@ -56,15 +56,11 @@ class SP_League_Table extends SP_Secondary_Post {
if ( $this->relative ) {
if ( ! $this->past )
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
} else {
if ( ! $this->from )
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
if ( ! $this->to )
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
}

View File

@@ -64,15 +64,11 @@ class SP_Player_List extends SP_Secondary_Post {
if ( $this->relative ) {
if ( ! $this->past )
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
} else {
if ( ! $this->from )
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
if ( ! $this->to )
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
}