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 +14 -8 11.2 → 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,
@@ -521,17 +525,18 @@
521 525 public function tabs() {
522 526
523 527 $tabs = array();
524 528 $tabs['time_slots_availability'] = array(
525 - 'is_show_top_path' => false,
529 + 'is_show_top_path' => true,
526 530 'right_vertical_sidebar__is_show' => true,
527 531 'right_vertical_sidebar__default_view_mode' => '',
528 532 'right_vertical_sidebar_compact__is_show' => true,
529 - 'left_navigation__default_view_mode' => 'compact',
530 - 'title' => __( 'Time Slots Availability', 'booking' ). // Title of TAB.
531 - '<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>',
532 537 'hint' => __( 'Flexible blocking time-slot ranges.', 'booking' ),
533 - 'page_title' => __( 'Time Slots Availability', 'booking' ),
538 + 'page_title' => __( 'Block Times', 'booking' ),
534 539 'link' => '',
535 540 'position' => '',
536 541 'css_classes' => '',
537 542 'icon' => '',
@@ -542,8 +547,9 @@
542 547 'disabled' => false,
543 548 'hided' => false,
544 549 'subtabs' => array(),
545 550 'folder_style' => 'order:92;',
551 + 'is_show_top_navigation' => true,
546 552 );
547 553
548 554 return $tabs;
549 555 }
@@ -571,9 +577,9 @@
571 577 'icon' => 'wpbc_icn_tune',
572 578 ),
573 579 ),
574 580 array(
575 - 'aria_label' => __( 'Time Slots Availability Panels', 'booking' ),
581 + 'aria_label' => __( 'Block Times Panels', 'booking' ),
576 582 'context' => 'time_slots_availability',
577 583 'class' => 'wpbc_ts_rightbar_tabs',
578 584 )
579 585 );