PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.7
Elementor Website Builder – more than just a page builder v3.35.7
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / floating-buttons / classes / render / contact-buttons-core-render.php

contact-buttons-core-render.php in Elementor Website Builder – more than just a page builder 3.35.7, at modules/floating-buttons/classes/render/contact-buttons-core-render.php

64 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\FloatingButtons\Classes\Render;
4
5 /**
6 * Class Contact_Buttons_Core_Render.
7 *
8 * This class handles the rendering of the Contact Buttons widget for the core version.
9 *
10 * @since 3.23.0
11 */
12 class Contact_Buttons_Core_Render extends Contact_Buttons_Render_Base {
13
14 public function render(): void {
15 $this->build_layout_render_attribute();
16 $this->add_content_wrapper_render_attribute();
17
18 $content_classnames = 'e-contact-buttons__content';
19 $animation_duration = $this->settings['style_chat_box_animation_duration'];
20
21 if ( ! empty( $animation_duration ) ) {
22 $content_classnames .= ' has-animation-duration-' . $animation_duration;
23 }
24
25 $this->widget->add_render_attribute( 'content', [
26 'class' => $content_classnames,
27 ] );
28 ?>
29 <div <?php echo $this->widget->get_render_attribute_string( 'layout' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
30 <div <?php echo $this->widget->get_render_attribute_string( 'content-wrapper' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
31 <div <?php echo $this->widget->get_render_attribute_string( 'content' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
32 <?php
33 $this->render_top_bar();
34 $this->render_message_bubble();
35 $this->render_send_button();
36 ?>
37 </div>
38 </div>
39 <?php
40 $this->render_chat_button();
41 ?>
42 </div>
43 <?php
44 }
45
46 protected function add_layout_render_attribute( $layout_classnames ) {
47 $this->widget->add_render_attribute( 'layout', [
48 'class' => $layout_classnames,
49 'id' => $this->settings['advanced_custom_css_id'],
50 'data-document-id' => get_the_ID(),
51 'aria-role' => 'dialog',
52 ] );
53 }
54
55 protected function add_content_wrapper_render_attribute() {
56 $this->widget->add_render_attribute( 'content-wrapper', [
57 'aria-hidden' => 'true',
58 'aria-label' => __( 'Links window', 'elementor' ),
59 'class' => 'e-contact-buttons__content-wrapper hidden',
60 'id' => 'e-contact-buttons__content-wrapper',
61 ] );
62 }
63 }
64