$this->year, 'booked' => array(), ), $args ) ); global $wp_locale; // Get details of todays date... $current_month = get_the_time( 'n' ); $current_year = get_the_time( 'Y' ); // Set the classes assigned to the calendar... $year_classes = array( 'wp-availability', 'year-' . $current_year ); if ( $current_year == $year ) { $year_classes[] = 'year-current'; } else if ( $current_year - 1 == $year ) { $year_classes[] = 'year-previous'; } else if ( $current_year + 1 == $year ) { $year_classes[] = 'year-next'; } ?>
get_month( $month ); // Set the classes assigned to this month... $month_classes = array( 'wp-availability-month', 'month-' . $month, 'month-' . strtolower( $wp_locale->get_month_abbrev( $month_name ) ) ); if ( $current_month == $month ) { $month_classes[] = 'month-current'; } else if ( $current_month - 1 == $month ) { $month_classes[] = 'month-previous'; } else if ( $current_month + 1 == $month ) { $month_classes[] = 'month-next'; } ?>
get_weekday( ( $wdcount + $week_begins ) % 7 ); } ?> ( $last_day + $starts - 1 ) ) { $day = null; $day_class = 'wp-availability-disabled'; } else { $day = ( $grid - $starts ) + 1; $day_class = 'day-'.$day; if ( isset( $booked[$month] ) && array_key_exists( $day, $booked[$month] ) ) { $available = false; $day_class .= ' wp-availability-booked'; } } ?> >
get_weekday_initial( $day ) ); ?>