@@ -280,7 +280,7 @@ function mc_nav( $date, $format, $time, $show_months, $id, $site = false ) {
280
280
$ prev_link = '' ;
281
281
$ next_link = '' ;
282
282
if ( $ prev ) {
283
- $ prev_link = mc_build_url (
283
+ $ prev_link = mc_build_url (
284
284
array (
285
285
'yr ' => $ prev ['yr ' ],
286
286
'month ' => $ prev ['month ' ],
@@ -289,7 +289,7 @@ function mc_nav( $date, $format, $time, $show_months, $id, $site = false ) {
289
289
),
290
290
array ()
291
291
);
292
- $ prev_link = mc_url_in_loop ( $ prev_link );
292
+ $ prev_link = mc_url_in_loop ( $ prev_link );
293
293
/**
294
294
* Filter HTML output for navigation 'prev' link.
295
295
*
@@ -303,7 +303,7 @@ function mc_nav( $date, $format, $time, $show_months, $id, $site = false ) {
303
303
$ prev_link = apply_filters ( 'mc_previous_link ' , '<li class="my-calendar-prev"><a id="mc_previous_ ' . $ id . '" href=" ' . $ prev_link . '" rel="nofollow"> ' . wp_kses_post ( $ prev ['label ' ] ) . '</a></li> ' , $ prev );
304
304
}
305
305
if ( $ next ) {
306
- $ next_link = mc_build_url (
306
+ $ next_link = mc_build_url (
307
307
array (
308
308
'yr ' => $ next ['yr ' ],
309
309
'month ' => $ next ['month ' ],
@@ -312,7 +312,7 @@ function mc_nav( $date, $format, $time, $show_months, $id, $site = false ) {
312
312
),
313
313
array ()
314
314
);
315
- $ next_link = mc_url_in_loop ( $ next_link );
315
+ $ next_link = mc_url_in_loop ( $ next_link );
316
316
/**
317
317
* Filter HTML output for navigation 'next' link.
318
318
*
@@ -528,7 +528,7 @@ function mc_export_links( $y, $m, $next, $add, $subtract ) {
528
528
*
529
529
* @return array of parameters for link
530
530
*/
531
- function my_calendar_next_link ( $ date , $ format , $ time = 'month ' , $ months = 1 , $ site = false ) {
531
+ function my_calendar_next_link ( $ date , $ format , $ time = 'month ' , $ months = 1 , $ site = false ) {
532
532
$ bounds = mc_get_date_bounds ( $ site );
533
533
$ cur_year = (int ) $ date ['year ' ];
534
534
$ cur_month = (int ) $ date ['month ' ];
@@ -731,7 +731,7 @@ function my_calendar_prev_link( $date, $format, $time = 'month', $months = 1, $s
731
731
if ( strtotime ( $ bounds ['first ' ] ) > strtotime ( $ test_date ) ) {
732
732
$ output = false ;
733
733
} else {
734
- $ output = array (
734
+ $ output = array (
735
735
'month ' => $ month ,
736
736
'yr ' => $ yr ,
737
737
'day ' => $ day ,
@@ -1043,14 +1043,14 @@ function mc_date_switcher( $type = 'calendar', $cid = 'all', $time = 'month', $d
1043
1043
$ date_switcher .= "<option value=' $ i' " . selected ( $ test , $ c_month , false ) . '> ' . date_i18n ( 'F ' , mktime ( 0 , 0 , 0 , $ i , 1 ) ) . '</option> ' . "\n" ;
1044
1044
}
1045
1045
$ date_switcher .= '</select> ' . "\n" . $ day_switcher . ' <label class="maybe-hide" for=" ' . $ cid . '-year"> ' . __ ( 'Year ' , 'my-calendar ' ) . '</label> <select id=" ' . $ cid . '-year" name="yr"> ' . "\n" ;
1046
- // Query to identify oldest start date in the database.
1046
+ // Check first start date in the database.
1047
1047
$ bounds = mc_get_date_bounds ( $ site );
1048
1048
$ first = $ bounds ['first ' ];
1049
- $ first = ( '1970-01-01 00:00:00 ' === $ first ) ? '2000-01-01 ' : $ first ;
1050
- $ year1 = (int ) mc_date ( 'Y ' , strtotime ( $ first , false ) );
1051
- $ diff1 = (int ) mc_date ( 'Y ' ) - $ year1 ;
1052
- $ past = $ diff1 ;
1053
-
1049
+ $ first = ( '1970-01-01 00:00:00 ' === $ first ) ? '2000-01-01 ' : $ first ;
1050
+ $ year1 = (int ) mc_date ( 'Y ' , strtotime ( $ first , false ) );
1051
+ $ diff1 = (int ) mc_date ( 'Y ' ) - $ year1 ;
1052
+ $ past = $ diff1 ;
1053
+ // Check last end date.
1054
1054
$ last = $ bounds ['last ' ];
1055
1055
$ year2 = (int ) mc_date ( 'Y ' , strtotime ( $ last , false ) );
1056
1056
$ diff2 = $ year2 - (int ) mc_date ( 'Y ' );
0 commit comments