Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

change the number of years in the dropdown for The Events Calendar

View change-number-years.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?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
Something went wrong with that request. Please try again.