Skip to content

Commit c4cb50a

Browse files
committed
Don't reset start of week when hiding weekends.
With the previous code simplifications, causes problems.
1 parent 828e486 commit c4cb50a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/my-calendar-output.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,10 +1844,9 @@ function my_calendar( $args ) {
18441844
$body .= mc_get_event( $mc_id, 'html' );
18451845
}
18461846
} else {
1847-
$end_of_week = ( 1 === (int) $start_of_week ) ? 7 : 6;
1848-
$start_of_week = ( $show_weekends ) ? $start_of_week : 1;
1849-
$date = mc_get_current_date( $main_class, $cid, $params );
1850-
$current = $date['current_date'];
1847+
$end_of_week = ( 1 === (int) $start_of_week ) ? 7 : 6;
1848+
$date = mc_get_current_date( $main_class, $cid, $params );
1849+
$current = $date['current_date'];
18511850

18521851
if ( is_numeric( $months ) && $months <= 12 && $months > 0 ) {
18531852
$show_months = absint( $months );

0 commit comments

Comments
 (0)