PluginProbe
Booking Calendar / 11.2
Booking Calendar v11.2
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 10.11 10.11.2 All 203 releases
booking / includes / elementor-booking-form / controls / elementor_go_button.php

elementor_go_button.php in Booking Calendar 11.2, at includes/elementor-booking-form/controls/elementor_go_button.php

63 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Elementor WPBC_Elementor_Go_Button_Control control.
5 *
6 * A control for displaying Go Button.
7 *
8 * @since 1.0.0
9 */
10 class WPBC_Elementor_Go_Button_Control extends \Elementor\Base_Data_Control {
11
12 /**
13 * Get wpbc_go_button control type.
14 *
15 * Retrieve the control type, in this case `go_form_field`.
16 *
17 * @return string Control type.
18 * @since 1.0.0
19 * @access public
20 */
21 public function get_type(): string {
22 return 'wpbc_go_button';
23 }
24
25
26 /**
27 * Render go_form_field control output in the editor.
28 *
29 * Used to generate the control HTML in the editor using Underscore JS
30 * template. The variables for the class are available using `data` JS
31 * object.
32 *
33 * @since 1.0.0
34 * @access public
35 */
36 public function content_template(): void {
37 $control_uid = $this->get_control_uid();
38 ?>
39 <div class="elementor-control-field elementor-control-button">
40 <div class="elementor-button-wrapper">
41 <button
42 class="elementor-button <# if ( data.css_class ) { #>{{{data.css_class}}}<# } #>"
43 type="button"
44 <# if ( data.url ) { #>
45 onclick="javascript:window.location.href ='{{{data.url}}}';"
46 <# } #>
47 ><# if ( data.icon ) { #>
48 <span>{{{ data.text }}}</span>
49 <# }
50 if ( data.icon ) { #>
51 <i class="{{{ data.icon }}}" aria-hidden="true"></i>
52 <# } #></button>
53 </div>
54 </div>
55
56 <# if ( data.description ) { #>
57 <div class="elementor-control-field-description">{{{ data.description }}}</div>
58 <# } #>
59 <?php
60 }
61 }
62
63