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_customer_dashboard.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | class Latepoint_Bricks_Widget_Customer_Dashboard extends \Bricks\Element { |
| 8 | |
| 9 | public $category = 'latepoint'; |
| 10 | public $name = 'latepoint_customer_dashboard'; |
| 11 | public $icon = 'ti-blackboard'; |
| 12 | |
| 13 | |
| 14 | public function get_label(): string { |
| 15 | return esc_html__( 'Customer Dashboard', 'latepoint' ); |
| 16 | } |
| 17 | |
| 18 | public function set_controls() { |
| 19 | $this->controls['_width']['default'] = '100%'; |
| 20 | |
| 21 | $this->controls['hide_new_appointment_ui'] = array( |
| 22 | 'tab' => 'content', |
| 23 | 'label' => esc_html__( 'Hide New Appointment UI', 'latepoint' ), |
| 24 | 'type' => 'checkbox', |
| 25 | 'inline' => true, |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | |
| 30 | // Render element HTML |
| 31 | public function render() { |
| 32 | $allowed_params = [ |
| 33 | 'hide_new_appointment_ui' |
| 34 | ]; |
| 35 | |
| 36 | $params = OsBlockHelper::attributes_to_data_params($this->settings, $allowed_params); |
| 37 | |
| 38 | echo do_shortcode('[latepoint_customer_dashboard ' . $params . ']'); |
| 39 | } |
| 40 | } |