PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
← All changes | includes/page-availability-timeslots/availability_timeslots__page.php +15 -8 11.0 → 11.9 View file →
@@ -1,4 +1,4 @@
1 1 <?php
2 2 /**
3 3 * Time slots availability admin page.
4 4 *
@@ -8,8 +8,12 @@
8 8 if ( ! defined( 'ABSPATH' ) ) {
9 9 exit;
10 10 }
11 11
12 +if ( ! defined( 'WPBC_AVAILABILITY_TIMESLOTS_DEFAULT_DAYS_COUNT' ) ) {
13 + define( 'WPBC_AVAILABILITY_TIMESLOTS_DEFAULT_DAYS_COUNT', 30 );
14 +}
15 +
12 16 /**
13 17 * Check whether the reusable Time Slots Availability component is rendered on current admin page.
14 18 *
15 19 * @return bool
@@ -199,9 +203,9 @@
199 203 * @param int $days_count Number of days.
200 204 *
201 205 * @return array
202 206 */
203 -function wpbc_availability_timeslots__get_initial_rows( $start_ts, $days_count = 7 ) {
207 +function wpbc_availability_timeslots__get_initial_rows( $start_ts, $days_count = WPBC_AVAILABILITY_TIMESLOTS_DEFAULT_DAYS_COUNT ) {
204 208
205 209 $rows = array();
206 210 $days_count = max( 1, intval( $days_count ) );
207 211
@@ -322,9 +326,9 @@
322 326 'wrap_class' => 'wrap wpbc_ts_page wpdevelop',
323 327 'resource_id' => wpbc_get_default_resource(),
324 328 'resources' => null,
325 329 'start_ts' => strtotime( wp_date( 'Y-m-d 00:00:00' ) ),
326 - 'days_count' => 7,
330 + 'days_count' => WPBC_AVAILABILITY_TIMESLOTS_DEFAULT_DAYS_COUNT,
327 331 'visible_start_minutes' => 360,
328 332 'visible_end_minutes' => 1320,
329 333 'slot_step' => 15,
330 334 'show_toolbar' => true,
@@ -488,8 +492,9 @@
488 492 <span><i class="wpbc_ts_legend_available"></i><?php esc_html_e( 'Available', 'booking' ); ?></span>
489 493 <span><i class="wpbc_ts_legend_booked"><span class="wpbc_icn_lock"></span></i><?php esc_html_e( 'Booked', 'booking' ); ?></span>
490 494 <span><i class="wpbc_ts_legend_blocked"><span class="wpbc_icn_do_not_disturb_on"></span></i><?php esc_html_e( 'Blocked', 'booking' ); ?></span>
491 495 <span><i class="wpbc_ts_legend_unavailable_day"><span class="wpbc_icn_event_busy"></span></i><?php esc_html_e( 'Unavailable day', 'booking' ); ?></span>
496 + <span><i class="wpbc_ts_legend_working_time"><span class="wpbc-bi-clock-history"></span></i><?php esc_html_e( 'Outside working time', 'booking' ); ?></span>
492 497 <span><i class="wpbc_ts_legend_selected"></i><?php esc_html_e( 'Selected pending changes', 'booking' ); ?></span>
493 498 <span class="wpbc_ts_legend_note"><span class="wpbc_icn_info_outline"></span><?php esc_html_e( 'Booked slots and availability rules cannot be changed here.', 'booking' ); ?></span>
494 499 </div>
495 500 <?php endif; ?>
@@ -520,17 +525,18 @@
520 525 public function tabs() {
521 526
522 527 $tabs = array();
523 528 $tabs['time_slots_availability'] = array(
524 - 'is_show_top_path' => false,
529 + 'is_show_top_path' => true,
525 530 'right_vertical_sidebar__is_show' => true,
526 531 'right_vertical_sidebar__default_view_mode' => '',
527 532 'right_vertical_sidebar_compact__is_show' => true,
528 - 'left_navigation__default_view_mode' => 'compact',
529 - 'title' => __( 'Time Slots Availability', 'booking' ). // Title of TAB.
530 - '<span class="wpbc_new_label" style="margin-left: auto;">' . esc_html__( 'New', 'booking' ) . '</span>',
533 + 'left_navigation__default_view_mode' => '', // FixIn:11.7.1.1: 'compact',
534 + 'top_path_title' => __( 'Block Times', 'booking' ),
535 + 'title' => __( 'Block Times', 'booking' ), // Title of TAB.
536 + // . '<span class="wpbc_new_label" style="margin-left: auto;">' . esc_html__( 'New', 'booking' ) . '</span>',
531 537 'hint' => __( 'Flexible blocking time-slot ranges.', 'booking' ),
532 - 'page_title' => __( 'Time Slots Availability', 'booking' ),
538 + 'page_title' => __( 'Block Times', 'booking' ),
533 539 'link' => '',
534 540 'position' => '',
535 541 'css_classes' => '',
536 542 'icon' => '',
@@ -541,8 +547,9 @@
541 547 'disabled' => false,
542 548 'hided' => false,
543 549 'subtabs' => array(),
544 550 'folder_style' => 'order:92;',
551 + 'is_show_top_navigation' => true,
545 552 );
546 553
547 554 return $tabs;
548 555 }
@@ -570,9 +577,9 @@
570 577 'icon' => 'wpbc_icn_tune',
571 578 ),
572 579 ),
573 580 array(
574 - 'aria_label' => __( 'Time Slots Availability Panels', 'booking' ),
581 + 'aria_label' => __( 'Block Times Panels', 'booking' ),
575 582 'context' => 'time_slots_availability',
576 583 'class' => 'wpbc_ts_rightbar_tabs',
577 584 )
578 585 );