PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.11.84
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.11.84
4.11.84 4.11.83 4.11.82 4.11.80 4.11.81 4.11.79 4.11.78 4.11.77 4.11.76 4.11.75 3.20.5 4.11.69 3.20.6 4.11.7 3.20.7 4.11.70 3.20.8 4.11.71 3.20.9 4.11.72 3.21.1 4.11.73 3.21.2 4.11.74 3.21.3 4.11.8 3.21.4 4.11.9 3.21.5 4.2.0 3.21.6 4.2.1 3.3.0 4.2.2 3.3.1 4.2.3 3.3.2 4.2.4 3.3.3 4.2.5 3.3.4 4.2.6 3.3.5 4.2.7 3.3.6 4.2.8 3.3.7 4.2.9 3.3.8 4.3.0 3.3.9 4.3.1 3.4.0 4.3.2 3.4.1 4.3.3 3.4.2 4.3.4 3.4.3 4.3.5 3.4.4 4.3.6 3.4.5 4.3.7 3.4.6 4.3.8 3.4.7 4.3.9 3.4.8 4.4.0 3.4.9 4.4.1 3.5.0 4.4.2 3.5.1 4.4.3 3.5.2 4.4.4 3.5.3 4.4.5 3.5.4 4.4.6 3.5.5 4.4.7 3.5.6 4.4.8 3.5.7 4.4.9 3.5.8 4.5.0 3.5.9 4.5.1 3.6.0 4.5.2 3.6.1 4.5.3 3.6.2 4.5.4 3.6.3 4.5.5 3.6.4 4.5.6 3.6.5 4.5.7 3.6.6 4.5.8 3.6.7 4.5.9 3.6.8 4.6.0 3.6.9 4.6.1 3.7.0 4.7.0 3.7.1 4.7.1 3.7.2 4.7.2 3.7.3 4.7.3 3.7.4 4.7.4 3.7.5 4.7.5 3.7.6 4.7.6 3.7.7 4.7.7 3.7.8 4.7.8 3.7.9 4.7.9 3.8.0 4.8.0 3.8.1 4.8.1 3.8.2 4.8.10 3.8.3 4.8.11 3.8.4 4.8.2 3.8.5 4.8.3 3.8.6 4.8.4 3.8.7 4.8.5 3.8.8 4.8.6 3.8.9 4.8.7 3.9.0 4.8.8 3.9.1 4.8.9 3.9.2 4.9.0 3.9.3 4.9.0-beta1 3.9.4 4.9.0-beta2 3.9.5 4.9.1 3.9.6 4.9.10 3.9.7 4.9.11 3.9.8 4.9.12 3.9.9 4.9.13 4.0.1 4.9.14 4.0.3 4.9.15 4.0.4 4.9.16 4.0.5 4.9.17 4.0.6 4.9.18 4.0.7 4.9.19 4.0.8 4.9.2 4.0.9 4.9.20 4.1.0 4.9.21 4.1.1 4.9.22 4.1.2 4.9.23 4.1.3 4.9.24 trunk 4.1.4 4.9.25 1.0 4.1.5 4.9.26 1.01 4.1.6 4.9.27 1.02 4.1.7 4.9.28 1.03 4.1.8 4.9.29 1.04 4.1.9 4.9.3 1.05 4.10.0 4.9.30 1.06 4.10.1 4.9.31 1.07 4.10.10 4.9.32 1.08 4.10.11 4.9.33 1.09 4.10.12 4.9.34 2.0 4.10.13 4.9.35 2.0.1 4.10.14 4.9.36 2.0.2 4.10.15 4.9.37 2.0.3 4.10.16 4.9.38 2.0.4 4.10.17 4.9.39 2.0.5 4.10.18 4.9.4 2.0.6 4.10.19 4.9.40 2.0.7 4.10.2 4.9.41 2.0.8 4.10.20 4.9.42 2.0.9 4.10.21 4.9.43 2.1.0 4.10.22 4.9.45 2.1.1 4.10.23 4.9.46 2.1.2 4.10.24 4.9.47 2.1.3 4.10.25 4.9.48 2.1.4 4.10.26 4.9.49 2.1.5 4.10.27 4.9.5 2.1.5-beta1 4.10.28 4.9.50 2.1.6 4.10.29 4.9.51 2.1.7 4.10.3 4.9.52 2.1.8 4.10.30 4.9.53 2.1.9 4.10.31 4.9.54 2.2.0 4.10.32 4.9.55 2.2.1 4.10.33 4.9.56 2.2.2 4.10.34 4.9.57 2.2.3 4.10.35 4.9.6 2.2.4 4.10.36 4.9.7 2.2.5 4.10.37 4.9.8 2.2.6 4.10.38 4.9.9 2.2.7 4.10.39 2.2.8 4.10.4 2.2.9 4.10.40 2.3.0 4.10.41 2.3.1 4.10.42 2.3.2 4.10.43 2.3.3 4.10.44 2.3.4 4.10.45 2.3.5 4.10.46 2.3.6 4.10.47 2.3.7 4.10.48 2.3.8 4.10.49 2.3.9 4.10.5 2.4.0 4.10.50 2.4.1 4.10.51 2.5.0 4.10.52 2.5.1 4.10.53 2.5.2 4.10.54 2.5.3 4.10.55 2.5.4 4.10.56 2.5.5 4.10.57 2.5.6 4.10.58 2.5.7 4.10.59 2.5.8 4.10.6 2.5.9 4.10.60 2.6.0 4.10.61 2.6.1 4.10.62 2.6.2 4.10.63 2.6.3 4.10.64 2.6.4 4.10.65 2.6.5 4.10.66 2.6.6 4.10.67 2.6.7 4.10.68 2.6.8 4.10.69 2.6.9 4.10.7 2.7.0 4.10.70 2.7.1 4.10.71 2.7.2 4.10.72 2.7.3 4.10.73 2.7.4 4.10.74 2.7.5 4.10.75 2.7.6 4.10.76 2.7.7 4.10.77 2.7.8 4.10.78 2.7.9 4.10.79 2.8.0 4.10.8 2.8.1 4.10.80 2.8.2 4.10.81 2.8.3 4.10.82 2.8.4 4.10.83 2.8.5 4.10.84 2.8.6 4.10.85 2.8.7 4.10.86 2.8.8 4.10.87 2.8.9 4.10.88 2.9.0 4.10.89 2.9.1 4.10.9 2.9.2 4.10.90 2.9.3 4.11.0 2.9.4 4.11.1 2.9.5 4.11.10 2.9.6 4.11.11 2.9.7 4.11.12 2.9.8 4.11.13 2.9.9 4.11.14 3.0.0 4.11.15 3.0.1 4.11.16 3.0.2 4.11.17 3.0.3 4.11.18 3.0.4 4.11.19 3.0.5 4.11.2 3.0.6 4.11.20 3.0.7 4.11.21 3.0.8 4.11.22 3.0.9 4.11.23 3.1.0 4.11.24 3.1.1 4.11.25 3.1.2 4.11.26 3.1.3 4.11.27 3.1.4 4.11.28 3.1.5 4.11.29 3.1.6 4.11.3 3.1.7 4.11.30 3.1.8 4.11.31 3.1.9 4.11.32 3.10.0 4.11.33 3.10.1 4.11.34 3.10.2 4.11.35 3.10.3 4.11.36 3.10.4 4.11.37 3.10.5 4.11.38 3.10.6 4.11.39 3.10.7 4.11.4 3.10.8 4.11.40 3.10.9 4.11.41 3.11.0 4.11.42 3.11.1 4.11.43 3.11.2 4.11.44 3.11.3 4.11.45 3.11.4 4.11.46 3.11.5 4.11.47 3.11.6 4.11.48 3.11.7 4.11.49 3.11.8 4.11.5 3.11.9 4.11.50 3.12.0 4.11.51 3.12.1 4.11.52 3.12.2 4.11.53 3.12.3 4.11.54 3.2.0 4.11.55 3.2.1 4.11.56 3.2.2 4.11.57 3.2.3 4.11.58 3.2.4 4.11.59 3.2.5 4.11.6 3.2.6 4.11.60 3.2.7 4.11.61 3.2.8 4.11.62 3.2.9 4.11.63 3.20.0 4.11.64 3.20.1 4.11.65 3.20.2 4.11.66 3.20.3 4.11.67 3.20.4 4.11.68
premium-addons-for-elementor / widgets / premium-title.php
premium-addons-for-elementor / widgets Last commit date
dep 3 weeks ago premium-banner.php 1 day ago premium-blog.php 2 weeks ago premium-button.php 2 weeks ago premium-carousel.php 2 weeks ago premium-contactform.php 2 weeks ago premium-countdown.php 2 weeks ago premium-counter.php 2 weeks ago premium-dual-header.php 2 weeks ago premium-fancytext.php 2 weeks ago premium-grid.php 2 weeks ago premium-icon-list.php 2 weeks ago premium-image-button.php 2 weeks ago premium-image-scroll.php 2 weeks ago premium-image-separator.php 2 weeks ago premium-lottie.php 2 weeks ago premium-maps.php 2 days ago premium-media-wheel.php 2 weeks ago premium-mobile-menu.php 2 weeks ago premium-modalbox.php 2 days ago premium-nav-menu.php 2 weeks ago premium-notifications.php 2 weeks ago premium-person.php 2 weeks ago premium-pinterest-feed.php 2 weeks ago premium-post-ticker.php 2 weeks ago premium-pricing-table.php 2 days ago premium-progressbar.php 2 weeks ago premium-search-form.php 2 days ago premium-svg-drawer.php 2 weeks ago premium-tcloud.php 2 weeks ago premium-testimonials.php 2 weeks ago premium-textual-showcase.php 2 weeks ago premium-tiktok-feed.php 2 weeks ago premium-title.php 2 days ago premium-videobox.php 2 weeks ago premium-vscroll.php 2 weeks ago premium-weather.php 2 weeks ago premium-world-clock.php 2 weeks ago
premium-title.php
2835 lines
1 <?php
2 /**
3 * Premium Title.
4 */
5
6 namespace PremiumAddons\Widgets;
7
8 // Elementor Classes.
9 use Elementor\Plugin;
10 use Elementor\Widget_Base;
11 use Elementor\Utils;
12 use Elementor\Icons_Manager;
13 use Elementor\Controls_Manager;
14 use Elementor\Control_Media;
15 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
16 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
17 use Elementor\Group_Control_Border;
18 use Elementor\Group_Control_Typography;
19 use Elementor\Group_Control_Text_Shadow;
20 use Elementor\Group_Control_Box_Shadow;
21 use PremiumAddons\Includes\Controls\Premium_Background;
22
23 // PremiumAddons Classes.
24 use PremiumAddons\Admin\Includes\Admin_Helper;
25 use PremiumAddons\Includes\Helper_Functions;
26 use PremiumAddons\Includes\Controls\Premium_Post_Filter;
27
28 if ( ! defined( 'ABSPATH' ) ) {
29 exit; // If this file is called directly, abort.
30 }
31
32 /**
33 * Class Premium_Title
34 */
35 class Premium_Title extends Widget_Base {
36
37 /**
38 * Check if the icon draw is enabled.
39 *
40 * @since 4.9.26
41 * @access private
42 *
43 * @var bool
44 */
45 private $is_draw_enabled = null;
46
47 /**
48 * Check Icon Draw Option.
49 *
50 * @since 4.9.26
51 * @access public
52 */
53 public function check_icon_draw() {
54
55 if ( null === $this->is_draw_enabled ) {
56 $this->is_draw_enabled = Admin_Helper::check_svg_draw( 'premium-title' );
57 }
58
59 return $this->is_draw_enabled;
60 }
61
62 /**
63 * Retrieve Widget Name.
64 *
65 * @since 1.0.0
66 * @access public
67 */
68 public function get_name() {
69 return 'premium-addon-title';
70 }
71
72 /**
73 * Retrieve Widget Title.
74 *
75 * @since 1.0.0
76 * @access public
77 */
78 public function get_title() {
79 return __( 'Heading', 'premium-addons-for-elementor' );
80 }
81
82 /**
83 * Retrieve Widget Icon.
84 *
85 * @since 1.0.0
86 * @access public
87 *
88 * @return string widget icon.
89 */
90 public function get_icon() {
91 return 'pa-title';
92 }
93
94 /**
95 * Retrieve Widget Dependent CSS.
96 *
97 * @since 1.0.0
98 * @access public
99 *
100 * @return array CSS style handles.
101 */
102 public function get_style_depends() {
103 return array(
104 'pa-glass',
105 'pa-btn',
106 'premium-addons',
107 );
108 }
109
110 /**
111 * Retrieve Widget Dependent JS.
112 *
113 * @since 1.0.0
114 * @access public
115 *
116 * @return array JS script handles.
117 */
118 public function get_script_depends() {
119
120 $is_edit = Helper_Functions::is_edit_mode();
121
122 $scripts = array();
123
124 if ( $is_edit ) {
125
126 $draw_scripts = $this->check_icon_draw() ? array( 'pa-tweenmax', 'pa-motionpath' ) : array();
127
128 $scripts = array_merge( $draw_scripts, array( 'pa-glass', 'lottie-js' ) );
129
130 } else {
131 $settings = $this->get_settings();
132
133 if ( 'yes' === $settings['draw_svg'] ) {
134 $scripts[] = 'pa-tweenmax';
135 $scripts[] = 'pa-motionpath';
136 }
137
138 if ( 'animation' === $settings['icon_type'] ) {
139 $scripts[] = 'lottie-js';
140 }
141
142 if ( 'none' !== $settings['heading_lq_effect'] ) {
143 $scripts[] = 'pa-glass';
144 }
145 }
146
147 $scripts[] = 'premium-addons';
148
149 return $scripts;
150 }
151
152 /**
153 * Retrieve Widget Categories.
154 *
155 * @since 1.5.1
156 * @access public
157 *
158 * @return array Widget categories.
159 */
160 public function get_categories() {
161 return array( 'premium-elements' );
162 }
163
164 /**
165 * Retrieve Widget Dependent CSS.
166 *
167 * @since 1.0.0
168 * @access public
169 *
170 * @return array CSS style handles.
171 */
172 public function get_keywords() {
173 return array( 'pa', 'premium', 'premium heading', 'title', 'text', 'headline' );
174 }
175
176 protected function is_dynamic_content(): bool {
177 return false;
178 }
179
180 /**
181 * Retrieve Widget Support URL.
182 *
183 * @access public
184 *
185 * @return string support URL.
186 */
187 public function get_custom_help_url() {
188 return 'https://premiumaddons.com/support/';
189 }
190
191 public function has_widget_inner_wrapper(): bool {
192 return ! Helper_Functions::check_elementor_experiment( 'e_optimized_markup' );
193 }
194
195 /**
196 * Register Title controls.
197 *
198 * @since 1.0.0
199 * @access protected
200 */
201 protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
202
203 $draw_icon = $this->check_icon_draw();
204
205 $this->start_controls_section(
206 'premium_title_content',
207 array(
208 'label' => __( 'Title', 'premium-addons-for-elementor' ),
209 )
210 );
211
212 $demo = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/heading-widget-for-elementor-page-builder/', 'heading', 'wp-editor', 'demo' );
213 Helper_Functions::add_templates_controls( $this, 'heading', $demo );
214
215 $this->add_control(
216 'premium_title_text',
217 array(
218 'label' => __( 'Title', 'premium-addons-for-elementor' ),
219 'type' => Controls_Manager::TEXT,
220 'default' => __( 'Premium {{Heading}}', 'premium-addons-for-elementor' ),
221 'description' => __( 'Focused Word style tab settings will be applied on words wrapped by {{}}', 'premium-addons-for-elementor' ),
222 'label_block' => true,
223 'dynamic' => array( 'active' => true ),
224 )
225 );
226
227 $this->add_control(
228 'premium_title_tag',
229 array(
230 'label' => __( 'HTML Tag', 'premium-addons-for-elementor' ),
231 'type' => Controls_Manager::SELECT,
232 'options' => array(
233 'h1' => 'H1',
234 'h2' => 'H2',
235 'h3' => 'H3',
236 'h4' => 'H4',
237 'h5' => 'H5',
238 'h6' => 'H6',
239 'div' => 'div',
240 'span' => 'span',
241 ),
242 'default' => 'h2',
243 )
244 );
245
246 $this->add_control(
247 'premium_title_style',
248 array(
249 'label' => __( 'Style', 'premium-addons-for-elementor' ),
250 'type' => Controls_Manager::SELECT,
251 'default' => 'style1',
252 'options' => array(
253 'style1' => __( 'Style 1', 'premium-addons-for-elementor' ),
254 'style2' => __( 'Style 2', 'premium-addons-for-elementor' ),
255 'style3' => __( 'Style 3', 'premium-addons-for-elementor' ),
256 'style4' => __( 'Style 4', 'premium-addons-for-elementor' ),
257 'style5' => __( 'Style 5', 'premium-addons-for-elementor' ),
258 'style6' => __( 'Style 6', 'premium-addons-for-elementor' ),
259 'style7' => __( 'Style 7', 'premium-addons-for-elementor' ),
260 'style8' => __( 'Style 8', 'premium-addons-for-elementor' ),
261 'style9' => __( 'Style 9', 'premium-addons-for-elementor' ),
262 ),
263 'separator' => 'before',
264 'label_block' => true,
265 )
266 );
267
268 $this->add_control(
269 'style_notice',
270 array(
271 'raw' => __( 'Please note that this style removes any styling given to focused word.', 'premium-addons-for-elementor' ),
272 'type' => Controls_Manager::RAW_HTML,
273 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
274 'condition' => array(
275 'premium_title_style' => 'style9',
276 ),
277 )
278 );
279
280 $inline_flex = array( 'style1', 'style2', 'style5', 'style6', 'style7', 'style8', 'style9' );
281
282 $this->add_responsive_control(
283 'premium_title_align',
284 array(
285 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
286 'type' => Controls_Manager::CHOOSE,
287 'options' => array(
288 'left' => array(
289 'title' => __( 'Left', 'premium-addons-for-elementor' ),
290 'icon' => 'eicon-text-align-left',
291 ),
292 'center' => array(
293 'title' => __( 'Center', 'premium-addons-for-elementor' ),
294 'icon' => 'eicon-text-align-center',
295 ),
296 'right' => array(
297 'title' => __( 'Right', 'premium-addons-for-elementor' ),
298 'icon' => 'eicon-text-align-right',
299 ),
300 ),
301 'default' => 'left',
302 'toggle' => false,
303 'selectors' => array(
304 '{{WRAPPER}} .premium-title-container' => 'text-align: {{VALUE}};',
305 ),
306 'condition' => array(
307 'premium_title_style' => $inline_flex,
308 ),
309 )
310 );
311
312 $this->add_control(
313 'premium_title_align_flex',
314 array(
315 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
316 'type' => Controls_Manager::CHOOSE,
317 'prefix_class' => 'premium-title-',
318 'options' => array(
319 'flex-start' => array(
320 'title' => __( 'Left', 'premium-addons-for-elementor' ),
321 'icon' => 'eicon-text-align-left',
322 ),
323 'center' => array(
324 'title' => __( 'Center', 'premium-addons-for-elementor' ),
325 'icon' => 'eicon-text-align-center',
326 ),
327 'flex-end' => array(
328 'title' => __( 'Right', 'premium-addons-for-elementor' ),
329 'icon' => 'eicon-text-align-right',
330 ),
331 ),
332 'default' => 'flex-start',
333 'selectors' => array(
334 '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-header' => 'justify-content: {{VALUE}}',
335 '{{WRAPPER}}.premium-title-icon-column .premium-title-header' => 'align-items: {{VALUE}}',
336 ),
337 'toggle' => false,
338 'condition' => array(
339 'premium_title_style' => array( 'style3', 'style4' ),
340 ),
341 )
342 );
343
344 $this->add_control(
345 'alignment_notice',
346 array(
347 'raw' => __( 'Please note that left/right alignment is reversed when Icon Position is set to After.', 'premium-addons-for-elementor' ),
348 'type' => Controls_Manager::RAW_HTML,
349 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
350 'condition' => array(
351 'premium_title_icon_switcher' => 'yes',
352 'icon_position' => 'row-reverse',
353 'premium_title_style' => array( 'style3', 'style4' ),
354 ),
355 )
356 );
357
358 $this->add_control(
359 'link_selection',
360 array(
361 'label' => __( 'Link Type', 'premium-addons-for-elementor' ),
362 'type' => Controls_Manager::SELECT,
363 'options' => array(
364 'url' => __( 'URL', 'premium-addons-for-elementor' ),
365 'link' => __( 'Existing Page', 'premium-addons-for-elementor' ),
366 ),
367 'default' => 'url',
368 'label_block' => true,
369 )
370 );
371
372 $this->add_control(
373 'custom_link',
374 array(
375 'label' => __( 'Link', 'premium-addons-for-elementor' ),
376 'type' => Controls_Manager::URL,
377 'dynamic' => array( 'active' => true ),
378 'label_block' => true,
379 'condition' => array(
380 'link_selection' => 'url',
381 ),
382 )
383 );
384
385 $this->add_control(
386 'existing_link',
387 array(
388 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ),
389 'type' => Premium_Post_Filter::TYPE,
390 'label_block' => true,
391 'multiple' => false,
392 'source' => array( 'post', 'page' ),
393 'condition' => array(
394 'link_selection' => 'link',
395 ),
396 )
397 );
398
399 $this->end_controls_section();
400
401 $this->start_controls_section(
402 'stripe_section',
403 array(
404 'label' => __( 'Stripe', 'premium-addons-for-elementor' ),
405 'condition' => array(
406 'premium_title_style' => 'style7',
407 ),
408 )
409 );
410
411 $this->add_control(
412 'premium_title_stripe_pos',
413 array(
414 'label' => __( 'Stripe Position', 'premium-addons-for-elementor' ),
415 'type' => Controls_Manager::SELECT,
416 'options' => array(
417 'top' => __( 'Top', 'premium-addons-for-elementor' ),
418 'bottom' => __( 'Bottom', 'premium-addons-for-elementor' ),
419 ),
420 'selectors_dictionary' => array(
421 'top' => 'initial',
422 'bottom' => '2',
423 ),
424 'default' => 'top',
425 'label_block' => true,
426 'separator' => 'before',
427 'selectors' => array(
428 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'order: {{VALUE}}',
429 ),
430 )
431 );
432
433 $this->add_responsive_control(
434 'premium_title_style7_strip_width',
435 array(
436 'label' => __( 'Stripe Width (PX)', 'premium-addons-for-elementor' ),
437 'type' => Controls_Manager::SLIDER,
438 'size_units' => array( 'px', '%', 'em', 'vw' ),
439 'default' => array(
440 'unit' => 'px',
441 'size' => '120',
442 ),
443 'selectors' => array(
444 '{{WRAPPER}} .premium-title-style7-stripe' => 'width: {{SIZE}}{{UNIT}};',
445 ),
446 'label_block' => true,
447 )
448 );
449
450 $this->add_responsive_control(
451 'premium_title_style7_strip_height',
452 array(
453 'label' => __( 'Stripe Height (PX)', 'premium-addons-for-elementor' ),
454 'type' => Controls_Manager::SLIDER,
455 'size_units' => array( 'px', 'em' ),
456 'default' => array(
457 'unit' => 'px',
458 'size' => '5',
459 ),
460 'label_block' => true,
461 'selectors' => array(
462 '{{WRAPPER}} .premium-title-style7-stripe' => 'height: {{SIZE}}{{UNIT}};',
463 ),
464 )
465 );
466
467 $this->add_responsive_control(
468 'premium_title_style7_strip_top_spacing',
469 array(
470 'label' => __( 'Stripe Top Spacing (PX)', 'premium-addons-for-elementor' ),
471 'type' => Controls_Manager::SLIDER,
472 'size_units' => array( 'px', '%', 'em' ),
473 'selectors' => array(
474 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-top: {{SIZE}}{{UNIT}};',
475 ),
476 'label_block' => true,
477 )
478 );
479
480 $this->add_responsive_control(
481 'premium_title_style7_strip_bottom_spacing',
482 array(
483 'label' => __( 'Stripe Bottom Spacing (PX)', 'premium-addons-for-elementor' ),
484 'type' => Controls_Manager::SLIDER,
485 'size_units' => array( 'px', '%', 'em' ),
486 'label_block' => true,
487 'selectors' => array(
488 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-bottom: {{SIZE}}{{UNIT}};',
489 ),
490 )
491 );
492
493 $this->add_responsive_control(
494 'premium_title_style7_strip_align',
495 array(
496 'label' => __( 'Stripe Alignment', 'premium-addons-for-elementor' ),
497 'type' => Controls_Manager::CHOOSE,
498 'options' => array(
499 'flex-start' => array(
500 'title' => __( 'Left', 'premium-addons-for-elementor' ),
501 'icon' => 'eicon-text-align-left',
502 ),
503 'center' => array(
504 'title' => __( 'Center', 'premium-addons-for-elementor' ),
505 'icon' => 'eicon-text-align-center',
506 ),
507 'flex-end' => array(
508 'title' => __( 'Right', 'premium-addons-for-elementor' ),
509 'icon' => 'eicon-text-align-right',
510 ),
511 ),
512 'toggle' => false,
513 'default' => 'center',
514 'selectors' => array(
515 '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-style7-stripe-wrap' => 'justify-content: {{VALUE}}',
516 '{{WRAPPER}}.premium-title-icon-column .premium-title-style7-stripe-wrap' => 'align-self: {{VALUE}}',
517 ),
518 )
519 );
520
521 $this->end_controls_section();
522
523 $this->start_controls_section(
524 'icon_section',
525 array(
526 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
527 )
528 );
529
530 $this->add_control(
531 'premium_title_icon_switcher',
532 array(
533 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
534 'type' => Controls_Manager::SWITCHER,
535 )
536 );
537
538 $this->add_control(
539 'icon_type',
540 array(
541 'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
542 'type' => Controls_Manager::SELECT,
543 'options' => array(
544 'icon' => __( 'Icon', 'premium-addons-for-elementor' ),
545 'image' => __( 'Image', 'premium-addons-for-elementor' ),
546 'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
547 'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ),
548 ),
549 'default' => 'icon',
550 'condition' => array(
551 'premium_title_icon_switcher' => 'yes',
552 ),
553 )
554 );
555
556 $this->add_responsive_control(
557 'icon_position',
558 array(
559 'label' => __( 'Icon Position', 'premium-addons-for-elementor' ),
560 'type' => Controls_Manager::SELECT,
561 'options' => array(
562 'row' => __( 'Before', 'premium-addons-for-elementor' ),
563 'row-reverse' => __( 'After', 'premium-addons-for-elementor' ),
564 'column' => __( 'Top', 'premium-addons-for-elementor' ),
565 'column-reverse' => __( 'Bottom', 'premium-addons-for-elementor' ),
566 ),
567 'default' => 'row',
568 'toggle' => false,
569 'render_type' => 'template',
570 'prefix_class' => 'premium-title-icon-',
571 'selectors' => array(
572 '{{WRAPPER}} .premium-title-header:not(.premium-title-style7), {{WRAPPER}} .premium-title-style7-inner' => 'flex-direction: {{VALUE}}',
573 ),
574 'condition' => array(
575 'premium_title_icon_switcher' => 'yes',
576 ),
577 )
578 );
579
580 $this->add_responsive_control(
581 'top_icon_align',
582 array(
583 'label' => __( 'Icon Alignment', 'premium-addons-for-elementor' ),
584 'type' => Controls_Manager::CHOOSE,
585 'options' => array(
586 'flex-start' => array(
587 'title' => __( 'Left', 'premium-addons-for-elementor' ),
588 'icon' => 'eicon-text-align-left',
589 ),
590 'center' => array(
591 'title' => __( 'Center', 'premium-addons-for-elementor' ),
592 'icon' => 'eicon-text-align-center',
593 ),
594 'flex-end' => array(
595 'title' => __( 'Right', 'premium-addons-for-elementor' ),
596 'icon' => 'eicon-text-align-right',
597 ),
598 ),
599 'default' => 'center',
600 'toggle' => false,
601 'selectors' => array(
602 '{{WRAPPER}}.premium-title-icon-column .premium-title-header:not(.premium-title-style7)' => 'align-items: {{VALUE}}',
603 '{{WRAPPER}}.premium-title-icon-column .premium-title-style7 .premium-title-icon' => 'align-self: {{VALUE}}',
604 ),
605 'condition' => array(
606 'premium_title_icon_switcher' => 'yes',
607 'icon_position' => 'column',
608 'premium_title_style!' => array( 'style3', 'style4' ),
609 ),
610 )
611 );
612
613 $common_conditions = array(
614 'premium_title_icon_switcher' => 'yes',
615 );
616
617 $this->add_control(
618 'premium_title_icon_updated',
619 array(
620 'label' => __( 'Font Awesome Icon', 'premium-addons-for-elementor' ),
621 'type' => Controls_Manager::ICONS,
622 'fa4compatibility' => 'premium_title_icon',
623 'default' => array(
624 'value' => 'fas fa-bars',
625 'library' => 'fa-solid',
626 ),
627 'label_block' => true,
628 'condition' => array_merge(
629 $common_conditions,
630 array(
631 'icon_type' => 'icon',
632 )
633 ),
634 )
635 );
636
637 $this->add_control(
638 'image_upload',
639 array(
640 'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
641 'type' => Controls_Manager::MEDIA,
642 'default' => array(
643 'url' => Utils::get_placeholder_image_src(),
644 ),
645 'condition' => array_merge(
646 $common_conditions,
647 array(
648 'icon_type' => 'image',
649 )
650 ),
651 )
652 );
653
654 $this->add_control(
655 'custom_svg',
656 array(
657 'label' => __( 'SVG Code', 'premium-addons-for-elementor' ),
658 'type' => Controls_Manager::TEXTAREA,
659 'description' => 'You can use these sites to create SVGs: <a href="https://danmarshall.github.io/google-font-to-svg-path/" target="_blank">Google Fonts</a> and <a href="https://boxy-svg.com/" target="_blank">Boxy SVG</a>',
660 'condition' => array_merge(
661 $common_conditions,
662 array(
663 'icon_type' => 'svg',
664 )
665 ),
666 'ai' => array(
667 'active' => false,
668 ),
669 )
670 );
671
672 $this->add_control(
673 'lottie_url',
674 array(
675 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
676 'type' => Controls_Manager::TEXT,
677 'dynamic' => array( 'active' => true ),
678 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
679 'label_block' => true,
680 'condition' => array_merge(
681 $common_conditions,
682 array(
683 'icon_type' => 'animation',
684 )
685 ),
686 'ai' => array(
687 'active' => false,
688 ),
689 )
690 );
691
692 $animation_conds = array(
693 'terms' => array(
694 array(
695 'name' => 'premium_title_icon_switcher',
696 'value' => 'yes',
697 ),
698 array(
699 'relation' => 'or',
700 'terms' => array(
701 array(
702 'name' => 'icon_type',
703 'value' => 'animation',
704 ),
705 array(
706 'terms' => array(
707 array(
708 'relation' => 'or',
709 'terms' => array(
710 array(
711 'name' => 'icon_type',
712 'value' => 'icon',
713 ),
714 array(
715 'name' => 'icon_type',
716 'value' => 'svg',
717 ),
718 ),
719 ),
720 array(
721 'name' => 'draw_svg',
722 'value' => 'yes',
723 ),
724 ),
725 ),
726 ),
727 ),
728 ),
729 );
730
731 $this->add_control(
732 'draw_svg',
733 array(
734 'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ),
735 'type' => Controls_Manager::SWITCHER,
736 'description' => __( 'Enable this option to make the icon drawable. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=ZLr0bRe0RAY" target="_blank">tutorial</a>',
737 'classes' => $draw_icon ? '' : 'editor-pa-control-disabled',
738 'condition' => array_merge(
739 $common_conditions,
740 array(
741 'icon_type' => array( 'icon', 'svg' ),
742 'premium_title_icon_updated[library]!' => 'svg',
743 )
744 ),
745 )
746 );
747
748 if ( $draw_icon ) {
749
750 $this->add_control(
751 'path_width',
752 array(
753 'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ),
754 'type' => Controls_Manager::SLIDER,
755 'range' => array(
756 'px' => array(
757 'min' => 0,
758 'max' => 50,
759 'step' => 0.1,
760 ),
761 ),
762 'condition' => array_merge(
763 $common_conditions,
764 array(
765 'icon_type' => array( 'icon', 'svg' ),
766 )
767 ),
768 'selectors' => array(
769 '{{WRAPPER}} .premium-title-header svg *' => 'stroke-width: {{SIZE}}',
770 ),
771 )
772 );
773
774 $this->add_control(
775 'svg_sync',
776 array(
777 'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ),
778 'type' => Controls_Manager::SWITCHER,
779 'condition' => array_merge(
780 $common_conditions,
781 array(
782 'icon_type' => array( 'icon', 'svg' ),
783 'draw_svg' => 'yes',
784 )
785 ),
786 )
787 );
788
789 $this->add_control(
790 'frames',
791 array(
792 'label' => __( 'Speed', 'premium-addons-for-elementor' ),
793 'type' => Controls_Manager::NUMBER,
794 'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
795 'default' => 5,
796 'min' => 1,
797 'max' => 100,
798 'condition' => array_merge(
799 $common_conditions,
800 array(
801 'icon_type' => array( 'icon', 'svg' ),
802 'draw_svg' => 'yes',
803 )
804 ),
805 )
806 );
807
808 } else {
809
810 Helper_Functions::get_draw_svg_notice(
811 $this,
812 'heading',
813 array_merge(
814 $common_conditions,
815 array(
816 'icon_type' => array( 'icon', 'svg' ),
817 'premium_title_icon_updated[library]!' => 'svg',
818 )
819 )
820 );
821
822 }
823
824 $this->add_control(
825 'lottie_loop',
826 array(
827 'label' => __( 'Loop', 'premium-addons-for-elementor' ),
828 'type' => Controls_Manager::SWITCHER,
829 'return_value' => 'true',
830 'default' => 'true',
831 'conditions' => $animation_conds,
832 )
833 );
834
835 $this->add_control(
836 'lottie_reverse',
837 array(
838 'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
839 'type' => Controls_Manager::SWITCHER,
840 'return_value' => 'true',
841 'conditions' => $animation_conds,
842 )
843 );
844
845 if ( $draw_icon ) {
846 $this->add_control(
847 'start_point',
848 array(
849 'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ),
850 'type' => Controls_Manager::SLIDER,
851 'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ),
852 'default' => array(
853 'unit' => '%',
854 'size' => 0,
855 ),
856 'condition' => array_merge(
857 $common_conditions,
858 array(
859 'icon_type' => array( 'icon', 'svg' ),
860 'draw_svg' => 'yes',
861 'lottie_reverse!' => 'true',
862 )
863 ),
864 )
865 );
866
867 $this->add_control(
868 'end_point',
869 array(
870 'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ),
871 'type' => Controls_Manager::SLIDER,
872 'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ),
873 'default' => array(
874 'unit' => '%',
875 'size' => 0,
876 ),
877 'condition' => array_merge(
878 $common_conditions,
879 array(
880 'icon_type' => array( 'icon', 'svg' ),
881 'draw_svg' => 'yes',
882 'lottie_reverse' => 'true',
883 )
884 ),
885
886 )
887 );
888
889 $this->add_control(
890 'svg_hover',
891 array(
892 'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
893 'type' => Controls_Manager::SWITCHER,
894 'return_value' => 'true',
895 'condition' => array_merge(
896 $common_conditions,
897 array(
898 'icon_type' => array( 'icon', 'svg' ),
899 'draw_svg' => 'yes',
900 )
901 ),
902 )
903 );
904
905 $this->add_control(
906 'svg_yoyo',
907 array(
908 'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ),
909 'type' => Controls_Manager::SWITCHER,
910 'condition' => array_merge(
911 $common_conditions,
912 array(
913 'icon_type' => array( 'icon', 'svg' ),
914 'draw_svg' => 'yes',
915 'lottie_loop' => 'true',
916 )
917 ),
918 )
919 );
920 }
921
922 $this->end_controls_section();
923
924 $this->start_controls_section(
925 'background_text_section',
926 array(
927 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
928 )
929 );
930
931 $this->add_control(
932 'background_text_switcher',
933 array(
934 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
935 'type' => Controls_Manager::SWITCHER,
936 )
937 );
938
939 $this->add_control(
940 'background_text',
941 array(
942 'label' => __( 'Text', 'premium-addons-for-elementor' ),
943 'type' => Controls_Manager::TEXT,
944 'condition' => array(
945 'background_text_switcher' => 'yes',
946 ),
947
948 )
949 );
950
951 $this->add_control(
952 'bg_stroke_switcher',
953 array(
954 'label' => __( 'Stroke', 'premium-addons-for-elementor' ),
955 'type' => Controls_Manager::SWITCHER,
956 'prefix_class' => 'premium-title-bg-stroke-',
957 'condition' => array(
958 'background_text_switcher' => 'yes',
959 ),
960 )
961 );
962
963 $this->add_control(
964 'background_text_width',
965 array(
966 'label' => __( 'Width', 'premium-addons-for-elementor' ),
967 'type' => Controls_Manager::SELECT,
968 'options' => array(
969 'auto' => __( 'Auto', 'premium-addons-for-elementor' ),
970 '100%' => __( 'Full Width', 'premium-addons-for-elementor' ),
971 ),
972 'default' => 'auto',
973 'label_block' => true,
974 'selectors' => array(
975 '{{WRAPPER}} .premium-title-bg-text:before' => 'width: {{VALUE}}',
976 ),
977 'condition' => array(
978 'background_text_switcher' => 'yes',
979 ),
980 )
981 );
982
983 $this->add_responsive_control(
984 'background_text_left',
985 array(
986 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
987 'type' => Controls_Manager::SLIDER,
988 'size_units' => array( 'px', 'em', '%', 'custom' ),
989 'range' => array(
990 'px' => array(
991 'min' => -500,
992 'max' => 500,
993 ),
994 'em' => array(
995 'min' => -50,
996 'max' => 50,
997 ),
998 '%' => array(
999 'min' => -100,
1000 'max' => 100,
1001 ),
1002 ),
1003 'selectors' => array(
1004 '{{WRAPPER}} .premium-title-bg-text:before' => 'left: {{SIZE}}{{UNIT}}',
1005 ),
1006 'condition' => array(
1007 'background_text_switcher' => 'yes',
1008 ),
1009 )
1010 );
1011
1012 $this->add_responsive_control(
1013 'background_text_top',
1014 array(
1015 'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ),
1016 'type' => Controls_Manager::SLIDER,
1017 'size_units' => array( 'px', 'em', '%', 'custom' ),
1018 'range' => array(
1019 'px' => array(
1020 'min' => -500,
1021 'max' => 500,
1022 ),
1023 'em' => array(
1024 'min' => -50,
1025 'max' => 50,
1026 ),
1027 '%' => array(
1028 'min' => -100,
1029 'max' => 100,
1030 ),
1031 ),
1032 'selectors' => array(
1033 '{{WRAPPER}} .premium-title-bg-text:before' => 'top: {{SIZE}}{{UNIT}}',
1034 ),
1035 'condition' => array(
1036 'background_text_switcher' => 'yes',
1037 ),
1038 )
1039 );
1040
1041 $this->add_responsive_control(
1042 'background_text_rotate',
1043 array(
1044 'label' => __( 'Rotate (degrees)', 'premium-addons-for-elementor' ),
1045 'type' => Controls_Manager::SLIDER,
1046 'size_units' => array( 'deg' ),
1047 'default' => array(
1048 'unit' => 'deg',
1049 'size' => 0,
1050 ),
1051 'selectors' => array(
1052 '{{WRAPPER}} .premium-title-bg-text:before' => 'transform: rotate({{SIZE}}{{UNIT}})',
1053 ),
1054 'condition' => array(
1055 'background_text_switcher' => 'yes',
1056 ),
1057 )
1058 );
1059
1060 $this->end_controls_section();
1061
1062 $this->start_controls_section(
1063 'display_option_section',
1064 array(
1065 'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
1066 )
1067 );
1068
1069 $this->add_control(
1070 'hover_effect',
1071 array(
1072 'label' => __( 'Underline Hover Effect', 'premium-addons-for-elementor' ),
1073 'type' => Controls_Manager::SELECT,
1074 'options' => array(
1075 'none' => __( 'None', 'premium-addons-for-elementor' ),
1076 'line1' => __( 'Effect 1', 'premium-addons-for-elementor' ),
1077 'line2' => __( 'Effect 2', 'premium-addons-for-elementor' ),
1078 'line3' => __( 'Effect 3', 'premium-addons-for-elementor' ),
1079 'line4' => __( 'Effect 4', 'premium-addons-for-elementor' ),
1080 'line5' => __( 'Effect 5', 'premium-addons-for-elementor' ),
1081 'line7' => __( 'Effect 6', 'premium-addons-for-elementor' ),
1082 ),
1083 'default' => 'none',
1084 'label_block' => true,
1085 )
1086 );
1087
1088 $this->add_control(
1089 'stroke_switcher',
1090 array(
1091 'label' => __( 'Apply Stroke', 'premium-addons-for-elementor' ),
1092 'type' => Controls_Manager::SWITCHER,
1093 'prefix_class' => 'premium-title-stroke-',
1094
1095 )
1096 );
1097
1098 $this->add_control(
1099 'mask_switcher',
1100 array(
1101 'label' => __( 'Minimal Mask Effect', 'premium-addons-for-elementor' ),
1102 'type' => Controls_Manager::SWITCHER,
1103 'description' => __( 'Note: This effect takes place once the element is in the viewport', 'premium-addons-for-elementor' ),
1104 'render_type' => 'template',
1105 'prefix_class' => 'premium-mask-',
1106 'condition' => array(
1107 'premium_title_style!' => array( 'style8', 'style9' ),
1108 'gradient_text_switcher!' => 'yes',
1109 ),
1110 )
1111 );
1112
1113 $this->add_control(
1114 'mask_title_color',
1115 array(
1116 'label' => __( 'Mask Color', 'premium-addons-for-elementor' ),
1117 'type' => Controls_Manager::COLOR,
1118 'render_type' => 'template',
1119 'selectors' => array(
1120 '{{WRAPPER}}.premium-mask-yes .premium-mask-span::after' => 'background: {{VALUE}};',
1121 ),
1122 'condition' => array(
1123 'mask_switcher' => 'yes',
1124 'premium_title_style!' => array( 'style8', 'style9' ),
1125 'gradient_text_switcher!' => 'yes',
1126 ),
1127 )
1128 );
1129
1130 $this->add_control(
1131 'mask_title_dir',
1132 array(
1133 'label' => __( 'Direction', 'premium-addons-for-elementor' ),
1134 'type' => Controls_Manager::CHOOSE,
1135 'options' => array(
1136 'tr' => array(
1137 'title' => esc_html__( 'To Right', 'premium-addons-for-elementor' ),
1138 'icon' => 'eicon-arrow-right',
1139 ),
1140 'tl' => array(
1141 'title' => esc_html__( 'To Left', 'premium-addons-for-elementor' ),
1142 'icon' => 'eicon-arrow-left',
1143 ),
1144 'tt' => array(
1145 'title' => esc_html__( 'To Top', 'premium-addons-for-elementor' ),
1146 'icon' => 'eicon-arrow-up',
1147 ),
1148 'tb' => array(
1149 'title' => esc_html__( 'To Bottom', 'premium-addons-for-elementor' ),
1150 'icon' => 'eicon-arrow-down',
1151 ),
1152 ),
1153 'default' => 'tr',
1154 'prefix_class' => 'premium-mask-',
1155 'render_type' => 'template',
1156 'condition' => array(
1157 'mask_switcher' => 'yes',
1158 'premium_title_style!' => array( 'style8', 'style9' ),
1159 'gradient_text_switcher!' => 'yes',
1160 ),
1161 )
1162 );
1163
1164 $this->add_responsive_control(
1165 'mask_title_padding',
1166 array(
1167 'label' => __( 'Words Padding', 'premium-addons-for-elementor' ),
1168 'type' => Controls_Manager::DIMENSIONS,
1169 'size_units' => array( 'px', 'em', '%' ),
1170 'selectors' => array(
1171 '{{WRAPPER}} .premium-mask-span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1172 ),
1173 'condition' => array(
1174 'mask_switcher' => 'yes',
1175 'premium_title_style!' => array( 'style8', 'style9' ),
1176 'gradient_text_switcher!' => 'yes',
1177 ),
1178 )
1179 );
1180
1181 $this->add_control(
1182 'noise',
1183 array(
1184 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ),
1185 'type' => Controls_Manager::SWITCHER,
1186 'prefix_class' => 'premium-title-noise-',
1187 'separator' => 'before',
1188 'render_type' => 'template',
1189 'condition' => array(
1190 'premium_title_style!' => array( 'style8', 'style9' ),
1191 'mask_switcher!' => 'yes',
1192 'gradient_text_switcher!' => 'yes',
1193 'background_style' => 'color',
1194 ),
1195 )
1196 );
1197
1198 $this->end_controls_section();
1199
1200 $this->start_controls_section(
1201 'premium_title_description_section',
1202 array(
1203 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1204 )
1205 );
1206
1207 $this->add_control(
1208 'premium_title_desc_switcher',
1209 array(
1210 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1211 'type' => Controls_Manager::SWITCHER,
1212 )
1213 );
1214
1215 $this->add_control(
1216 'premium_title_desc_text',
1217 array(
1218 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1219 'type' => Controls_Manager::WYSIWYG,
1220 'dynamic' => array( 'active' => true ),
1221 'default' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.', 'premium-addons-for-elementor' ),
1222 'condition' => array(
1223 'premium_title_desc_switcher' => 'yes',
1224 ),
1225 )
1226 );
1227
1228 $this->add_responsive_control(
1229 'premium_title_desc_display',
1230 array(
1231 'label' => __( 'Display', 'premium-addons-for-elementor' ),
1232 'type' => Controls_Manager::CHOOSE,
1233 'separator' => 'before',
1234 'options' => array(
1235 'row' => array(
1236 'title' => __( 'Inline', 'premium-addons-for-elementor' ),
1237 'icon' => 'eicon-ellipsis-h',
1238 ),
1239 'column' => array(
1240 'title' => __( 'Block', 'premium-addons-for-elementor' ),
1241 'icon' => 'eicon-ellipsis-v',
1242 ),
1243 ),
1244 'default' => 'column',
1245 'prefix_class' => 'premium-title-desc-display-',
1246 'toggle' => false,
1247 'selectors' => array(
1248 '{{WRAPPER}} .premium-title-wrapper' => 'flex-direction: {{VALUE}};',
1249 ),
1250 'condition' => array(
1251 'premium_title_desc_switcher' => 'yes',
1252 ),
1253 )
1254 );
1255
1256 $this->add_responsive_control(
1257 'premium_title_desc_order',
1258 array(
1259 'label' => __( 'Order', 'premium-addons-for-elementor' ),
1260 'type' => Controls_Manager::CHOOSE,
1261 'options' => array(
1262 '0' => array(
1263 'title' => __( 'Before Heading', 'premium-addons-for-elementor' ),
1264 'icon' => 'eicon-order-start',
1265 ),
1266 '2' => array(
1267 'title' => __( 'After Heading', 'premium-addons-for-elementor' ),
1268 'icon' => 'eicon-order-end',
1269 ),
1270 ),
1271 'default' => '2',
1272 'toggle' => false,
1273 'selectors' => array(
1274 '{{WRAPPER}} .premium-title-description' => 'order: {{VALUE}};',
1275 ),
1276 'condition' => array(
1277 'premium_title_desc_switcher' => 'yes',
1278 ),
1279 )
1280 );
1281
1282 $this->add_responsive_control(
1283 'premium_title_desc_v_align',
1284 array(
1285 'label' => __( 'Vertical Alignment', 'premium-addons-for-elementor' ),
1286 'type' => Controls_Manager::CHOOSE,
1287 'description' => __( 'Effective when the display is set to <b>"inline</b>"', 'premium-addons-for-elementor' ),
1288 'options' => array(
1289 'start' => array(
1290 'title' => __( 'Start', 'premium-addons-for-elementor' ),
1291 'icon' => 'eicon-align-start-v',
1292 ),
1293 'center' => array(
1294 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1295 'icon' => 'eicon-align-center-v',
1296 ),
1297 'end' => array(
1298 'title' => __( 'End', 'premium-addons-for-elementor' ),
1299 'icon' => 'eicon-align-end-v',
1300 ),
1301 'stretch' => array(
1302 'title' => __( 'Stretch', 'premium-addons-for-elementor' ),
1303 'icon' => 'eicon-align-stretch-v',
1304 ),
1305 ),
1306 'default' => 'center',
1307 'toggle' => false,
1308 'selectors' => array(
1309 '{{WRAPPER}} .premium-title-description' => 'align-self: {{VALUE}};',
1310 ),
1311 'condition' => array(
1312 'premium_title_desc_switcher' => 'yes',
1313 ),
1314 )
1315 );
1316
1317 $this->add_responsive_control(
1318 'premium_title_desc_align',
1319 array(
1320 'label' => __( 'Text Alignment', 'premium-addons-for-elementor' ),
1321 'type' => Controls_Manager::CHOOSE,
1322 'toggle' => false,
1323 'options' => array(
1324 'left' => array(
1325 'title' => __( 'Left', 'premium-addons-for-elementor' ),
1326 'icon' => 'eicon-text-align-left',
1327 ),
1328 'center' => array(
1329 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1330 'icon' => 'eicon-text-align-center',
1331 ),
1332 'right' => array(
1333 'title' => __( 'Right', 'premium-addons-for-elementor' ),
1334 'icon' => 'eicon-text-align-right',
1335 ),
1336 'justify' => array(
1337 'title' => __( 'Justify', 'premium-addons-for-elementor' ),
1338 'icon' => 'eicon-text-align-justify',
1339 ),
1340 ),
1341 'selectors' => array(
1342 '{{WRAPPER}} .premium-title-description' => 'text-align: {{VALUE}};',
1343 ),
1344 'condition' => array(
1345 'premium_title_desc_switcher' => 'yes',
1346 ),
1347 )
1348 );
1349
1350 $this->end_controls_section();
1351
1352 $this->start_controls_section(
1353 'section_pa_docs',
1354 array(
1355 'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ),
1356 )
1357 );
1358
1359 $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/heading-widget-tutorial/', 'heading-widget', 'wp-editor', 'get-support' );
1360
1361 $this->add_control(
1362 'doc_1',
1363 array(
1364 'type' => Controls_Manager::RAW_HTML,
1365 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Getting started »', 'premium-addons-for-elementor' ) ),
1366 'content_classes' => 'editor-pa-doc',
1367 )
1368 );
1369
1370 Helper_Functions::register_element_feedback_controls( $this );
1371
1372 $this->end_controls_section();
1373
1374 Helper_Functions::register_papro_promotion_controls( $this, 'heading' );
1375
1376 $this->start_controls_section(
1377 'premium_title_style_section',
1378 array(
1379 'label' => __( 'Title', 'premium-addons-for-elementor' ),
1380 'tab' => Controls_Manager::TAB_STYLE,
1381 )
1382 );
1383
1384 $this->add_control(
1385 'premium_title_color',
1386 array(
1387 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1388 'type' => Controls_Manager::COLOR,
1389 'global' => array(
1390 'default' => Global_Colors::COLOR_PRIMARY,
1391 ),
1392 'selectors' => array(
1393 '{{WRAPPER}} .premium-title-header, {{WRAPPER}}.premium-title-noise-yes .premium-title-noise-word:not(.premium-title__focused-word)::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-noise-word:not(.premium-title__focused-word)::after' => 'color: {{VALUE}}',
1394 '{{WRAPPER}}.premium-title-stroke-yes .premium-title-text' => '-webkit-text-fill-color: {{VALUE}}',
1395 '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--base-color: {{VALUE}}',
1396 ),
1397 )
1398 );
1399
1400 $this->add_control(
1401 'premium_title_blur_color',
1402 array(
1403 'label' => __( 'Blur Color', 'premium-addons-for-elementor' ),
1404 'type' => Controls_Manager::COLOR,
1405 'default' => '#000',
1406 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-color: {{VALUE}};' ),
1407 'condition' => array(
1408 'premium_title_style' => 'style9',
1409 ),
1410 )
1411 );
1412
1413 $this->add_control(
1414 'shining_shiny_color_title',
1415 array(
1416 'label' => __( 'Shiny Color', 'premium-addons-for-elementor' ),
1417 'type' => Controls_Manager::COLOR,
1418 'default' => '#fff',
1419 'condition' => array(
1420 'premium_title_style' => 'style8',
1421 ),
1422 'selectors' => array( '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--shiny-color: {{VALUE}}' ),
1423 )
1424 );
1425
1426 $this->add_group_control(
1427 Group_Control_Typography::get_type(),
1428 array(
1429 'name' => 'title_typography',
1430 'global' => array(
1431 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1432 ),
1433 'selector' => '{{WRAPPER}} .premium-title-header',
1434 )
1435 );
1436
1437 $this->add_group_control(
1438 Group_Control_Border::get_type(),
1439 array(
1440 'name' => 'style_one_border',
1441 'fields_options' => array(
1442 'border' => array(
1443 'default' => 'solid',
1444 ),
1445 ),
1446 'selector' => '{{WRAPPER}} .premium-title-style1',
1447 'condition' => array(
1448 'premium_title_style' => 'style1',
1449 ),
1450 )
1451 );
1452
1453 $this->add_control(
1454 'background_style',
1455 array(
1456 'label' => __( 'Background Style', 'premium-addons-for-elementor' ),
1457 'type' => Controls_Manager::SELECT,
1458 'description' => __( 'Choose ‘Normal’ to add a background behind the text and ‘Clipped’ so the background will be clipped on the text.', 'premium-addons-for-elementor' ),
1459 'options' => array(
1460 'color' => __( 'Normal', 'premium-addons-for-elementor' ),
1461 'clipped' => __( 'Clipped', 'premium-addons-for-elementor' ),
1462 ),
1463 'prefix_class' => 'premium-title-',
1464 'default' => 'color',
1465 'label_block' => true,
1466 'separator' => 'before',
1467 'condition' => array(
1468 'premium_title_style!' => array( 'style8', 'style9' ),
1469 ),
1470 )
1471 );
1472
1473 $this->add_group_control(
1474 Premium_Background::get_type(),
1475 array(
1476 'name' => 'title_background',
1477 'types' => array( 'classic', 'gradient' ),
1478 'condition' => array(
1479 'premium_title_style!' => array( 'style8', 'style9' ),
1480 'background_style!' => '',
1481 ),
1482 'selector' => '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-header, {{WRAPPER}}.premium-title-clipped .premium-title-text',
1483 )
1484 );
1485
1486 $this->add_control(
1487 'premium_title_style2_background_color',
1488 array(
1489 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1490 'type' => Controls_Manager::COLOR,
1491 'global' => array(
1492 'default' => Global_Colors::COLOR_SECONDARY,
1493 ),
1494 'selectors' => array(
1495 '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style2, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};',
1496 ),
1497 'condition' => array(
1498 'premium_title_style' => 'style2',
1499 'background_style' => '',
1500 ),
1501 )
1502 );
1503
1504 $this->add_control(
1505 'premium_title_style3_background_color',
1506 array(
1507 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1508 'type' => Controls_Manager::COLOR,
1509 'global' => array(
1510 'default' => Global_Colors::COLOR_SECONDARY,
1511 ),
1512 'selectors' => array(
1513 '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style3, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};',
1514 ),
1515 'condition' => array(
1516 'premium_title_style' => 'style3',
1517 'background_style' => '',
1518 ),
1519 )
1520 );
1521
1522 $this->add_control(
1523 'heading_lq_effect',
1524 array(
1525 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ),
1526 'type' => Controls_Manager::SELECT,
1527 'description' => sprintf(
1528 /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */
1529 esc_html__( 'Important: Make sure this element has a semi-transparent background color to see the effect. See all presets from %1$shere%2$s.', 'premium-addons-for-elementor' ),
1530 '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">',
1531 '</a>'
1532 ),
1533 'options' => array(
1534 'none' => __( 'None', 'premium-addons-for-elementor' ),
1535 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ),
1536 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ),
1537 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ),
1538 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ),
1539 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ),
1540 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ),
1541 ),
1542 'default' => 'none',
1543 'label_block' => true,
1544 'condition' => array(
1545 'background_style' => 'color',
1546 'premium_title_style!' => array( 'style8', 'style9' ),
1547 ),
1548 )
1549 );
1550
1551 $this->add_control(
1552 'premium_title_style5_header_line_color',
1553 array(
1554 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
1555 'type' => Controls_Manager::COLOR,
1556 'global' => array(
1557 'default' => Global_Colors::COLOR_PRIMARY,
1558 ),
1559 'selectors' => array(
1560 '{{WRAPPER}} .premium-title-style5' => 'border-bottom: 2px solid {{VALUE}};',
1561 ),
1562 'condition' => array(
1563 'premium_title_style' => 'style5',
1564 ),
1565 )
1566 );
1567
1568 $this->add_group_control(
1569 Group_Control_Border::get_type(),
1570 array(
1571 'name' => 'style_five_border',
1572 'selector' => '{{WRAPPER}} .premium-title-container',
1573 'condition' => array(
1574 'premium_title_style' => array( 'style2', 'style4', 'style5', 'style6' ),
1575 ),
1576 )
1577 );
1578
1579 $this->add_control(
1580 'premium_title_style6_header_line_color',
1581 array(
1582 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
1583 'type' => Controls_Manager::COLOR,
1584 'global' => array(
1585 'default' => Global_Colors::COLOR_PRIMARY,
1586 ),
1587 'selectors' => array(
1588 '{{WRAPPER}} .premium-title-style6' => 'border-bottom: 2px solid {{VALUE}};',
1589 ),
1590 'condition' => array(
1591 'premium_title_style' => 'style6',
1592 ),
1593 )
1594 );
1595
1596 $this->add_control(
1597 'premium_title_style6_triangle_color',
1598 array(
1599 'label' => __( 'Triangle Color', 'premium-addons-for-elementor' ),
1600 'type' => Controls_Manager::COLOR,
1601 'global' => array(
1602 'default' => Global_Colors::COLOR_PRIMARY,
1603 ),
1604 'selectors' => array(
1605 '{{WRAPPER}} .premium-title-style6:before' => 'border-bottom-color: {{VALUE}};',
1606 ),
1607 'condition' => array(
1608 'premium_title_style' => 'style6',
1609 ),
1610 )
1611 );
1612
1613 $this->add_group_control(
1614 Group_Control_Text_Shadow::get_type(),
1615 array(
1616 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
1617 'name' => 'premium_title_text_shadow',
1618 'selector' => '{{WRAPPER}} .premium-title-header',
1619 )
1620 );
1621
1622 $this->add_control(
1623 'premium_title_shadow_value',
1624 array(
1625 'label' => esc_html__( 'Blur Shadow Value (px)', 'premium-addons-for-elementor' ),
1626 'type' => Controls_Manager::NUMBER,
1627 'min' => '10',
1628 'max' => '500',
1629 'step' => '10',
1630 'dynamic' => array( 'active' => true ),
1631 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-value: {{VALUE}}px;' ),
1632 'default' => '120',
1633 'condition' => array(
1634 'premium_title_style' => 'style9',
1635 ),
1636 )
1637 );
1638
1639 $this->add_control(
1640 'premium_title_delay',
1641 array(
1642 'label' => esc_html__( 'Animation Delay (s)', 'premium-addons-for-elementor' ),
1643 'type' => Controls_Manager::NUMBER,
1644 'min' => '1',
1645 'max' => '30',
1646 'step' => 0.5,
1647 'condition' => array(
1648 'premium_title_style' => array( 'style8', 'style9' ),
1649 ),
1650 'render_type' => 'template',
1651 'dynamic' => array( 'active' => true ),
1652 'default' => '2',
1653 )
1654 );
1655
1656 $this->add_control(
1657 'shining_animation_duration',
1658 array(
1659 'label' => __( 'Animation Duration (s)', 'premium-addons-for-elementor' ),
1660 'type' => Controls_Manager::NUMBER,
1661 'default' => '1',
1662 'step' => 0.5,
1663 'condition' => array(
1664 'premium_title_style' => 'style8',
1665 ),
1666 'frontend_available' => true,
1667 'render_type' => 'template',
1668 'selectors' => array(
1669 '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--animation-speed: {{VALUE}}s ',
1670 ),
1671 )
1672 );
1673
1674 $this->add_responsive_control(
1675 'premium_title_margin',
1676 array(
1677 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1678 'type' => Controls_Manager::DIMENSIONS,
1679 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
1680 'selectors' => array(
1681 '{{WRAPPER}} .premium-title-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1682 ),
1683 )
1684 );
1685
1686 $this->add_responsive_control(
1687 'premium_title_padding',
1688 array(
1689 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1690 'type' => Controls_Manager::DIMENSIONS,
1691 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
1692 'selectors' => array(
1693 '{{WRAPPER}} .premium-title-header, {{WRAPPER}}.premium-title-noise-yes .premium-title-noise-word::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-noise-word::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1694 ),
1695 )
1696 );
1697
1698 $this->add_control(
1699 'gradient_text_switcher',
1700 array(
1701 'label' => __( 'Animated Gradient', 'premium-addons-for-elementor' ),
1702 'type' => Controls_Manager::SWITCHER,
1703 'prefix_class' => 'premium-title-gradient-',
1704 'separator' => 'before',
1705 'condition' => array(
1706 'premium_title_style!' => array( 'style8', 'style9' ),
1707 'mask_switcher!' => 'yes',
1708 'stroke_switcher!' => 'yes',
1709 'background_style' => 'color',
1710 ),
1711 )
1712 );
1713
1714 $this->add_control(
1715 'animation_transition_speed',
1716 array(
1717 'label' => __( 'Animation Speed (sec)', 'premium-addons-for-elementor' ),
1718 'type' => Controls_Manager::SLIDER,
1719 'range' => array(
1720 'px' => array(
1721 'min' => 0,
1722 'max' => 10,
1723 'step' => .1,
1724 ),
1725 ),
1726 'selectors' => array(
1727 '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text, {{WRAPPER}}.premium-title-gradient-yes .premium-title-icon' => 'animation-duration: {{SIZE}}s ',
1728 ),
1729 'condition' => array(
1730 'gradient_text_switcher' => 'yes',
1731 'premium_title_style!' => array( 'style8', 'style9' ),
1732 'mask_switcher!' => 'yes',
1733 'stroke_switcher!' => 'yes',
1734 'background_style' => 'color',
1735 ),
1736 )
1737 );
1738
1739 $this->add_group_control(
1740 Premium_Background::get_type(),
1741 array(
1742 'name' => 'text_gradient',
1743 'types' => array( 'gradient' ),
1744 'selector' => '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text, {{WRAPPER}}.premium-title-gradient-yes .premium-title-icon',
1745 'condition' => array(
1746 'gradient_text_switcher' => 'yes',
1747 'premium_title_style!' => array( 'style8', 'style9' ),
1748 'mask_switcher!' => 'yes',
1749 'stroke_switcher!' => 'yes',
1750 'background_style' => 'color',
1751 ),
1752 )
1753 );
1754
1755 $this->add_control(
1756 'noise_heading',
1757 array(
1758 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ),
1759 'type' => Controls_Manager::HEADING,
1760 'condition' => array(
1761 'noise' => 'yes',
1762 'premium_title_style!' => array( 'style8', 'style9' ),
1763 'mask_switcher!' => 'yes',
1764 'gradient_text_switcher!' => 'yes',
1765 'background_style' => 'color',
1766 ),
1767 )
1768 );
1769
1770 $this->add_control(
1771 'noise_first_color',
1772 array(
1773 'label' => __( 'Color #1', 'premium-addons-for-elementor' ),
1774 'type' => Controls_Manager::COLOR,
1775 'condition' => array(
1776 'noise' => 'yes',
1777 'premium_title_style!' => array( 'style8', 'style9' ),
1778 'mask_switcher!' => 'yes',
1779 'gradient_text_switcher!' => 'yes',
1780 'background_style' => 'color',
1781 ),
1782 'selectors' => array(
1783 '{{WRAPPER}}.premium-title-noise-yes .premium-title-noise-word::before' => 'text-shadow: 1px 0 {{VALUE}};',
1784 ),
1785 )
1786 );
1787
1788 $this->add_control(
1789 'noise_second_color',
1790 array(
1791 'label' => __( 'Color #2', 'premium-addons-for-elementor' ),
1792 'type' => Controls_Manager::COLOR,
1793 'condition' => array(
1794 'noise' => 'yes',
1795 'premium_title_style!' => array( 'style8', 'style9' ),
1796 'mask_switcher!' => 'yes',
1797 'gradient_text_switcher!' => 'yes',
1798 'background_style' => 'color',
1799 ),
1800 'selectors' => array(
1801 '{{WRAPPER}}.premium-title-noise-yes .premium-title-noise-word::after' => 'text-shadow: -1px 0 {{VALUE}};',
1802 ),
1803 )
1804 );
1805
1806 $this->end_controls_section();
1807
1808 $this->start_controls_section(
1809 'stroke_style_section',
1810 array(
1811 'label' => __( 'Stroke', 'premium-addons-for-elementor' ),
1812 'tab' => Controls_Manager::TAB_STYLE,
1813 'condition' => array(
1814 'stroke_switcher' => 'yes',
1815 'premium_title_style!' => 'style9',
1816 'background_style' => 'color',
1817 ),
1818 )
1819 );
1820
1821 $this->add_control(
1822 'stroke_text_color',
1823 array(
1824 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1825 'type' => Controls_Manager::COLOR,
1826 'condition' => array(
1827 'stroke_switcher' => 'yes',
1828 ),
1829 'selectors' => array(
1830 '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-color: {{VALUE}};',
1831 ),
1832 )
1833 );
1834
1835 $this->add_responsive_control(
1836 'stroke_width',
1837 array(
1838 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
1839 'type' => Controls_Manager::SLIDER,
1840 'condition' => array(
1841 'stroke_switcher' => 'yes',
1842 ),
1843 'default' => array(
1844 'size' => 1,
1845 'unit' => 'px',
1846 ),
1847 'selectors' => array(
1848 '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-width: {{SIZE}}px',
1849 ),
1850 )
1851 );
1852
1853 $this->end_controls_section();
1854
1855 $this->start_controls_section(
1856 'focused_word_style_section',
1857 array(
1858 'label' => __( 'Focused Word', 'premium-addons-for-elementor' ),
1859 'tab' => Controls_Manager::TAB_STYLE,
1860 )
1861 );
1862
1863 $this->add_control(
1864 'focused_word_color',
1865 array(
1866 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1867 'type' => Controls_Manager::COLOR,
1868 'global' => array(
1869 'default' => Global_Colors::COLOR_TEXT,
1870 ),
1871 'selectors' => array(
1872 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'color: {{VALUE}}',
1873 '{{WRAPPER}}.premium-title-noise-yes .premium-title__focused-word::before, {{WRAPPER}}.premium-title-noise-yes .premium-title__focused-word::after' => 'color: {{VALUE}}',
1874 '{{WRAPPER}}.premium-title-stroke-yes .premium-title__focused-word' => '-webkit-text-fill-color: {{VALUE}}',
1875 ),
1876 )
1877 );
1878
1879 $this->add_responsive_control(
1880 'focused_stroke_width',
1881 array(
1882 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
1883 'type' => Controls_Manager::SLIDER,
1884 'default' => array(
1885 'size' => 1,
1886 'unit' => 'px',
1887 ),
1888 'selectors' => array(
1889 '{{WRAPPER}}.premium-title-stroke-yes .premium-title__focused-word' => '-webkit-text-stroke-width: {{SIZE}}px',
1890 ),
1891 'condition' => array(
1892 'stroke_switcher' => 'yes',
1893 ),
1894 )
1895 );
1896
1897 $this->add_control(
1898 'focused_stroke_text_color',
1899 array(
1900 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1901 'type' => Controls_Manager::COLOR,
1902 'selectors' => array(
1903 '{{WRAPPER}}.premium-title-stroke-yes .premium-title__focused-word' => '-webkit-text-stroke-color: {{VALUE}};',
1904 ),
1905 'condition' => array(
1906 'stroke_switcher' => 'yes',
1907 ),
1908 )
1909 );
1910
1911 $this->add_group_control(
1912 Group_Control_Typography::get_type(),
1913 array(
1914 'name' => 'focused_word_typography',
1915 'selector' => '{{WRAPPER}} .premium-title-text .premium-title__focused-word',
1916 )
1917 );
1918
1919 $this->add_group_control(
1920 Group_Control_Border::get_type(),
1921 array(
1922 'name' => 'focused_word_border',
1923 'selector' => '{{WRAPPER}} .premium-title-text .premium-title__focused-word',
1924 )
1925 );
1926
1927 $this->add_control(
1928 'focused_word_border_radius',
1929 array(
1930 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1931 'type' => Controls_Manager::SLIDER,
1932 'size_units' => array( 'px', '%', 'em' ),
1933 'selectors' => array(
1934 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'border-radius: {{SIZE}}{{UNIT}};',
1935 ),
1936 'condition' => array(
1937 'icon_adv_radius!' => 'yes',
1938 ),
1939 )
1940 );
1941
1942 $this->add_group_control(
1943 Group_Control_Text_Shadow::get_type(),
1944 array(
1945 'name' => 'focused_word_shadow',
1946 'selector' => '{{WRAPPER}} .premium-title-text .premium-title__focused-word',
1947 )
1948 );
1949
1950 $this->add_responsive_control(
1951 'focused_word_margin',
1952 array(
1953 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1954 'type' => Controls_Manager::DIMENSIONS,
1955 'size_units' => array( 'px', 'em', '%', 'custom' ),
1956 'allowed_dimensions' => array( 'left', 'right' ),
1957 'placeholder' => array(
1958 'top' => '',
1959 'right' => '',
1960 'bottom' => '',
1961 'left' => '',
1962 ),
1963 'selectors' => array(
1964 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1965 ),
1966 )
1967 );
1968
1969 $this->add_responsive_control(
1970 'focused_word_padding',
1971 array(
1972 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1973 'type' => Controls_Manager::DIMENSIONS,
1974 'size_units' => array( 'px', 'em', '%', 'custom' ),
1975 'selectors' => array(
1976 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1977 ),
1978 )
1979 );
1980
1981 $this->end_controls_section();
1982
1983 $this->start_controls_section(
1984 'premium_title_icon_style_section',
1985 array(
1986 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
1987 'tab' => Controls_Manager::TAB_STYLE,
1988 'condition' => array(
1989 'premium_title_icon_switcher' => 'yes',
1990 ),
1991 )
1992 );
1993
1994 $this->add_control(
1995 'premium_title_icon_color',
1996 array(
1997 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1998 'type' => Controls_Manager::COLOR,
1999 'global' => array(
2000 'default' => Global_Colors::COLOR_PRIMARY,
2001 ),
2002 'selectors' => array(
2003 '{{WRAPPER}} .premium-title-icon' => 'color: {{VALUE}}',
2004 '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'fill: {{VALUE}};',
2005 ),
2006 'condition' => array(
2007 'icon_type' => array( 'icon', 'svg' ),
2008 ),
2009 )
2010 );
2011
2012 if ( $draw_icon ) {
2013 $this->add_control(
2014 'stroke_color',
2015 array(
2016 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
2017 'type' => Controls_Manager::COLOR,
2018 'global' => array(
2019 'default' => Global_Colors::COLOR_ACCENT,
2020 ),
2021 'condition' => array(
2022 'icon_type' => array( 'icon', 'svg' ),
2023 ),
2024 'selectors' => array(
2025 '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'stroke: {{VALUE}};',
2026 ),
2027 )
2028 );
2029
2030 $this->add_control(
2031 'svg_color',
2032 array(
2033 'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ),
2034 'type' => Controls_Manager::COLOR,
2035 'global' => false,
2036 'separator' => 'after',
2037 'condition' => array(
2038 'icon_type' => array( 'icon', 'svg' ),
2039 'draw_svg' => 'yes',
2040 ),
2041 )
2042 );
2043 }
2044
2045 $this->add_responsive_control(
2046 'premium_title_icon_size',
2047 array(
2048 'label' => __( 'Size', 'premium-addons-for-elementor' ),
2049 'type' => Controls_Manager::SLIDER,
2050 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2051 'range' => array(
2052 'px' => array(
2053 'min' => 10,
2054 'max' => 300,
2055 ),
2056 'em' => array(
2057 'min' => 1,
2058 'max' => 30,
2059 ),
2060 ),
2061 'condition' => array(
2062 'icon_type!' => 'svg',
2063 ),
2064 'selectors' => array(
2065 '{{WRAPPER}} .premium-title-header i' => 'font-size: {{SIZE}}{{UNIT}}',
2066 '{{WRAPPER}} .premium-title-header svg, {{WRAPPER}} .premium-title-header img' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important',
2067 ),
2068 )
2069 );
2070
2071 $this->add_responsive_control(
2072 'svg_icon_width',
2073 array(
2074 'label' => __( 'Width', 'premium-addons-for-elementor' ),
2075 'type' => Controls_Manager::SLIDER,
2076 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2077 'range' => array(
2078 'px' => array(
2079 'min' => 1,
2080 'max' => 600,
2081 ),
2082 'em' => array(
2083 'min' => 1,
2084 'max' => 30,
2085 ),
2086 ),
2087 'default' => array(
2088 'size' => 100,
2089 'unit' => 'px',
2090 ),
2091 'condition' => array(
2092 'icon_type' => 'svg',
2093 ),
2094 'selectors' => array(
2095 '{{WRAPPER}} .premium-title-header svg' => 'width: {{SIZE}}{{UNIT}};',
2096 ),
2097 )
2098 );
2099
2100 $this->add_responsive_control(
2101 'svg_icon_height',
2102 array(
2103 'label' => __( 'Height', 'premium-addons-for-elementor' ),
2104 'type' => Controls_Manager::SLIDER,
2105 'size_units' => array( 'px', 'em', 'custom' ),
2106 'range' => array(
2107 'px' => array(
2108 'min' => 1,
2109 'max' => 300,
2110 ),
2111 'em' => array(
2112 'min' => 1,
2113 'max' => 30,
2114 ),
2115 ),
2116 'condition' => array(
2117 'icon_type' => 'svg',
2118 ),
2119 'selectors' => array(
2120 '{{WRAPPER}} .premium-title-header svg' => 'height: {{SIZE}}{{UNIT}}',
2121 ),
2122 )
2123 );
2124
2125 $this->add_group_control(
2126 Premium_Background::get_type(),
2127 array(
2128 'name' => 'premium_title_icon_background',
2129 'types' => array( 'classic', 'gradient' ),
2130 'selector' => '{{WRAPPER}} .premium-title-icon',
2131 )
2132 );
2133
2134 $this->add_group_control(
2135 Group_Control_Border::get_type(),
2136 array(
2137 'name' => 'premium_title_icon_border',
2138 'selector' => '{{WRAPPER}} .premium-title-icon',
2139 )
2140 );
2141
2142 $this->add_control(
2143 'premium_title_icon_border_radius',
2144 array(
2145 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2146 'type' => Controls_Manager::SLIDER,
2147 'size_units' => array( 'px', '%', 'em' ),
2148 'selectors' => array(
2149 '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{SIZE}}{{UNIT}};',
2150 ),
2151 'condition' => array(
2152 'icon_adv_radius!' => 'yes',
2153 ),
2154 )
2155 );
2156
2157 $this->add_control(
2158 'icon_adv_radius',
2159 array(
2160 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
2161 'type' => Controls_Manager::SWITCHER,
2162 'description' => __( 'Apply custom radius values. Get the radius value from ', 'premium-addons-for-elementor' ) . '<a href="https://9elements.github.io/fancy-border-radius/" target="_blank">here</a>' . __( '. See ', 'premium-addons-for-elementor' ) . '<a href="https://www.youtube.com/watch?v=S0BJazLHV-M" target="_blank">tutorial</a>',
2163 )
2164 );
2165
2166 $this->add_control(
2167 'icon_adv_radius_value',
2168 array(
2169 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2170 'type' => Controls_Manager::TEXT,
2171 'dynamic' => array( 'active' => true ),
2172 'selectors' => array(
2173 '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{VALUE}};',
2174 ),
2175 'condition' => array(
2176 'icon_adv_radius' => 'yes',
2177 ),
2178 'ai' => array(
2179 'active' => false,
2180 ),
2181 )
2182 );
2183
2184 $this->add_responsive_control(
2185 'premium_title_icon_margin',
2186 array(
2187 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2188 'type' => Controls_Manager::DIMENSIONS,
2189 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2190 'selectors' => array(
2191 '{{WRAPPER}} .premium-title-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
2192 ),
2193 )
2194 );
2195
2196 $this->add_responsive_control(
2197 'premium_title_icon_padding',
2198 array(
2199 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2200 'type' => Controls_Manager::DIMENSIONS,
2201 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2202 'selectors' => array(
2203 '{{WRAPPER}} .premium-title-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
2204 ),
2205 )
2206 );
2207
2208 $this->add_group_control(
2209 Group_Control_Text_Shadow::get_type(),
2210 array(
2211 'label' => __( 'Icon Shadow', 'premium-addons-for-elementor' ),
2212 'name' => 'premium_title_icon_text_shadow',
2213 'selector' => '{{WRAPPER}} .premium-title-icon',
2214 'condition' => array(
2215 'icon_type' => 'icon',
2216 ),
2217 )
2218 );
2219
2220 $this->end_controls_section();
2221
2222 $this->start_controls_section(
2223 'premium_title_desc_style_section',
2224 array(
2225 'label' => __( 'Description', 'premium-addons-for-elementor' ),
2226 'tab' => Controls_Manager::TAB_STYLE,
2227 'condition' => array(
2228 'premium_title_desc_switcher' => 'yes',
2229 ),
2230 )
2231 );
2232
2233 $this->add_control(
2234 'premium_title_desc_color',
2235 array(
2236 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2237 'type' => Controls_Manager::COLOR,
2238 'selectors' => array(
2239 '{{WRAPPER}} .premium-title-description, {{WRAPPER}} .premium-title-description *' => 'color: {{VALUE}};',
2240 ),
2241 )
2242 );
2243
2244 $this->add_group_control(
2245 Group_Control_Typography::get_type(),
2246 array(
2247 'name' => 'premium_title_desc_typography',
2248 'global' => array(
2249 'default' => Global_Typography::TYPOGRAPHY_TEXT,
2250 ),
2251 'selector' => '{{WRAPPER}} .premium-title-description',
2252 )
2253 );
2254
2255 $this->add_group_control(
2256 Group_Control_Text_Shadow::get_type(),
2257 array(
2258 'name' => 'premium_title_desc_text_shadow',
2259 'selector' => '{{WRAPPER}} .premium-title-description',
2260 )
2261 );
2262
2263 $this->add_group_control(
2264 Premium_Background::get_type(),
2265 array(
2266 'name' => 'premium_title_desc_background',
2267 'types' => array( 'classic', 'gradient' ),
2268 'selector' => '{{WRAPPER}} .premium-title-description',
2269 )
2270 );
2271
2272 $this->add_group_control(
2273 Group_Control_Box_Shadow::get_type(),
2274 array(
2275 'name' => 'premium_title_desc_box_shadow',
2276 'selector' => '{{WRAPPER}} .premium-title-description',
2277 )
2278 );
2279
2280 $this->add_group_control(
2281 Group_Control_Border::get_type(),
2282 array(
2283 'name' => 'premium_title_desc_border',
2284 'selector' => '{{WRAPPER}} .premium-title-description',
2285 )
2286 );
2287
2288 $this->add_responsive_control(
2289 'premium_title_desc_border_radius',
2290 array(
2291 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2292 'type' => Controls_Manager::DIMENSIONS,
2293 'size_units' => array( 'px', '%', 'em' ),
2294 'selectors' => array(
2295 '{{WRAPPER}} .premium-title-description' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2296 ),
2297 )
2298 );
2299
2300 $this->add_responsive_control(
2301 'premium_title_desc_margin',
2302 array(
2303 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2304 'type' => Controls_Manager::DIMENSIONS,
2305 'size_units' => array( 'px', 'em', '%' ),
2306 'selectors' => array(
2307 '{{WRAPPER}} .premium-title-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2308 ),
2309 )
2310 );
2311
2312 $this->add_responsive_control(
2313 'premium_title_desc_padding',
2314 array(
2315 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2316 'type' => Controls_Manager::DIMENSIONS,
2317 'size_units' => array( 'px', 'em', '%' ),
2318 'selectors' => array(
2319 '{{WRAPPER}} .premium-title-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2320 ),
2321 )
2322 );
2323
2324 $this->end_controls_section();
2325
2326 $this->start_controls_section(
2327 'stripe_style_section',
2328 array(
2329 'label' => __( 'Stripe', 'premium-addons-for-elementor' ),
2330 'tab' => Controls_Manager::TAB_STYLE,
2331 'condition' => array(
2332 'premium_title_style' => 'style7',
2333 ),
2334 )
2335 );
2336
2337 $this->add_control(
2338 'premium_title_style7_strip_color',
2339 array(
2340 'label' => __( 'Stripe Color', 'premium-addons-for-elementor' ),
2341 'type' => Controls_Manager::COLOR,
2342 'global' => array(
2343 'default' => Global_Colors::COLOR_PRIMARY,
2344 ),
2345 'selectors' => array(
2346 '{{WRAPPER}} .premium-title-style7-stripe' => 'background-color: {{VALUE}};',
2347 ),
2348 )
2349 );
2350
2351 $this->add_responsive_control(
2352 'stripe_margin',
2353 array(
2354 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2355 'type' => Controls_Manager::DIMENSIONS,
2356 'size_units' => array( 'px', 'em', '%', 'custom' ),
2357 'selectors' => array(
2358 '{{WRAPPER}} .premium-title-style7-stripe' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2359 ),
2360 )
2361 );
2362
2363 $this->end_controls_section();
2364
2365 $this->start_controls_section(
2366 'background_text_style_section',
2367 array(
2368 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
2369 'tab' => Controls_Manager::TAB_STYLE,
2370 'condition' => array(
2371 'background_text_switcher' => 'yes',
2372 ),
2373 )
2374 );
2375
2376 $this->add_control(
2377 'background_text_color',
2378 array(
2379 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2380 'type' => Controls_Manager::COLOR,
2381 'global' => array(
2382 'default' => Global_Colors::COLOR_PRIMARY,
2383 ),
2384 'selectors' => array(
2385 '{{WRAPPER}} .premium-title-bg-text:before' => 'color: {{VALUE}}',
2386 ),
2387 )
2388 );
2389
2390 $this->add_control(
2391 'bg_stroke_text_color',
2392 array(
2393 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
2394 'type' => Controls_Manager::COLOR,
2395 'condition' => array(
2396 'bg_stroke_switcher' => 'yes',
2397 ),
2398 'selectors' => array(
2399 '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-color: {{VALUE}};',
2400 ),
2401 )
2402 );
2403
2404 $this->add_group_control(
2405 Group_Control_Typography::get_type(),
2406 array(
2407 'name' => 'background_text_typography',
2408 'global' => array(
2409 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2410 ),
2411 'selector' => '{{WRAPPER}} .premium-title-bg-text:before',
2412 )
2413 );
2414
2415 $this->add_group_control(
2416 Group_Control_Text_Shadow::get_type(),
2417 array(
2418 'name' => 'background_text_shadow',
2419 'selector' => '{{WRAPPER}} .premium-title-bg-text:before',
2420 )
2421 );
2422
2423 $this->add_responsive_control(
2424 'bg_stroke_width',
2425 array(
2426 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
2427 'type' => Controls_Manager::SLIDER,
2428 'default' => array(
2429 'size' => 1,
2430 'unit' => 'px',
2431 ),
2432 'condition' => array(
2433 'bg_stroke_switcher' => 'yes',
2434 ),
2435 'selectors' => array(
2436 '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-width: {{SIZE}}px',
2437 ),
2438 )
2439 );
2440
2441 $this->add_control(
2442 'background_text_mix_blend',
2443 array(
2444 'label' => __( 'Blend Mode', 'premium-addons-for-elementor' ),
2445 'type' => Controls_Manager::SELECT,
2446 'options' => array(
2447 '' => __( 'Normal', 'premium-addons-for-elementor' ),
2448 'multiply' => 'Multiply',
2449 'screen' => 'Screen',
2450 'overlay' => 'Overlay',
2451 'darken' => 'Darken',
2452 'lighten' => 'Lighten',
2453 'color-dodge' => 'Color Dodge',
2454 'saturation' => 'Saturation',
2455 'color' => 'Color',
2456 'luminosity' => 'Luminosity',
2457 ),
2458 'selectors' => array(
2459 '{{WRAPPER}} .premium-title-bg-text:before' => 'mix-blend-mode: {{VALUE}}',
2460 ),
2461 )
2462 );
2463
2464 $this->add_control(
2465 'background_text_zindex',
2466 array(
2467 'label' => __( 'z-Index', 'premium-addons-for-elementor' ),
2468 'type' => Controls_Manager::NUMBER,
2469 'min' => -10,
2470 'max' => 20,
2471 'step' => 1,
2472 'selectors' => array(
2473 '{{WRAPPER}} .premium-title-bg-text:before' => 'z-index: {{VALUE}}',
2474 ),
2475 )
2476 );
2477
2478 $this->end_controls_section();
2479
2480 $this->start_controls_section(
2481 'underline_style_section',
2482 array(
2483 'label' => __( 'Underline', 'premium-addons-for-elementor' ),
2484 'tab' => Controls_Manager::TAB_STYLE,
2485 'condition' => array(
2486 'hover_effect!' => 'none',
2487 ),
2488 )
2489 );
2490
2491 $this->add_control(
2492 'underline_color',
2493 array(
2494 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
2495 'type' => Controls_Manager::COLOR,
2496 'global' => array(
2497 'default' => Global_Colors::COLOR_SECONDARY,
2498 ),
2499 'selectors' => array(
2500 '{{WRAPPER}} .premium-btn-svg' => 'stroke: {{VALUE}};',
2501 '{{WRAPPER}} .premium-button-line2::before, {{WRAPPER}} .premium-button-line4::before, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after, {{WRAPPER}} .premium-button-line7::before' => 'background-color: {{VALUE}};',
2502 ),
2503 )
2504 );
2505
2506 $this->add_responsive_control(
2507 'line_width',
2508 array(
2509 'label' => __( 'Line Width (%)', 'premium-addons-for-elementor' ),
2510 'type' => Controls_Manager::SLIDER,
2511 'condition' => array(
2512 'hover_effect' => array( 'line1', 'line3', 'line5' ),
2513 ),
2514 'default' => array(
2515 'size' => 100,
2516 ),
2517 'selectors' => array(
2518 '{{WRAPPER}} .premium-btn-svg, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after' => 'width: {{SIZE}}%',
2519 ),
2520 )
2521 );
2522
2523 $this->add_responsive_control(
2524 'line_height',
2525 array(
2526 'label' => __( 'Line Height (PX)', 'premium-addons-for-elementor' ),
2527 'type' => Controls_Manager::SLIDER,
2528 'condition' => array(
2529 'hover_effect!' => array( 'line1', 'line3', 'line4' ),
2530 ),
2531 'selectors' => array(
2532 '{{WRAPPER}} .premium-button-line2::before, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after, {{WRAPPER}} .premium-button-line7::before' => 'height: {{SIZE}}px',
2533 ),
2534 )
2535 );
2536
2537 $this->add_responsive_control(
2538 'line_h_position',
2539 array(
2540 'label' => __( 'Line Horizontal Position (%)', 'premium-addons-for-elementor' ),
2541 'type' => Controls_Manager::SLIDER,
2542 'condition' => array(
2543 'hover_effect' => array( 'line3', 'line5' ),
2544 ),
2545 'selectors' => array(
2546 '{{WRAPPER}} .premium-btn-line-wrap, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after' => 'left: {{SIZE}}%',
2547 ),
2548 )
2549 );
2550
2551 $this->add_responsive_control(
2552 'line_v_position',
2553 array(
2554 'label' => __( 'Line Vertical Position (%)', 'premium-addons-for-elementor' ),
2555 'type' => Controls_Manager::SLIDER,
2556 'selectors' => array(
2557 '{{WRAPPER}} .premium-btn-line-wrap, {{WRAPPER}} .premium-button-line2::before, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line7::before' => 'top: {{SIZE}}%',
2558 '{{WRAPPER}} .premium-button-line5::after' => 'top: calc( ( {{SIZE}}% + 2px ) + {{line_height.SIZE}}px )',
2559 ),
2560 )
2561 );
2562
2563 $this->end_controls_section();
2564 }
2565
2566 /**
2567 * Render title widget output on the frontend.
2568 *
2569 * Written in PHP and used to generate the final HTML.
2570 *
2571 * @since 1.0.0
2572 * @access protected
2573 */
2574 protected function render() {
2575
2576 $settings = $this->get_settings_for_display();
2577
2578 $this->add_render_attribute( 'premium_title_text', 'class', 'premium-title-text' );
2579
2580 $title_tag = Helper_Functions::validate_html_tag( $settings['premium_title_tag'] );
2581
2582 $selected_style = $settings['premium_title_style'];
2583
2584 $this->add_render_attribute( 'container', 'class', 'premium-title-container' );
2585
2586 $this->add_render_attribute( 'title', 'class', array( 'premium-title-header', 'premium-title-' . $selected_style ) );
2587
2588 if ( 'none' !== $settings['heading_lq_effect'] ) {
2589 $this->add_render_attribute( 'title', 'class', 'premium-con-lq__' . $settings['heading_lq_effect'] );
2590 }
2591
2592 if ( 'none' !== $settings['hover_effect'] ) {
2593 $this->add_render_attribute( 'title', 'class', 'premium-button-' . $settings['hover_effect'] );
2594 }
2595
2596 if ( 'style8' === $selected_style ) {
2597
2598 $this->add_render_attribute(
2599 'premium_title_text',
2600 array(
2601 'data-shiny-delay' => $settings['premium_title_delay'],
2602 'data-shiny-dur' => $settings['shining_animation_duration'],
2603 )
2604 );
2605
2606 } elseif ( 'style9' === $selected_style ) {
2607
2608 $this->add_render_attribute( 'title', 'data-blur-delay', $settings['premium_title_delay'] );
2609
2610 }
2611
2612 $icon_position = '';
2613
2614 if ( 'yes' === $settings['premium_title_icon_switcher'] ) {
2615
2616 $icon_type = $settings['icon_type'];
2617
2618 $icon_position = $settings['icon_position'];
2619
2620 if ( 'icon' === $icon_type || 'svg' === $icon_type ) {
2621
2622 $this->add_render_attribute( 'icon', 'class', 'premium-drawable-icon' );
2623
2624 if ( ( 'yes' === $settings['draw_svg'] && 'icon' === $icon_type ) || 'svg' === $icon_type ) {
2625 $this->add_render_attribute( 'icon', 'class', 'premium-title-icon' );
2626 }
2627
2628 if ( 'yes' === $settings['draw_svg'] ) {
2629
2630 $this->add_render_attribute(
2631 'container',
2632 'class',
2633 array(
2634 'elementor-invisible',
2635 'premium-drawer-hover',
2636 )
2637 );
2638
2639 $this->add_render_attribute(
2640 'icon',
2641 array(
2642 'class' => 'premium-svg-drawer',
2643 'data-svg-reverse' => $settings['lottie_reverse'],
2644 'data-svg-loop' => $settings['lottie_loop'],
2645 'data-svg-sync' => $settings['svg_sync'],
2646 'data-svg-hover' => $settings['svg_hover'],
2647 'data-svg-fill' => $settings['svg_color'],
2648 'data-svg-frames' => $settings['frames'],
2649 'data-svg-yoyo' => $settings['svg_yoyo'],
2650 'data-svg-point' => $settings['lottie_reverse'] ? $settings['end_point']['size'] : $settings['start_point']['size'],
2651 )
2652 );
2653
2654 } else {
2655 $this->add_render_attribute( 'icon', 'class', 'premium-svg-nodraw' );
2656 }
2657 } elseif ( 'animation' === $icon_type ) {
2658 $this->add_render_attribute(
2659 'title_lottie',
2660 array(
2661 'class' => array(
2662 'premium-title-icon',
2663 'premium-lottie-animation',
2664 ),
2665 'data-lottie-url' => $settings['lottie_url'],
2666 'data-lottie-loop' => $settings['lottie_loop'],
2667 'data-lottie-reverse' => $settings['lottie_reverse'],
2668 )
2669 );
2670 } else {
2671
2672 $src = $settings['image_upload']['url'];
2673
2674 $alt = Control_Media::get_image_alt( $settings['image_upload'] );
2675
2676 $this->add_render_attribute(
2677 'title_img',
2678 array(
2679 'class' => 'premium-title-icon',
2680 'src' => $src,
2681 'alt' => $alt,
2682 )
2683 );
2684 }
2685 }
2686
2687 $link = '';
2688 if ( 'link' === $settings['link_selection'] ) {
2689
2690 $link = ! empty( $settings['existing_link'] ) ? get_permalink( $settings['existing_link'] ) : '';
2691 $this->add_render_attribute( 'link', 'href', $link );
2692
2693 } else {
2694 $link = $settings['custom_link']['url'];
2695 $this->add_link_attributes( 'link', $settings['custom_link'] );
2696
2697 }
2698
2699 if ( ! empty( $settings['background_text'] ) ) {
2700 $this->add_render_attribute(
2701 'container',
2702 array(
2703 'class' => 'premium-title-bg-text',
2704 'data-background' => $settings['background_text'],
2705 )
2706 );
2707 }
2708
2709 $show_desc = 'yes' === $settings['premium_title_desc_switcher'] && ! empty( $settings['premium_title_desc_text'] );
2710
2711 if ( $show_desc ) {
2712 $this->add_render_attribute( 'title_description', 'class', 'premium-title-description' );
2713 }
2714
2715 ?>
2716
2717 <div class="premium-title-wrapper">
2718 <div <?php $this->print_render_attribute_string( 'container' ); ?>>
2719 <<?php echo wp_kses_post( $title_tag . ' ' . $this->get_render_attribute_string( 'title' ) ); ?>>
2720 <?php if ( 'style7' === $selected_style ) : ?>
2721 <?php if ( 'column' !== $icon_position ) : ?>
2722 <span class="premium-title-style7-stripe-wrap">
2723 <span class="premium-title-style7-stripe"></span>
2724 </span>
2725 <?php endif; ?>
2726 <div class="premium-title-style7-inner">
2727 <?php endif; ?>
2728
2729 <?php if ( 'yes' === $settings['premium_title_icon_switcher'] ) : ?>
2730 <?php if ( 'icon' === $icon_type ) : ?>
2731 <?php
2732 if ( 'yes' !== $settings['draw_svg'] ) :
2733 Icons_Manager::render_icon(
2734 $settings['premium_title_icon_updated'],
2735 array(
2736 'class' => array( 'premium-title-icon', 'premium-svg-nodraw', 'premium-drawable-icon' ),
2737 'aria-hidden' => 'true',
2738 )
2739 );
2740 else :
2741
2742 echo Helper_Functions::get_svg_by_icon( $settings['premium_title_icon_updated'], $this->get_render_attribute_string( 'icon' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_svg_by_icon() returns sanitized inline SVG/icon markup.
2743
2744 endif;
2745 ?>
2746
2747 <?php elseif ( 'svg' === $icon_type ) : ?>
2748 <div <?php $this->print_render_attribute_string( 'icon' ); ?>>
2749 <?php echo Helper_Functions::sanitize_svg( $this->get_settings_for_display( 'custom_svg' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- sanitize_svg passes through wp_kses with a strict SVG allowlist. ?>
2750 </div>
2751 <?php elseif ( 'animation' === $icon_type ) : ?>
2752 <div <?php $this->print_render_attribute_string( 'title_lottie' ); ?>></div>
2753 <?php else : ?>
2754 <?php if ( 'yes' === $settings['mask_switcher'] ) : ?>
2755 <span class="premium-title-img">
2756 <?php endif; ?>
2757 <img <?php $this->print_render_attribute_string( 'title_img' ); ?>>
2758 <?php if ( 'yes' === $settings['mask_switcher'] ) : ?>
2759 </span>
2760 <?php endif; ?>
2761 <?php endif; ?>
2762 <?php endif; ?>
2763
2764 <?php if ( 'style7' === $selected_style ) : ?>
2765 <?php if ( 'column' === $icon_position ) : ?>
2766 <span class="premium-title-style7-stripe-wrap">
2767 <span class="premium-title-style7-stripe"></span>
2768 </span>
2769 <?php endif; ?>
2770 <?php endif; ?>
2771 <?php
2772 if ( 'style9' !== $selected_style ) :
2773 if ( 'yes' === $settings['noise'] ) :
2774 $segments = preg_split( '/(\{\{.+?\}\})/u', $settings['premium_title_text'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
2775 $text = '';
2776 foreach ( $segments as $segment ) :
2777 $is_focused = preg_match( '/^\{\{(.+)\}\}$/u', $segment, $matches );
2778 $content = $is_focused ? $matches[1] : $segment;
2779
2780 // Keep connective whitespace outside the glitch span so each ghost aligns tightly to its word.
2781 preg_match( '/^(\s*)(.*?)(\s*)$/su', $content, $pieces );
2782
2783 $text .= esc_html( $pieces[1] );
2784
2785 if ( '' !== $pieces[2] ) :
2786 $word_class = $is_focused ? 'premium-title__focused-word premium-title-noise-word' : 'premium-title-noise-word';
2787 $text .= '<span class="' . $word_class . '" data-text="' . esc_attr( $pieces[2] ) . '">' . esc_html( $pieces[2] ) . '</span>';
2788 endif;
2789
2790 $text .= esc_html( $pieces[3] );
2791 endforeach;
2792 else :
2793 $text = str_replace( array( '{{', '}}' ), array( '<span class="premium-title__focused-word">', '</span>' ), $settings['premium_title_text'] );
2794 endif;
2795 ?>
2796 <span <?php $this->print_render_attribute_string( 'premium_title_text' ); ?>>
2797 <?php echo wp_kses_post( $text ); ?>
2798 </span>
2799 <?php
2800 else :
2801 $letters_html = '<span class="premium-letters-container"' . $this->get_render_attribute_string( 'premium_title_text' ) . '>';
2802 $title_array = preg_split( '//u', $settings['premium_title_text'], -1, PREG_SPLIT_NO_EMPTY );
2803 foreach ( $title_array as $key => $letter ) :
2804 $letters_html .= '<span class="premium-title-style9-letter" data-letter-index="' . esc_attr( $key + 1 ) . '" data-letter="' . esc_attr( $letter ) . '">' . $letter . '</span>';
2805 endforeach;
2806 $the_title = $letters_html . '</span>';
2807 echo wp_kses_post( $the_title );
2808 ?>
2809 <?php endif; ?>
2810
2811 <?php if ( 'style7' === $selected_style ) : ?>
2812 </div>
2813 <?php endif; ?>
2814 <?php if ( ! empty( $link ) ) : ?>
2815 <a <?php $this->print_render_attribute_string( 'link' ); ?>></a>
2816 <?php endif; ?>
2817
2818 <?php if ( 'none' !== $settings['hover_effect'] ) : ?>
2819 <?php echo Helper_Functions::get_btn_svgs( $settings['hover_effect'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_btn_svgs() returns sanitized inline SVG markup. ?>
2820 <?php endif; ?>
2821 </<?php echo wp_kses_post( $title_tag ); ?>>
2822
2823 </div>
2824
2825 <?php if ( $show_desc ) : ?>
2826 <div <?php $this->print_render_attribute_string( 'title_description' ); ?>>
2827 <?php echo wp_kses_post( $settings['premium_title_desc_text'] ); ?>
2828 </div>
2829 <?php endif; ?>
2830 </div>
2831
2832 <?php
2833 }
2834 }
2835