Created
November 21, 2013 18:03
-
-
Save nathanielks/7586505 to your computer and use it in GitHub Desktop.
tribe_get_the_day_link bug. Line 16 in old.php was attributing $date_description to 'next day' as opposed to comparing that it was true. It also wasn't feeding date on line 19 a unix timestamp.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get the date for the day navigation link | |
* | |
* @param string $date_description | |
* @return string | |
* @since 3.1.1 | |
* @throws OverflowException | |
*/ | |
function tribe_get_the_day_link_date( $date_description ) { | |
if ( is_null($date_description) ) { | |
return TribeEventsPro::instance()->todaySlug; | |
} | |
if ( $date_description == 'previous day' ) { | |
return tribe_get_previous_day_date(get_query_var('start_date')); | |
} | |
if ( $date_description == 'next day' ) { | |
return tribe_get_next_day_date(get_query_var('start_date')); | |
} | |
return date('Y-m-d', strtotime($date_description) ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get the date for the day navigation link | |
* | |
* @param string $date_description | |
* @return string | |
* @since 3.1.1 | |
* @throws OverflowException | |
*/ | |
function tribe_get_the_day_link_date( $date_description ) { | |
if ( is_null($date_description) ) { | |
return TribeEventsPro::instance()->todaySlug; | |
} | |
if ( $date_description == 'previous day' ) { | |
return tribe_get_previous_day_date(get_query_var('start_date')); | |
} | |
if ( $date_description = 'next day' ) { | |
return tribe_get_next_day_date(get_query_var('start_date')); | |
} | |
return date('Y-m-d', $date_description); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks