Fix absolute date ranges not applying to secondary post types
This commit is contained in:
@@ -85,19 +85,13 @@ 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 );
|
||||
$this->past = get_post_meta( $this->ID, 'sp_date_past', true );
|
||||
$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 );
|
||||
$this->from = get_post_meta( $this->ID, 'sp_date_from', true );
|
||||
$this->to = get_post_meta( $this->ID, 'sp_date_to', true );
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user