Fix absolute date ranges not applying to secondary post types
This commit is contained in:
@@ -85,18 +85,12 @@ class SP_Calendar extends SP_Secondary_Post {
|
|||||||
|
|
||||||
if ( $this->relative ) {
|
if ( $this->relative ) {
|
||||||
|
|
||||||
if ( ! $this->past )
|
|
||||||
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
|
$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 );
|
$this->future = get_post_meta( $this->ID, 'sp_date_future', true );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ( ! $this->from )
|
|
||||||
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
|
$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 );
|
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,15 +56,11 @@ class SP_League_Table extends SP_Secondary_Post {
|
|||||||
|
|
||||||
if ( $this->relative ) {
|
if ( $this->relative ) {
|
||||||
|
|
||||||
if ( ! $this->past )
|
|
||||||
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
|
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ( ! $this->from )
|
|
||||||
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
|
$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 );
|
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,15 +64,11 @@ class SP_Player_List extends SP_Secondary_Post {
|
|||||||
|
|
||||||
if ( $this->relative ) {
|
if ( $this->relative ) {
|
||||||
|
|
||||||
if ( ! $this->past )
|
|
||||||
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
|
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ( ! $this->from )
|
|
||||||
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
|
$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 );
|
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user