PluginProbe
BeyondWords – AI audio for publishers / 4.2.4
BeyondWords – AI audio for publishers v4.2.4
7.1.0 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.7.0 All 43 releases
speechkit / src / Compatibility / Elementor / Controls / InspectText.php

InspectText.php in BeyondWords – AI audio for publishers 4.2.4, at src/Compatibility/Elementor/Controls/InspectText.php

90 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable PSR1.Methods.CamelCapsMethodName
3 // phpcs:disable WordPressVIPMinimum.TemplatingEngines.UnescapedOutputMustache.OutputNotation
4
5 namespace Beyondwords\Wordpress\Compatibility\Elementor\Controls;
6
7 use Elementor\Base_Data_Control;
8 use Elementor\Modules\DynamicTags\Module as TagsModule;
9
10 /**
11 * Elementor text control.
12 *
13 * A base control for creating text control. Displays a simple text input.
14 *
15 * @codeCoverageIgnore
16 *
17 * @since 3.10.0
18 */
19 class InspectText extends Base_Data_Control
20 {
21 /**
22 * Get text control type.
23 *
24 * Retrieve the control type, in this case `text`.
25 *
26 * @since 3.10.0
27 * @access public
28 *
29 * @return string Control type.
30 */
31 public function get_type()
32 {
33 return 'beyondwords_inspect_text';
34 }
35
36 /**
37 * Get text control default settings.
38 *
39 * Retrieve the default settings of the text control. Used to return the
40 * default settings while initializing the text control.
41 *
42 * @since 3.10.0
43 * @access protected
44 *
45 * @return array Control default settings.
46 */
47 protected function get_default_settings()
48 {
49 return [
50 'input_type' => 'text',
51 'placeholder' => '',
52 'title' => '',
53 'dynamic' => [
54 'categories' => [
55 TagsModule::TEXT_CATEGORY,
56 ],
57 ],
58 ];
59 }
60
61 /**
62 * Render text control output in the editor.
63 *
64 * Used to generate the control HTML in the editor using Underscore JS
65 * template. The variables for the class are available using `data` JS
66 * object.
67 *
68 * @since 3.10.0
69 * @access public
70 */
71 public function content_template()
72 {
73 // phpcs:disable
74 ?>
75 <div class="elementor-control-field">
76 <# if ( data.label ) {#>
77 <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label>
78 <# } #>
79 <div class="elementor-control-input-wrapper elementor-control-unit-5 elementor-control-dynamic-switcher-wrapper">
80 <input id="<?php $this->print_control_uid(); ?>" type="{{ data.input_type }}" readonly disabled class="tooltip-target elementor-control-tag-area" data-tooltip="{{ data.title }}" title="{{ data.title }}" data-setting="{{ data.name }}" placeholder="{{ view.getControlPlaceholder() }}" />
81 </div>
82 </div>
83 <# if ( data.description ) { #>
84 <div class="elementor-control-field-description">{{{ data.description }}}</div>
85 <# } #>
86 <?php
87 // phpcs:enable
88 }
89 }
90