PluginProbe ʕ •ᴥ•ʔ
LatePoint – Calendar Booking Plugin for Appointments and Events / 5.1.9
LatePoint – Calendar Booking Plugin for Appointments and Events v5.1.9
5.6.6 5.6.5 5.6.4 5.6.3 5.6.2 5.6.1 5.6.0 5.5.2 5.5.1 5.5.0 5.4.2 trunk 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.91 5.1.92 5.1.93 5.1.94 5.2.0 5.2.1 5.2.10 5.2.11 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1
latepoint / blocks / bricks / bricks_widget_calendar.php
latepoint / blocks / bricks Last commit date
bricks_widget_book_button.php 1 year ago bricks_widget_book_form.php 1 year ago bricks_widget_calendar.php 1 year ago bricks_widget_customer_dashboard.php 1 year ago bricks_widget_customer_login.php 1 year ago bricks_widget_list_of_resources.php 1 year ago
bricks_widget_calendar.php
92 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 class Latepoint_Bricks_Widget_Calendar extends \Bricks\Element {
8
9 public $category = 'latepoint';
10 public $name = 'latepoint_calendar';
11 public $icon = 'ti-calendar';
12
13
14 public function get_label(): string {
15 return esc_html__( 'Latepoint Calendar', 'latepoint' );
16 }
17
18 public function set_controls() {
19 $this->controls['_width']['default'] = '100%';
20
21 $this->controls['date'] = [
22 'tab' => 'content',
23 'label' => esc_html__( 'Date', 'latepoint' ),
24 'type' => 'datepicker',
25 'inline' => true,
26 'options' => [
27 'enableTime' => false,
28 'time_24hr' => true
29 ]
30 ];
31
32 $this->controls['show_agents'] = [
33 'tab' => 'content',
34 'label' => esc_html__( 'Show Agents', 'latepoint' ),
35 'type' => 'select',
36 'options' => OsBricksHelper::get_data('agents'),
37 'placeholder' => esc_html__( 'Select Agents', 'latepoint' ),
38 'multiple' => true,
39 'searchable' => true,
40 'clearable' => true,
41 ];
42
43 $this->controls['show_services'] = [
44 'tab' => 'content',
45 'label' => esc_html__( 'Show Services', 'latepoint' ),
46 'type' => 'select',
47 'options' => OsBricksHelper::get_data('services'),
48 'placeholder' => esc_html__( 'Select Services', 'latepoint' ),
49 'multiple' => true,
50 'searchable' => true,
51 'clearable' => true,
52 ];
53
54 $this->controls['show_locations'] = [
55 'tab' => 'content',
56 'label' => esc_html__( 'Show Locations', 'latepoint' ),
57 'type' => 'select',
58 'options' => OsBricksHelper::get_data('locations'),
59 'placeholder' => esc_html__( 'Select Locations', 'latepoint' ),
60 'multiple' => true,
61 'searchable' => true,
62 'clearable' => true,
63 ];
64
65 $this->controls['view'] = [
66 'tab' => 'content',
67 'label' => esc_html__( 'View', 'latepoint' ),
68 'type' => 'select',
69 'options' => [
70 'month' => esc_html__( 'Month', 'latepoint' ),
71 'week' => esc_html__( 'Week', 'latepoint' ),
72 ],
73 'placeholder' => esc_html__( 'Month', 'latepoint' ),
74 'default' => 'month',
75 ];
76 }
77
78
79 // Render element HTML
80 public function render() {
81 $allowed_params = [
82 'date',
83 'show_services',
84 'show_agents',
85 'show_locations',
86 'view'
87 ];
88
89 $params = OsBlockHelper::attributes_to_data_params($this->settings, $allowed_params);
90 echo do_shortcode('[latepoint_calendar ' . $params . ']');
91 }
92 }