-
-
Save jo-snips/2004707 to your computer and use it in GitHub Desktop.
The Events Calendar: change the number of years in the dropdown for The Events Calendar
This file contains 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 | |
/** | |
* this is lines 563-573 of /lib/tribe-view-helpers.class.php | |
*/ | |
private static function years( ) { | |
$year = ( int )date_i18n( 'Y' ); | |
// Back two years, forward 5 | |
$year_list = array( $year - 1, $year, $year + 1, $year + 2, $year + 3, $year + 4, $year + 5 ); | |
$years = array(); | |
foreach( $year_list as $single_year ) { | |
$years[ $single_year ] = $single_year; | |
} | |
return $years; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment