PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.10.30
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.10.30
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 2 years ago premium-banner.php 2 years ago premium-blog.php 2 years ago premium-button.php 2 years ago premium-carousel.php 2 years ago premium-contactform.php 2 years ago premium-countdown.php 2 years ago premium-counter.php 2 years ago premium-dual-header.php 2 years ago premium-fancytext.php 2 years ago premium-grid.php 2 years ago premium-icon-list.php 2 years ago premium-image-button.php 2 years ago premium-image-scroll.php 2 years ago premium-image-separator.php 2 years ago premium-lottie.php 2 years ago premium-maps.php 2 years ago premium-media-wheel.php 2 years ago premium-modalbox.php 2 years ago premium-nav-menu.php 2 years ago premium-notifications.php 2 years ago premium-person.php 2 years ago premium-pinterest-feed.php 2 years ago premium-post-ticker.php 2 years ago premium-pricing-table.php 2 years ago premium-progressbar.php 2 years ago premium-search-form.php 2 years ago premium-svg-drawer.php 2 years ago premium-tcloud.php 2 years ago premium-testimonials.php 2 years ago premium-textual-showcase.php 2 years ago premium-tiktok-feed.php 2 years ago premium-title.php 2 years ago premium-videobox.php 2 years ago premium-vscroll.php 2 years ago premium-weather.php 2 years ago premium-world-clock.php 2 years ago
premium-title.php
2372 lines
1 <?php
2 /**
3 * Premium Title.
4 */
5
6 namespace PremiumAddons\Widgets;
7
8 // Elementor Classes.
9 use Elementor\Widget_Base;
10 use Elementor\Utils;
11 use Elementor\Icons_Manager;
12 use Elementor\Controls_Manager;
13 use Elementor\Control_Media;
14 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
15 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
16 use Elementor\Group_Control_Border;
17 use Elementor\Group_Control_Typography;
18 use Elementor\Group_Control_Text_Shadow;
19 use Elementor\Group_Control_Background;
20
21 // PremiumAddons Classes.
22 use PremiumAddons\Admin\Includes\Admin_Helper;
23 use PremiumAddons\Includes\Helper_Functions;
24 use PremiumAddons\Includes\Premium_Template_Tags;
25
26 if ( ! defined( 'ABSPATH' ) ) {
27 exit; // If this file is called directly, abort.
28 }
29
30 /**
31 * Class Premium_Title
32 */
33 class Premium_Title extends Widget_Base {
34
35 /**
36 * Template Instance
37 *
38 * @var template_instance
39 */
40 protected $template_instance;
41
42 /**
43 * Check Icon Draw Option.
44 *
45 * @since 4.9.26
46 * @access public
47 */
48 public function check_icon_draw() {
49 $is_enabled = Admin_Helper::check_svg_draw( 'premium-title' );
50 return $is_enabled;
51 }
52
53 /**
54 * Get Elementor Helper Instance.
55 *
56 * @since 1.0.0
57 * @access public
58 */
59 public function getTemplateInstance() {
60 return $this->template_instance = Premium_Template_Tags::getInstance();
61 }
62
63 /**
64 * Retrieve Widget Name.
65 *
66 * @since 1.0.0
67 * @access public
68 */
69 public function get_name() {
70 return 'premium-addon-title';
71 }
72
73 /**
74 * Retrieve Widget Title.
75 *
76 * @since 1.0.0
77 * @access public
78 */
79 public function get_title() {
80 return __( 'Heading', 'premium-addons-for-elementor' );
81 }
82
83 /**
84 * Retrieve Widget Icon.
85 *
86 * @since 1.0.0
87 * @access public
88 *
89 * @return string widget icon.
90 */
91 public function get_icon() {
92 return 'pa-title';
93 }
94
95 /**
96 * Retrieve Widget Dependent CSS.
97 *
98 * @since 1.0.0
99 * @access public
100 *
101 * @return array CSS style handles.
102 */
103 public function get_style_depends() {
104 return array(
105 'premium-addons',
106 );
107 }
108
109 /**
110 * Retrieve Widget Dependent JS.
111 *
112 * @since 1.0.0
113 * @access public
114 *
115 * @return array JS script handles.
116 */
117 public function get_script_depends() {
118
119 $draw_scripts = $this->check_icon_draw() ? array(
120 'pa-fontawesome-all',
121 'pa-tweenmax',
122 'pa-motionpath',
123 ) : array();
124
125 return array_merge(
126 $draw_scripts,
127 array(
128 'premium-addons',
129 'elementor-waypoints',
130 'lottie-js',
131 )
132 );
133 }
134
135 /**
136 * Retrieve Widget Categories.
137 *
138 * @since 1.5.1
139 * @access public
140 *
141 * @return array Widget categories.
142 */
143 public function get_categories() {
144 return array( 'premium-elements' );
145 }
146
147 /**
148 * Retrieve Widget Dependent CSS.
149 *
150 * @since 1.0.0
151 * @access public
152 *
153 * @return array CSS style handles.
154 */
155 public function get_keywords() {
156 return array( 'pa', 'premium', 'title', 'text', 'headline' );
157 }
158
159 /**
160 * Retrieve Widget Support URL.
161 *
162 * @access public
163 *
164 * @return string support URL.
165 */
166 public function get_custom_help_url() {
167 return 'https://premiumaddons.com/support/';
168 }
169
170 /**
171 * Register Title controls.
172 *
173 * @since 1.0.0
174 * @access protected
175 */
176 protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
177
178 $draw_icon = $this->check_icon_draw();
179
180 $this->start_controls_section(
181 'premium_title_content',
182 array(
183 'label' => __( 'Title', 'premium-addons-for-elementor' ),
184 )
185 );
186
187 $this->add_control(
188 'premium_title_text',
189 array(
190 'label' => __( 'Title', 'premium-addons-for-elementor' ),
191 'type' => Controls_Manager::TEXT,
192 'default' => __( 'Premium Title', 'premium-addons-for-elementor' ),
193 'label_block' => true,
194 'dynamic' => array( 'active' => true ),
195 )
196 );
197
198 $this->add_control(
199 'premium_title_style',
200 array(
201 'label' => __( 'Style', 'premium-addons-for-elementor' ),
202 'type' => Controls_Manager::SELECT,
203 'default' => 'style1',
204 'options' => array(
205 'style1' => __( 'Style 1', 'premium-addons-for-elementor' ),
206 'style2' => __( 'Style 2', 'premium-addons-for-elementor' ),
207 'style3' => __( 'Style 3', 'premium-addons-for-elementor' ),
208 'style4' => __( 'Style 4', 'premium-addons-for-elementor' ),
209 'style5' => __( 'Style 5', 'premium-addons-for-elementor' ),
210 'style6' => __( 'Style 6', 'premium-addons-for-elementor' ),
211 'style7' => __( 'Style 7', 'premium-addons-for-elementor' ),
212 'style8' => __( 'Style 8', 'premium-addons-for-elementor' ),
213 'style9' => __( 'Style 9', 'premium-addons-for-elementor' ),
214 ),
215 'label_block' => true,
216 )
217 );
218
219 $this->add_control(
220 'premium_title_icon_switcher',
221 array(
222 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
223 'type' => Controls_Manager::SWITCHER,
224 )
225 );
226
227 $this->add_control(
228 'icon_type',
229 array(
230 'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
231 'type' => Controls_Manager::SELECT,
232 'options' => array(
233 'icon' => __( 'Icon', 'premium-addons-for-elementor' ),
234 'image' => __( 'Image', 'premium-addons-for-elementor' ),
235 'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
236 'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ),
237 ),
238 'default' => 'icon',
239 'condition' => array(
240 'premium_title_icon_switcher' => 'yes',
241 ),
242 )
243 );
244
245 $common_conditions = array(
246 'premium_title_icon_switcher' => 'yes',
247 );
248
249 $this->add_control(
250 'premium_title_icon_updated',
251 array(
252 'label' => __( 'Font Awesome Icon', 'premium-addons-for-elementor' ),
253 'type' => Controls_Manager::ICONS,
254 'fa4compatibility' => 'premium_title_icon',
255 'default' => array(
256 'value' => 'fas fa-bars',
257 'library' => 'fa-solid',
258 ),
259 'label_block' => true,
260 'condition' => array_merge(
261 $common_conditions,
262 array(
263 'icon_type' => 'icon',
264 )
265 ),
266 )
267 );
268
269 $this->add_control(
270 'image_upload',
271 array(
272 'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
273 'type' => Controls_Manager::MEDIA,
274 'default' => array(
275 'url' => Utils::get_placeholder_image_src(),
276 ),
277 'condition' => array_merge(
278 $common_conditions,
279 array(
280 'icon_type' => 'image',
281 )
282 ),
283 )
284 );
285
286 $this->add_control(
287 'custom_svg',
288 array(
289 'label' => __( 'SVG Code', 'premium-addons-for-elementor' ),
290 'type' => Controls_Manager::TEXTAREA,
291 '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>',
292 'condition' => array_merge(
293 $common_conditions,
294 array(
295 'icon_type' => 'svg',
296 )
297 ),
298 )
299 );
300
301 $this->add_control(
302 'lottie_url',
303 array(
304 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
305 'type' => Controls_Manager::TEXT,
306 'dynamic' => array( 'active' => true ),
307 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
308 'label_block' => true,
309 'condition' => array_merge(
310 $common_conditions,
311 array(
312 'icon_type' => 'animation',
313 )
314 ),
315 )
316 );
317
318 $animation_conds = array(
319 'terms' => array(
320 array(
321 'name' => 'premium_title_icon_switcher',
322 'value' => 'yes',
323 ),
324 array(
325 'relation' => 'or',
326 'terms' => array(
327 array(
328 'name' => 'icon_type',
329 'value' => 'animation',
330 ),
331 array(
332 'terms' => array(
333 array(
334 'relation' => 'or',
335 'terms' => array(
336 array(
337 'name' => 'icon_type',
338 'value' => 'icon',
339 ),
340 array(
341 'name' => 'icon_type',
342 'value' => 'svg',
343 ),
344 ),
345 ),
346 array(
347 'name' => 'draw_svg',
348 'value' => 'yes',
349 ),
350 ),
351 ),
352 ),
353 ),
354 ),
355 );
356
357 $this->add_control(
358 'draw_svg',
359 array(
360 'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ),
361 'type' => Controls_Manager::SWITCHER,
362 'classes' => $draw_icon ? '' : 'editor-pa-control-disabled',
363 'condition' => array_merge(
364 $common_conditions,
365 array(
366 'icon_type' => array( 'icon', 'svg' ),
367 'premium_title_icon_updated[library]!' => 'svg',
368 )
369 ),
370 )
371 );
372
373 if ( $draw_icon ) {
374
375 $this->add_control(
376 'path_width',
377 array(
378 'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ),
379 'type' => Controls_Manager::SLIDER,
380 'range' => array(
381 'px' => array(
382 'min' => 0,
383 'max' => 50,
384 'step' => 0.1,
385 ),
386 ),
387 'condition' => array_merge(
388 $common_conditions,
389 array(
390 'icon_type' => array( 'icon', 'svg' ),
391 )
392 ),
393 'selectors' => array(
394 '{{WRAPPER}} .premium-title-header svg *' => 'stroke-width: {{SIZE}}',
395 ),
396 )
397 );
398
399 $this->add_control(
400 'svg_sync',
401 array(
402 'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ),
403 'type' => Controls_Manager::SWITCHER,
404 'condition' => array_merge(
405 $common_conditions,
406 array(
407 'icon_type' => array( 'icon', 'svg' ),
408 'draw_svg' => 'yes',
409 )
410 ),
411 )
412 );
413
414 $this->add_control(
415 'frames',
416 array(
417 'label' => __( 'Speed', 'premium-addons-for-elementor' ),
418 'type' => Controls_Manager::NUMBER,
419 'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
420 'default' => 5,
421 'min' => 1,
422 'max' => 100,
423 'condition' => array_merge(
424 $common_conditions,
425 array(
426 'icon_type' => array( 'icon', 'svg' ),
427 'draw_svg' => 'yes',
428 )
429 ),
430 )
431 );
432
433 } else {
434
435 Helper_Functions::get_draw_svg_notice(
436 $this,
437 'heading',
438 array_merge(
439 $common_conditions,
440 array(
441 'icon_type' => array( 'icon', 'svg' ),
442 'premium_title_icon_updated[library]!' => 'svg',
443 )
444 )
445 );
446
447 }
448
449 $this->add_control(
450 'lottie_loop',
451 array(
452 'label' => __( 'Loop', 'premium-addons-for-elementor' ),
453 'type' => Controls_Manager::SWITCHER,
454 'return_value' => 'true',
455 'default' => 'true',
456 'conditions' => $animation_conds,
457 )
458 );
459
460 $this->add_control(
461 'lottie_reverse',
462 array(
463 'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
464 'type' => Controls_Manager::SWITCHER,
465 'return_value' => 'true',
466 'conditions' => $animation_conds,
467 )
468 );
469
470 if ( $draw_icon ) {
471 $this->add_control(
472 'start_point',
473 array(
474 'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ),
475 'type' => Controls_Manager::SLIDER,
476 'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ),
477 'default' => array(
478 'unit' => '%',
479 'size' => 0,
480 ),
481 'condition' => array_merge(
482 $common_conditions,
483 array(
484 'icon_type' => array( 'icon', 'svg' ),
485 'draw_svg' => 'yes',
486 'lottie_reverse!' => 'true',
487 )
488 ),
489 )
490 );
491
492 $this->add_control(
493 'end_point',
494 array(
495 'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ),
496 'type' => Controls_Manager::SLIDER,
497 'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ),
498 'default' => array(
499 'unit' => '%',
500 'size' => 0,
501 ),
502 'condition' => array_merge(
503 $common_conditions,
504 array(
505 'icon_type' => array( 'icon', 'svg' ),
506 'draw_svg' => 'yes',
507 'lottie_reverse' => 'true',
508 )
509 ),
510
511 )
512 );
513
514 $this->add_control(
515 'svg_hover',
516 array(
517 'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
518 'type' => Controls_Manager::SWITCHER,
519 'return_value' => 'true',
520 'condition' => array_merge(
521 $common_conditions,
522 array(
523 'icon_type' => array( 'icon', 'svg' ),
524 'draw_svg' => 'yes',
525 )
526 ),
527 )
528 );
529
530 $this->add_control(
531 'svg_yoyo',
532 array(
533 'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ),
534 'type' => Controls_Manager::SWITCHER,
535 'condition' => array_merge(
536 $common_conditions,
537 array(
538 'icon_type' => array( 'icon', 'svg' ),
539 'draw_svg' => 'yes',
540 'lottie_loop' => 'true',
541 )
542 ),
543 )
544 );
545 }
546
547 $this->add_responsive_control(
548 'icon_position',
549 array(
550 'label' => __( 'Icon Position', 'premium-addons-for-elementor' ),
551 'type' => Controls_Manager::SELECT,
552 'options' => array(
553 'row' => __( 'Before', 'premium-addons-for-elementor' ),
554 'row-reverse' => __( 'After', 'premium-addons-for-elementor' ),
555 'column' => __( 'Top', 'premium-addons-for-elementor' ),
556 'column-reverse' => __( 'Bottom', 'premium-addons-for-elementor' ),
557 ),
558 'default' => 'row',
559 'toggle' => false,
560 'render_type' => 'template',
561 'prefix_class' => 'premium-title-icon-',
562 'selectors' => array(
563 '{{WRAPPER}} .premium-title-header:not(.premium-title-style7), {{WRAPPER}} .premium-title-style7-inner' => 'flex-direction: {{VALUE}}',
564 ),
565 'condition' => array(
566 'premium_title_icon_switcher' => 'yes',
567 ),
568 )
569 );
570
571 $this->add_responsive_control(
572 'top_icon_align',
573 array(
574 'label' => __( 'Icon Alignment', 'premium-addons-for-elementor' ),
575 'type' => Controls_Manager::CHOOSE,
576 'options' => array(
577 'flex-start' => array(
578 'title' => __( 'Left', 'premium-addons-for-elementor' ),
579 'icon' => 'eicon-text-align-left',
580 ),
581 'center' => array(
582 'title' => __( 'Center', 'premium-addons-for-elementor' ),
583 'icon' => 'eicon-text-align-center',
584 ),
585 'flex-end' => array(
586 'title' => __( 'Right', 'premium-addons-for-elementor' ),
587 'icon' => 'eicon-text-align-right',
588 ),
589 ),
590 'default' => 'center',
591 'toggle' => false,
592 'selectors' => array(
593 '{{WRAPPER}}.premium-title-icon-column .premium-title-header:not(.premium-title-style7)' => 'align-items: {{VALUE}}',
594 '{{WRAPPER}}.premium-title-icon-column .premium-title-style7 .premium-title-icon' => 'align-self: {{VALUE}}',
595 ),
596 'condition' => array(
597 'premium_title_icon_switcher' => 'yes',
598 'icon_position' => 'column',
599 'premium_title_style!' => array( 'style3', 'style4' ),
600 ),
601 )
602 );
603
604 $this->add_control(
605 'premium_title_tag',
606 array(
607 'label' => __( 'HTML Tag', 'premium-addons-for-elementor' ),
608 'type' => Controls_Manager::SELECT,
609 'default' => 'h2',
610 'options' => array(
611 'h1' => 'H1',
612 'h2' => 'H2',
613 'h3' => 'H3',
614 'h4' => 'H4',
615 'h5' => 'H5',
616 'h6' => 'H6',
617 'div' => 'div',
618 'span' => 'span',
619 ),
620 'separator' => 'before',
621 )
622 );
623
624 $inline_flex = array( 'style1', 'style2', 'style5', 'style6', 'style7', 'style8', 'style9' );
625
626 $this->add_responsive_control(
627 'premium_title_align',
628 array(
629 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
630 'type' => Controls_Manager::CHOOSE,
631 'options' => array(
632 'left' => array(
633 'title' => __( 'Left', 'premium-addons-for-elementor' ),
634 'icon' => 'eicon-text-align-left',
635 ),
636 'center' => array(
637 'title' => __( 'Center', 'premium-addons-for-elementor' ),
638 'icon' => 'eicon-text-align-center',
639 ),
640 'right' => array(
641 'title' => __( 'Right', 'premium-addons-for-elementor' ),
642 'icon' => 'eicon-text-align-right',
643 ),
644 ),
645 'default' => 'left',
646 'toggle' => false,
647 'selectors' => array(
648 '{{WRAPPER}} .premium-title-container' => 'text-align: {{VALUE}};',
649 ),
650 'condition' => array(
651 'premium_title_style' => $inline_flex,
652 ),
653 )
654 );
655
656 $this->add_control(
657 'premium_title_align_flex',
658 array(
659 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
660 'type' => Controls_Manager::CHOOSE,
661 'prefix_class' => 'premium-title-',
662 'options' => array(
663 'flex-start' => array(
664 'title' => __( 'Left', 'premium-addons-for-elementor' ),
665 'icon' => 'eicon-text-align-left',
666 ),
667 'center' => array(
668 'title' => __( 'Center', 'premium-addons-for-elementor' ),
669 'icon' => 'eicon-text-align-center',
670 ),
671 'flex-end' => array(
672 'title' => __( 'Right', 'premium-addons-for-elementor' ),
673 'icon' => 'eicon-text-align-right',
674 ),
675 ),
676 'default' => 'flex-start',
677 'selectors' => array(
678 '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-header' => 'justify-content: {{VALUE}}',
679 '{{WRAPPER}}.premium-title-icon-column .premium-title-header' => 'align-items: {{VALUE}}',
680 ),
681 'toggle' => false,
682 'condition' => array(
683 'premium_title_style' => array( 'style3', 'style4' ),
684 ),
685 )
686 );
687
688 $this->add_control(
689 'alignment_notice',
690 array(
691 'raw' => __( 'Please note that left/right alignment is reversed when Icon Position is set to After.', 'premium-addons-for-elementor' ),
692 'type' => Controls_Manager::RAW_HTML,
693 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
694 'condition' => array(
695 'premium_title_icon_switcher' => 'yes',
696 'icon_position' => 'row-reverse',
697 'premium_title_style' => array( 'style3', 'style4' ),
698 ),
699 )
700 );
701
702 $this->add_control(
703 'premium_title_stripe_pos',
704 array(
705 'label' => __( 'Stripe Position', 'premium-addons-for-elementor' ),
706 'type' => Controls_Manager::SELECT,
707 'options' => array(
708 'top' => __( 'Top', 'premium-addons-for-elementor' ),
709 'bottom' => __( 'Bottom', 'premium-addons-for-elementor' ),
710 ),
711 'selectors_dictionary' => array(
712 'top' => 'initial',
713 'bottom' => '2',
714 ),
715 'default' => 'top',
716 'label_block' => true,
717 'separator' => 'before',
718 'condition' => array(
719 'premium_title_style' => 'style7',
720 ),
721 'selectors' => array(
722 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'order: {{VALUE}}',
723 ),
724 )
725 );
726
727 $this->add_responsive_control(
728 'premium_title_style7_strip_width',
729 array(
730 'label' => __( 'Stripe Width (PX)', 'premium-addons-for-elementor' ),
731 'type' => Controls_Manager::SLIDER,
732 'size_units' => array( 'px', '%', 'em' ),
733 'default' => array(
734 'unit' => 'px',
735 'size' => '120',
736 ),
737 'selectors' => array(
738 '{{WRAPPER}} .premium-title-style7-stripe' => 'width: {{SIZE}}{{UNIT}};',
739 ),
740 'label_block' => true,
741 'condition' => array(
742 'premium_title_style' => 'style7',
743 ),
744 )
745 );
746
747 $this->add_responsive_control(
748 'premium_title_style7_strip_height',
749 array(
750 'label' => __( 'Stripe Height (PX)', 'premium-addons-for-elementor' ),
751 'type' => Controls_Manager::SLIDER,
752 'size_units' => array( 'px', 'em' ),
753 'default' => array(
754 'unit' => 'px',
755 'size' => '5',
756 ),
757 'label_block' => true,
758 'selectors' => array(
759 '{{WRAPPER}} .premium-title-style7-stripe' => 'height: {{SIZE}}{{UNIT}};',
760 ),
761 'condition' => array(
762 'premium_title_style' => 'style7',
763 ),
764 )
765 );
766
767 $this->add_responsive_control(
768 'premium_title_style7_strip_top_spacing',
769 array(
770 'label' => __( 'Stripe Top Spacing (PX)', 'premium-addons-for-elementor' ),
771 'type' => Controls_Manager::SLIDER,
772 'size_units' => array( 'px', '%', 'em' ),
773 'selectors' => array(
774 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-top: {{SIZE}}{{UNIT}};',
775 ),
776 'label_block' => true,
777 'condition' => array(
778 'premium_title_style' => 'style7',
779 ),
780 )
781 );
782
783 $this->add_responsive_control(
784 'premium_title_style7_strip_bottom_spacing',
785 array(
786 'label' => __( 'Stripe Bottom Spacing (PX)', 'premium-addons-for-elementor' ),
787 'type' => Controls_Manager::SLIDER,
788 'size_units' => array( 'px', '%', 'em' ),
789 'label_block' => true,
790 'selectors' => array(
791 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-bottom: {{SIZE}}{{UNIT}};',
792 ),
793 'condition' => array(
794 'premium_title_style' => 'style7',
795 ),
796 )
797 );
798
799 $this->add_responsive_control(
800 'premium_title_style7_strip_align',
801 array(
802 'label' => __( 'Stripe Alignment', 'premium-addons-for-elementor' ),
803 'type' => Controls_Manager::CHOOSE,
804 'options' => array(
805 'flex-start' => array(
806 'title' => __( 'Left', 'premium-addons-for-elementor' ),
807 'icon' => 'eicon-text-align-left',
808 ),
809 'center' => array(
810 'title' => __( 'Center', 'premium-addons-for-elementor' ),
811 'icon' => 'eicon-text-align-center',
812 ),
813 'flex-end' => array(
814 'title' => __( 'Right', 'premium-addons-for-elementor' ),
815 'icon' => 'eicon-text-align-right',
816 ),
817 ),
818 'toggle' => false,
819 'default' => 'center',
820 'selectors' => array(
821 '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-style7-stripe-wrap' => 'justify-content: {{VALUE}}',
822 '{{WRAPPER}}.premium-title-icon-column .premium-title-style7-stripe-wrap' => 'align-self: {{VALUE}}',
823 ),
824 'condition' => array(
825 'premium_title_style' => 'style7',
826 ),
827 )
828 );
829
830 $this->add_control(
831 'link_switcher',
832 array(
833 'label' => __( 'Link', 'premium-addons-for-elementor' ),
834 'type' => Controls_Manager::SWITCHER,
835 )
836 );
837
838 $this->add_control(
839 'link_selection',
840 array(
841 'label' => __( 'Link Type', 'premium-addons-for-elementor' ),
842 'type' => Controls_Manager::SELECT,
843 'options' => array(
844 'url' => __( 'URL', 'premium-addons-for-elementor' ),
845 'link' => __( 'Existing Page', 'premium-addons-for-elementor' ),
846 ),
847 'default' => 'url',
848 'label_block' => true,
849 'condition' => array(
850 'link_switcher' => 'yes',
851 ),
852 )
853 );
854
855 $this->add_control(
856 'custom_link',
857 array(
858 'label' => __( 'Link', 'premium-addons-for-elementor' ),
859 'type' => Controls_Manager::URL,
860 'dynamic' => array( 'active' => true ),
861 'default' => array(
862 'url' => '#',
863 ),
864 'placeholder' => 'https://premiumaddons.com/',
865 'label_block' => true,
866 'separator' => 'after',
867 'condition' => array(
868 'link_switcher' => 'yes',
869 'link_selection' => 'url',
870 ),
871 )
872 );
873
874 $this->add_control(
875 'existing_link',
876 array(
877 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ),
878 'type' => Controls_Manager::SELECT2,
879 'options' => $this->getTemplateInstance()->get_all_posts(),
880 'condition' => array(
881 'link_switcher' => 'yes',
882 'link_selection' => 'link',
883 ),
884 'multiple' => false,
885 'label_block' => true,
886 )
887 );
888
889 $this->add_control(
890 'background_text_switcher',
891 array(
892 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
893 'type' => Controls_Manager::SWITCHER,
894 )
895 );
896
897 $this->add_control(
898 'background_text',
899 array(
900 'label' => __( 'Text', 'premium-addons-for-elementor' ),
901 'type' => Controls_Manager::TEXT,
902 'default' => __( 'Awesome Title', 'premium-addons-for-elementor' ),
903 'condition' => array(
904 'background_text_switcher' => 'yes',
905 ),
906 )
907 );
908
909 $this->add_control(
910 'background_text_width',
911 array(
912 'label' => __( 'Width', 'premium-addons-for-elementor' ),
913 'type' => Controls_Manager::SELECT,
914 'options' => array(
915 'auto' => __( 'Auto', 'premium-addons-for-elementor' ),
916 '100%' => __( 'Full Width', 'premium-addons-for-elementor' ),
917 ),
918 'default' => 'auto',
919 'label_block' => true,
920 'selectors' => array(
921 '{{WRAPPER}} .premium-title-bg-text:before' => 'width: {{VALUE}}',
922 ),
923 'condition' => array(
924 'background_text_switcher' => 'yes',
925 ),
926 )
927 );
928
929 $this->add_responsive_control(
930 'background_text_left',
931 array(
932 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
933 'type' => Controls_Manager::SLIDER,
934 'size_units' => array( 'px', 'em', '%', 'custom' ),
935 'range' => array(
936 'px' => array(
937 'min' => -500,
938 'max' => 500,
939 ),
940 'em' => array(
941 'min' => -50,
942 'max' => 50,
943 ),
944 '%' => array(
945 'min' => -100,
946 'max' => 100,
947 ),
948 ),
949 'selectors' => array(
950 '{{WRAPPER}} .premium-title-bg-text:before' => 'left: {{SIZE}}{{UNIT}}',
951 ),
952 'condition' => array(
953 'background_text_switcher' => 'yes',
954 ),
955 )
956 );
957
958 $this->add_responsive_control(
959 'background_text_top',
960 array(
961 'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ),
962 'type' => Controls_Manager::SLIDER,
963 'size_units' => array( 'px', 'em', '%', 'custom' ),
964 'range' => array(
965 'px' => array(
966 'min' => -500,
967 'max' => 500,
968 ),
969 'em' => array(
970 'min' => -50,
971 'max' => 50,
972 ),
973 '%' => array(
974 'min' => -100,
975 'max' => 100,
976 ),
977 ),
978 'selectors' => array(
979 '{{WRAPPER}} .premium-title-bg-text:before' => 'top: {{SIZE}}{{UNIT}}',
980 ),
981 'condition' => array(
982 'background_text_switcher' => 'yes',
983 ),
984 )
985 );
986
987 $this->add_responsive_control(
988 'background_text_rotate',
989 array(
990 'label' => __( 'Rotate (degrees)', 'premium-addons-for-elementor' ),
991 'type' => Controls_Manager::SLIDER,
992 'size_units' => array( 'deg' ),
993 'default' => array(
994 'unit' => 'deg',
995 'size' => 0,
996 ),
997 'selectors' => array(
998 '{{WRAPPER}} .premium-title-bg-text:before' => 'transform: rotate({{SIZE}}{{UNIT}})',
999 ),
1000 'condition' => array(
1001 'background_text_switcher' => 'yes',
1002 ),
1003 )
1004 );
1005
1006 $this->add_control(
1007 'mask_switcher',
1008 array(
1009 'label' => __( 'Minimal Mask Effect', 'premium-addons-for-elementor' ),
1010 'type' => Controls_Manager::SWITCHER,
1011 'description' => __( 'Note: This effect takes place once the element is in the viewport', 'premium-addons-for-elementor' ),
1012 'render_type' => 'template',
1013 'prefix_class' => 'premium-mask-',
1014 'condition' => array(
1015 'premium_title_style!' => 'style9',
1016 ),
1017 )
1018 );
1019
1020 $this->add_control(
1021 'mask_title_color',
1022 array(
1023 'label' => __( 'Mask Color', 'premium-addons-for-elementor' ),
1024 'type' => Controls_Manager::COLOR,
1025 'render_type' => 'template',
1026 'selectors' => array(
1027 '{{WRAPPER}}.premium-mask-yes .premium-mask-span::after' => 'background: {{VALUE}};',
1028 ),
1029 'condition' => array(
1030 'mask_switcher' => 'yes',
1031 'premium_title_style!' => 'style9',
1032 ),
1033 )
1034 );
1035
1036 $this->add_control(
1037 'mask_title_dir',
1038 array(
1039 'label' => __( 'Direction', 'premium-addons-for-elementor' ),
1040 'type' => Controls_Manager::SELECT,
1041 'default' => 'tr',
1042 'prefix_class' => 'premium-mask-',
1043 'render_type' => 'template',
1044 'options' => array(
1045 'tr' => __( 'To Right', 'premium-addons-for-elementor' ),
1046 'tl' => __( 'To Left', 'premium-addons-for-elementor' ),
1047 'tt' => __( 'To Top', 'premium-addons-for-elementor' ),
1048 'tb' => __( 'To Bottom', 'premium-addons-for-elementor' ),
1049 ),
1050 'condition' => array(
1051 'mask_switcher' => 'yes',
1052 'premium_title_style!' => 'style9',
1053 ),
1054 )
1055 );
1056
1057 $this->add_responsive_control(
1058 'mask_title_padding',
1059 array(
1060 'label' => __( 'Words Padding', 'premium-addons-for-elementor' ),
1061 'type' => Controls_Manager::DIMENSIONS,
1062 'size_units' => array( 'px', 'em', '%' ),
1063 'selectors' => array(
1064 '{{WRAPPER}} .premium-mask-span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1065 ),
1066 'condition' => array(
1067 'mask_switcher' => 'yes',
1068 'premium_title_style!' => 'style9',
1069 ),
1070 )
1071 );
1072
1073 $this->add_control(
1074 'noise',
1075 array(
1076 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ),
1077 'type' => Controls_Manager::SWITCHER,
1078 'prefix_class' => 'premium-title-noise-',
1079 'separator' => 'before',
1080 'render_type' => 'template',
1081 'condition' => array(
1082 'premium_title_style!' => 'style9',
1083 'mask_switcher!' => 'yes',
1084 'gradient_text_switcher!' => 'yes',
1085 'background_style' => 'color',
1086 ),
1087 )
1088 );
1089
1090 $this->end_controls_section();
1091
1092 $this->start_controls_section(
1093 'premium_title_style_section',
1094 array(
1095 'label' => __( 'Title', 'premium-addons-for-elementor' ),
1096 'tab' => Controls_Manager::TAB_STYLE,
1097 )
1098 );
1099
1100 $this->add_control(
1101 'premium_title_color',
1102 array(
1103 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1104 'type' => Controls_Manager::COLOR,
1105 'global' => array(
1106 'default' => Global_Colors::COLOR_PRIMARY,
1107 ),
1108 'selectors' => array(
1109 '{{WRAPPER}} .premium-title-header, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'color: {{VALUE}}',
1110 '{{WRAPPER}}.premium-title-stroke-yes .premium-title-text' => '-webkit-text-fill-color: {{VALUE}}',
1111 '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--base-color: {{VALUE}}',
1112 ),
1113 )
1114 );
1115
1116 $this->add_control(
1117 'premium_title_blur_color',
1118 array(
1119 'label' => __( 'Blur Color', 'booster-addons' ),
1120 'type' => Controls_Manager::COLOR,
1121 'default' => '#000',
1122 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-color: {{VALUE}};' ),
1123 'condition' => array(
1124 'premium_title_style' => 'style9',
1125 ),
1126 )
1127 );
1128
1129 $this->add_control(
1130 'shining_shiny_color_title',
1131 array(
1132 'label' => __( 'Shiny Color', 'premium-addons-for-elementor' ),
1133 'type' => Controls_Manager::COLOR,
1134 'default' => '#fff',
1135 'condition' => array(
1136 'premium_title_style' => 'style8',
1137 ),
1138 'selectors' => array( '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--shiny-color: {{VALUE}}' ),
1139 )
1140 );
1141
1142 $this->add_group_control(
1143 Group_Control_Typography::get_type(),
1144 array(
1145 'name' => 'title_typography',
1146 'global' => array(
1147 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1148 ),
1149 'selector' => '{{WRAPPER}} .premium-title-header',
1150 )
1151 );
1152
1153 $this->add_group_control(
1154 Group_Control_Border::get_type(),
1155 array(
1156 'name' => 'style_one_border',
1157 'fields_options' => array(
1158 'border' => array(
1159 'default' => 'solid',
1160 ),
1161 ),
1162 'selector' => '{{WRAPPER}} .premium-title-style1',
1163 'condition' => array(
1164 'premium_title_style' => 'style1',
1165 ),
1166 )
1167 );
1168
1169 $this->add_control(
1170 'background_style',
1171 array(
1172 'label' => __( 'Background Style', 'premium-addons-for-elementor' ),
1173 'type' => Controls_Manager::SELECT,
1174 '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' ),
1175 'options' => array(
1176 'color' => __( 'Normal', 'premium-addons-for-elementor' ),
1177 'clipped' => __( 'Clipped', 'premium-addons-for-elementor' ),
1178 ),
1179 'prefix_class' => 'premium-title-',
1180 'default' => 'color',
1181 'label_block' => true,
1182 'separator' => 'before',
1183 'condition' => array(
1184 'premium_title_style!' => array( 'style8', 'style9' ),
1185 ),
1186 )
1187 );
1188
1189 $this->add_group_control(
1190 Group_Control_Background::get_type(),
1191 array(
1192 'name' => 'title_background',
1193 'types' => array( 'classic', 'gradient' ),
1194 'condition' => array(
1195 'premium_title_style!' => array( 'style8', 'style9' ),
1196 'background_style!' => '',
1197 ),
1198 'selector' => '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-header, {{WRAPPER}}.premium-title-clipped .premium-title-text',
1199 )
1200 );
1201
1202 $this->add_control(
1203 'premium_title_style2_background_color',
1204 array(
1205 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1206 'type' => Controls_Manager::COLOR,
1207 'global' => array(
1208 'default' => Global_Colors::COLOR_SECONDARY,
1209 ),
1210 'selectors' => array(
1211 '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style2, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};',
1212 ),
1213 'condition' => array(
1214 'premium_title_style' => 'style2',
1215 'background_style' => '',
1216 ),
1217 )
1218 );
1219
1220 $this->add_control(
1221 'premium_title_style3_background_color',
1222 array(
1223 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1224 'type' => Controls_Manager::COLOR,
1225 'global' => array(
1226 'default' => Global_Colors::COLOR_SECONDARY,
1227 ),
1228 'selectors' => array(
1229 '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style3, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};',
1230 ),
1231 'condition' => array(
1232 'premium_title_style' => 'style3',
1233 'background_style' => '',
1234 ),
1235 )
1236 );
1237
1238 $this->add_control(
1239 'premium_title_style5_header_line_color',
1240 array(
1241 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
1242 'type' => Controls_Manager::COLOR,
1243 'global' => array(
1244 'default' => Global_Colors::COLOR_PRIMARY,
1245 ),
1246 'selectors' => array(
1247 '{{WRAPPER}} .premium-title-style5' => 'border-bottom: 2px solid {{VALUE}};',
1248 ),
1249 'condition' => array(
1250 'premium_title_style' => 'style5',
1251 ),
1252 )
1253 );
1254
1255 $this->add_group_control(
1256 Group_Control_Border::get_type(),
1257 array(
1258 'name' => 'style_five_border',
1259 'selector' => '{{WRAPPER}} .premium-title-container',
1260 'condition' => array(
1261 'premium_title_style' => array( 'style2', 'style4', 'style5', 'style6' ),
1262 ),
1263 )
1264 );
1265
1266 $this->add_control(
1267 'premium_title_style6_header_line_color',
1268 array(
1269 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
1270 'type' => Controls_Manager::COLOR,
1271 'global' => array(
1272 'default' => Global_Colors::COLOR_PRIMARY,
1273 ),
1274 'selectors' => array(
1275 '{{WRAPPER}} .premium-title-style6' => 'border-bottom: 2px solid {{VALUE}};',
1276 ),
1277 'condition' => array(
1278 'premium_title_style' => 'style6',
1279 ),
1280 )
1281 );
1282
1283 $this->add_control(
1284 'premium_title_style6_triangle_color',
1285 array(
1286 'label' => __( 'Triangle Color', 'premium-addons-for-elementor' ),
1287 'type' => Controls_Manager::COLOR,
1288 'global' => array(
1289 'default' => Global_Colors::COLOR_PRIMARY,
1290 ),
1291 'selectors' => array(
1292 '{{WRAPPER}} .premium-title-style6:before' => 'border-bottom-color: {{VALUE}};',
1293 ),
1294 'condition' => array(
1295 'premium_title_style' => 'style6',
1296 ),
1297 )
1298 );
1299
1300 $this->add_control(
1301 'premium_title_style7_strip_color',
1302 array(
1303 'label' => __( 'Stripe Color', 'premium-addons-for-elementor' ),
1304 'type' => Controls_Manager::COLOR,
1305 'global' => array(
1306 'default' => Global_Colors::COLOR_PRIMARY,
1307 ),
1308 'selectors' => array(
1309 '{{WRAPPER}} .premium-title-style7-stripe' => 'background-color: {{VALUE}};',
1310 ),
1311 'condition' => array(
1312 'premium_title_style' => 'style7',
1313 ),
1314 )
1315 );
1316
1317 $this->add_group_control(
1318 Group_Control_Text_Shadow::get_type(),
1319 array(
1320 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
1321 'name' => 'premium_title_text_shadow',
1322 'selector' => '{{WRAPPER}} .premium-title-header',
1323 )
1324 );
1325
1326 $this->add_control(
1327 'premium_title_shadow_value',
1328 array(
1329 'label' => esc_html__( 'Blur Shadow Value (px)', 'booster-addons' ),
1330 'type' => Controls_Manager::NUMBER,
1331 'min' => '10',
1332 'max' => '500',
1333 'step' => '10',
1334 'dynamic' => array( 'active' => true ),
1335 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-value: {{VALUE}}px;' ),
1336 'default' => '120',
1337 'condition' => array(
1338 'premium_title_style' => 'style9',
1339 ),
1340 )
1341 );
1342
1343 $this->add_control(
1344 'premium_title_delay',
1345 array(
1346 'label' => esc_html__( 'Animation Delay (s)', 'premium-addons-for-elementor' ),
1347 'type' => Controls_Manager::NUMBER,
1348 'min' => '1',
1349 'max' => '30',
1350 'step' => 0.5,
1351 'condition' => array(
1352 'premium_title_style' => array( 'style8', 'style9' ),
1353 ),
1354 'render_type' => 'template',
1355 'dynamic' => array( 'active' => true ),
1356 'default' => '2',
1357 )
1358 );
1359
1360 $this->add_control(
1361 'shining_animation_duration',
1362 array(
1363 'label' => __( 'Animation Duration (s)', 'premium-addons-for-elementor' ),
1364 'type' => Controls_Manager::NUMBER,
1365 'default' => '1',
1366 'step' => 0.5,
1367 'condition' => array(
1368 'premium_title_style' => 'style8',
1369 ),
1370 'frontend_available' => true,
1371 'render_type' => 'template',
1372 'selectors' => array(
1373 '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--animation-speed: {{VALUE}}s ',
1374 ),
1375 )
1376 );
1377
1378 $this->add_responsive_control(
1379 'premium_title_margin',
1380 array(
1381 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1382 'type' => Controls_Manager::DIMENSIONS,
1383 'size_units' => array( 'px', 'em', '%' ),
1384 'selectors' => array(
1385 '{{WRAPPER}} .premium-title-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1386 ),
1387 )
1388 );
1389
1390 $this->add_responsive_control(
1391 'premium_title_padding',
1392 array(
1393 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1394 'type' => Controls_Manager::DIMENSIONS,
1395 'size_units' => array( 'px', 'em', '%' ),
1396 'selectors' => array(
1397 '{{WRAPPER}} .premium-title-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1398 ),
1399 )
1400 );
1401
1402 $this->add_control(
1403 'stroke_switcher',
1404 array(
1405 'label' => __( 'Stroke', 'premium-addons-for-elementor' ),
1406 'type' => Controls_Manager::SWITCHER,
1407 'prefix_class' => 'premium-title-stroke-',
1408 'condition' => array(
1409 'premium_title_style!' => 'style9',
1410 'background_style' => 'color',
1411 ),
1412 )
1413 );
1414
1415 $this->add_control(
1416 'stroke_text_color',
1417 array(
1418 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1419 'type' => Controls_Manager::COLOR,
1420 'condition' => array(
1421 'stroke_switcher' => 'yes',
1422 'background_style' => 'color',
1423 'premium_title_style!' => 'style9',
1424 ),
1425 'selectors' => array(
1426 '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-color: {{VALUE}};',
1427 ),
1428 )
1429 );
1430
1431 $this->add_responsive_control(
1432 'stroke_width',
1433 array(
1434 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
1435 'type' => Controls_Manager::SLIDER,
1436 'condition' => array(
1437 'stroke_switcher' => 'yes',
1438 'background_style' => 'color',
1439 'premium_title_style!' => 'style9',
1440 ),
1441 'default' => array(
1442 'size' => 1,
1443 'unit' => 'px',
1444 ),
1445 'selectors' => array(
1446 '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-width: {{SIZE}}px',
1447 ),
1448 )
1449 );
1450
1451 $this->add_control(
1452 'gradient_text_switcher',
1453 array(
1454 'label' => __( 'Animated Gradient', 'premium-addons-for-elementor' ),
1455 'type' => Controls_Manager::SWITCHER,
1456 'prefix_class' => 'premium-title-gradient-',
1457 'separator' => 'before',
1458 'condition' => array(
1459 'premium_title_style!' => array( 'style8', 'style9' ),
1460 'mask_switcher!' => 'yes',
1461 'stroke_switcher!' => 'yes',
1462 'background_style' => 'color',
1463 ),
1464 )
1465 );
1466
1467 $this->add_control(
1468 'animation_transition_speed',
1469 array(
1470 'label' => __( 'Animation Speed (sec)', 'premium-addons-for-elementor' ),
1471 'type' => Controls_Manager::SLIDER,
1472 'range' => array(
1473 'px' => array(
1474 'min' => 0,
1475 'max' => 10,
1476 'step' => .1,
1477 ),
1478 ),
1479 'selectors' => array(
1480 '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text ,{{WRAPPER}}.premium-title-gradient-yes .premium-title-icon' => 'animation-duration: {{SIZE}}s ',
1481 ),
1482 'condition' => array(
1483 'gradient_text_switcher' => 'yes',
1484 'premium_title_style!' => array( 'style8', 'style9' ),
1485 'mask_switcher!' => 'yes',
1486 'stroke_switcher!' => 'yes',
1487 'background_style' => 'color',
1488 ),
1489 )
1490 );
1491
1492 $this->add_group_control(
1493 Group_Control_Background::get_type(),
1494 array(
1495 'name' => 'text_gradient',
1496 'types' => array( 'gradient' ),
1497 'selector' => '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text, {{WRAPPER}}.premium-title-gradient-yes .premium-title-icon',
1498 'condition' => array(
1499 'gradient_text_switcher' => 'yes',
1500 'premium_title_style!' => array( 'style8', 'style9' ),
1501 'mask_switcher!' => 'yes',
1502 'stroke_switcher!' => 'yes',
1503 'background_style' => 'color',
1504 ),
1505 )
1506 );
1507
1508 $this->add_control(
1509 'noise_heading',
1510 array(
1511 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ),
1512 'type' => Controls_Manager::HEADING,
1513 'condition' => array(
1514 'noise' => 'yes',
1515 ),
1516 )
1517 );
1518
1519 $this->add_control(
1520 'noise_first_color',
1521 array(
1522 'label' => __( 'Color #1', 'premium-addons-for-elementor' ),
1523 'type' => Controls_Manager::COLOR,
1524 'condition' => array(
1525 'noise' => 'yes',
1526 ),
1527 'selectors' => array(
1528 '{{WRAPPER}}.premium-title-noise-yes .premium-title-text::before' => 'text-shadow: 1px 0 {{VALUE}};',
1529 ),
1530 )
1531 );
1532
1533 $this->add_control(
1534 'noise_second_color',
1535 array(
1536 'label' => __( 'Color #2', 'premium-addons-for-elementor' ),
1537 'type' => Controls_Manager::COLOR,
1538 'condition' => array(
1539 'noise' => 'yes',
1540 ),
1541 'selectors' => array(
1542 '{{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'text-shadow: -1px 0 {{VALUE}};',
1543 ),
1544 )
1545 );
1546
1547 $this->end_controls_section();
1548
1549 $this->start_controls_section(
1550 'premium_title_icon_style_section',
1551 array(
1552 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
1553 'tab' => Controls_Manager::TAB_STYLE,
1554 'condition' => array(
1555 'premium_title_icon_switcher' => 'yes',
1556 ),
1557 )
1558 );
1559
1560 $this->add_control(
1561 'premium_title_icon_color',
1562 array(
1563 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1564 'type' => Controls_Manager::COLOR,
1565 'global' => array(
1566 'default' => Global_Colors::COLOR_PRIMARY,
1567 ),
1568 'selectors' => array(
1569 '{{WRAPPER}} .premium-title-icon' => 'color: {{VALUE}}',
1570 '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'fill: {{VALUE}};',
1571 ),
1572 'condition' => array(
1573 'icon_type' => array( 'icon', 'svg' ),
1574 ),
1575 )
1576 );
1577
1578 if ( $draw_icon ) {
1579 $this->add_control(
1580 'stroke_color',
1581 array(
1582 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1583 'type' => Controls_Manager::COLOR,
1584 'global' => array(
1585 'default' => Global_Colors::COLOR_ACCENT,
1586 ),
1587 'condition' => array(
1588 'icon_type' => array( 'icon', 'svg' ),
1589 ),
1590 'selectors' => array(
1591 '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'stroke: {{VALUE}};',
1592 ),
1593 )
1594 );
1595
1596 $this->add_control(
1597 'svg_color',
1598 array(
1599 'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ),
1600 'type' => Controls_Manager::COLOR,
1601 'global' => false,
1602 'separator' => 'after',
1603 'condition' => array(
1604 'icon_type' => array( 'icon', 'svg' ),
1605 'draw_svg' => 'yes',
1606 ),
1607 )
1608 );
1609 }
1610
1611 $this->add_responsive_control(
1612 'premium_title_icon_size',
1613 array(
1614 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1615 'type' => Controls_Manager::SLIDER,
1616 'size_units' => array( 'px', 'em', '%' ),
1617 'range' => array(
1618 'px' => array(
1619 'min' => 10,
1620 'max' => 300,
1621 ),
1622 'em' => array(
1623 'min' => 1,
1624 'max' => 30,
1625 ),
1626 ),
1627 'condition' => array(
1628 'icon_type!' => 'svg',
1629 ),
1630 'selectors' => array(
1631 '{{WRAPPER}} .premium-title-header i' => 'font-size: {{SIZE}}{{UNIT}}',
1632 '{{WRAPPER}} .premium-title-header svg, {{WRAPPER}} .premium-title-header img' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important',
1633 ),
1634 )
1635 );
1636
1637 $this->add_responsive_control(
1638 'svg_icon_width',
1639 array(
1640 'label' => __( 'Width', 'premium-addons-for-elementor' ),
1641 'type' => Controls_Manager::SLIDER,
1642 'size_units' => array( 'px', 'em', '%', 'custom' ),
1643 'range' => array(
1644 'px' => array(
1645 'min' => 1,
1646 'max' => 600,
1647 ),
1648 'em' => array(
1649 'min' => 1,
1650 'max' => 30,
1651 ),
1652 ),
1653 'default' => array(
1654 'size' => 100,
1655 'unit' => 'px',
1656 ),
1657 'condition' => array(
1658 'icon_type' => 'svg',
1659 ),
1660 'selectors' => array(
1661 '{{WRAPPER}} .premium-title-header svg' => 'width: {{SIZE}}{{UNIT}};',
1662 ),
1663 )
1664 );
1665
1666 $this->add_responsive_control(
1667 'svg_icon_height',
1668 array(
1669 'label' => __( 'Height', 'premium-addons-for-elementor' ),
1670 'type' => Controls_Manager::SLIDER,
1671 'size_units' => array( 'px', 'em', 'custom' ),
1672 'range' => array(
1673 'px' => array(
1674 'min' => 1,
1675 'max' => 300,
1676 ),
1677 'em' => array(
1678 'min' => 1,
1679 'max' => 30,
1680 ),
1681 ),
1682 'condition' => array(
1683 'icon_type' => 'svg',
1684 ),
1685 'selectors' => array(
1686 '{{WRAPPER}} .premium-title-header svg' => 'height: {{SIZE}}{{UNIT}}',
1687 ),
1688 )
1689 );
1690
1691 $this->add_group_control(
1692 Group_Control_Background::get_type(),
1693 array(
1694 'name' => 'premium_title_icon_background',
1695 'types' => array( 'classic', 'gradient' ),
1696 'selector' => '{{WRAPPER}} .premium-title-icon',
1697 )
1698 );
1699
1700 $this->add_group_control(
1701 Group_Control_Border::get_type(),
1702 array(
1703 'name' => 'premium_title_icon_border',
1704 'selector' => '{{WRAPPER}} .premium-title-icon',
1705 )
1706 );
1707
1708 $this->add_control(
1709 'premium_title_icon_border_radius',
1710 array(
1711 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1712 'type' => Controls_Manager::SLIDER,
1713 'size_units' => array( 'px', '%', 'em' ),
1714 'selectors' => array(
1715 '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{SIZE}}{{UNIT}};',
1716 ),
1717 'condition' => array(
1718 'icon_adv_radius!' => 'yes',
1719 ),
1720 )
1721 );
1722
1723 $this->add_control(
1724 'icon_adv_radius',
1725 array(
1726 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
1727 'type' => Controls_Manager::SWITCHER,
1728 '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>',
1729 )
1730 );
1731
1732 $this->add_control(
1733 'icon_adv_radius_value',
1734 array(
1735 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1736 'type' => Controls_Manager::TEXT,
1737 'dynamic' => array( 'active' => true ),
1738 'selectors' => array(
1739 '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{VALUE}};',
1740 ),
1741 'condition' => array(
1742 'icon_adv_radius' => 'yes',
1743 ),
1744 )
1745 );
1746
1747 $this->add_responsive_control(
1748 'premium_title_icon_margin',
1749 array(
1750 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1751 'type' => Controls_Manager::DIMENSIONS,
1752 'size_units' => array( 'px', 'em', '%' ),
1753 'selectors' => array(
1754 '{{WRAPPER}} .premium-title-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1755 ),
1756 )
1757 );
1758
1759 $this->add_responsive_control(
1760 'premium_title_icon_padding',
1761 array(
1762 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1763 'type' => Controls_Manager::DIMENSIONS,
1764 'size_units' => array( 'px', 'em', '%' ),
1765 'selectors' => array(
1766 '{{WRAPPER}} .premium-title-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
1767 ),
1768 )
1769 );
1770
1771 $this->add_group_control(
1772 Group_Control_Text_Shadow::get_type(),
1773 array(
1774 'label' => __( 'Icon Shadow', 'premium-addons-for-elementor' ),
1775 'name' => 'premium_title_icon_text_shadow',
1776 'selector' => '{{WRAPPER}} .premium-title-icon',
1777 'condition' => array(
1778 'icon_type' => 'icon',
1779 ),
1780 )
1781 );
1782
1783 $this->end_controls_section();
1784
1785 $this->start_controls_section(
1786 'background_text_style_section',
1787 array(
1788 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
1789 'tab' => Controls_Manager::TAB_STYLE,
1790 'condition' => array(
1791 'background_text_switcher' => 'yes',
1792 ),
1793 )
1794 );
1795
1796 $this->add_control(
1797 'background_text_color',
1798 array(
1799 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1800 'type' => Controls_Manager::COLOR,
1801 'global' => array(
1802 'default' => Global_Colors::COLOR_PRIMARY,
1803 ),
1804 'selectors' => array(
1805 '{{WRAPPER}} .premium-title-bg-text:before' => 'color: {{VALUE}}',
1806 ),
1807 )
1808 );
1809
1810 $this->add_group_control(
1811 Group_Control_Typography::get_type(),
1812 array(
1813 'name' => 'background_text_typography',
1814 'global' => array(
1815 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1816 ),
1817 'selector' => '{{WRAPPER}} .premium-title-bg-text:before',
1818 )
1819 );
1820
1821 $this->add_group_control(
1822 Group_Control_Text_Shadow::get_type(),
1823 array(
1824 'name' => 'background_text_shadow',
1825 'selector' => '{{WRAPPER}} .premium-title-bg-text:before',
1826 )
1827 );
1828
1829 $this->add_control(
1830 'bg_stroke_switcher',
1831 array(
1832 'label' => __( 'Stroke', 'premium-addons-for-elementor' ),
1833 'type' => Controls_Manager::SWITCHER,
1834 'prefix_class' => 'premium-title-bg-stroke-',
1835 )
1836 );
1837
1838 $this->add_control(
1839 'bg_stroke_text_color',
1840 array(
1841 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1842 'type' => Controls_Manager::COLOR,
1843 'condition' => array(
1844 'bg_stroke_switcher' => 'yes',
1845 ),
1846 'selectors' => array(
1847 '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-color: {{VALUE}};',
1848 ),
1849 )
1850 );
1851
1852 $this->add_responsive_control(
1853 'bg_stroke_width',
1854 array(
1855 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
1856 'type' => Controls_Manager::SLIDER,
1857 'default' => array(
1858 'size' => 1,
1859 'unit' => 'px',
1860 ),
1861 'condition' => array(
1862 'bg_stroke_switcher' => 'yes',
1863 ),
1864 'selectors' => array(
1865 '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-width: {{SIZE}}px',
1866 ),
1867 )
1868 );
1869
1870 $this->add_control(
1871 'background_text_mix_blend',
1872 array(
1873 'label' => __( 'Blend Mode', 'elementor' ),
1874 'type' => Controls_Manager::SELECT,
1875 'options' => array(
1876 '' => __( 'Normal', 'elementor' ),
1877 'multiply' => 'Multiply',
1878 'screen' => 'Screen',
1879 'overlay' => 'Overlay',
1880 'darken' => 'Darken',
1881 'lighten' => 'Lighten',
1882 'color-dodge' => 'Color Dodge',
1883 'saturation' => 'Saturation',
1884 'color' => 'Color',
1885 'luminosity' => 'Luminosity',
1886 ),
1887 'separator' => 'before',
1888 'selectors' => array(
1889 '{{WRAPPER}} .premium-title-bg-text:before' => 'mix-blend-mode: {{VALUE}}',
1890 ),
1891 )
1892 );
1893
1894 $this->add_control(
1895 'background_text_zindex',
1896 array(
1897 'label' => __( 'z-Index', 'premium-addons-for-elementor' ),
1898 'type' => Controls_Manager::NUMBER,
1899 'min' => -10,
1900 'max' => 20,
1901 'step' => 1,
1902 'selectors' => array(
1903 '{{WRAPPER}} .premium-title-bg-text:before' => 'z-index: {{VALUE}}',
1904 ),
1905 )
1906 );
1907
1908 $this->end_controls_section();
1909 }
1910
1911 /**
1912 * Render title widget output on the frontend.
1913 *
1914 * Written in PHP and used to generate the final HTML.
1915 *
1916 * @since 1.0.0
1917 * @access protected
1918 */
1919 protected function render() {
1920
1921 $settings = $this->get_settings_for_display();
1922
1923 $this->add_inline_editing_attributes( 'premium_title_text', 'none' );
1924
1925 $this->add_render_attribute( 'premium_title_text', 'class', 'premium-title-text' );
1926
1927 $title_tag = Helper_Functions::validate_html_tag( $settings['premium_title_tag'] );
1928
1929 $selected_style = $settings['premium_title_style'];
1930
1931 $this->add_render_attribute( 'container', 'class', array( 'premium-title-container', $selected_style ) );
1932
1933 $this->add_render_attribute( 'title', 'class', array( 'premium-title-header', 'premium-title-' . $selected_style ) );
1934
1935 if ( 'style8' === $selected_style ) {
1936
1937 $this->add_render_attribute(
1938 'premium_title_text',
1939 array(
1940 'data-shiny-delay' => $settings['premium_title_delay'],
1941 'data-shiny-dur' => $settings['shining_animation_duration'],
1942 )
1943 );
1944
1945 } elseif ( 'style9' === $selected_style ) {
1946
1947 $this->add_render_attribute( 'title', 'data-blur-delay', $settings['premium_title_delay'] );
1948
1949 }
1950
1951 if ( 'yes' === $settings['noise'] ) {
1952
1953 $this->add_render_attribute( 'premium_title_text', 'data-text', $settings['premium_title_text'] );
1954
1955 }
1956
1957 $icon_position = '';
1958
1959 if ( 'yes' === $settings['premium_title_icon_switcher'] ) {
1960
1961 $icon_type = $settings['icon_type'];
1962
1963 $icon_position = $settings['icon_position'];
1964
1965 if ( 'icon' === $icon_type || 'svg' === $icon_type ) {
1966
1967 $this->add_render_attribute( 'icon', 'class', 'premium-drawable-icon' );
1968
1969 if ( 'icon' === $icon_type ) {
1970
1971 if ( ! empty( $settings['premium_title_icon'] ) ) {
1972
1973 $this->add_render_attribute(
1974 'icon',
1975 array(
1976 'class' => array(
1977 'premium-title-icon',
1978 $settings['premium_title_icon'],
1979 ),
1980 'aria-hidden' => 'true',
1981 )
1982 );
1983
1984 }
1985
1986 $migrated = isset( $settings['__fa4_migrated']['premium_title_icon_updated'] );
1987 $is_new = empty( $settings['premium_title_icon'] ) && Icons_Manager::is_migration_allowed();
1988
1989 }
1990
1991 if ( ( 'yes' === $settings['draw_svg'] && 'icon' === $icon_type ) || 'svg' === $icon_type ) {
1992 $this->add_render_attribute( 'icon', 'class', 'premium-title-icon' );
1993 }
1994
1995 if ( 'yes' === $settings['draw_svg'] ) {
1996
1997 $this->add_render_attribute(
1998 'container',
1999 'class',
2000 array(
2001 'elementor-invisible',
2002 'premium-drawer-hover',
2003 )
2004 );
2005
2006 if ( 'icon' === $icon_type ) {
2007
2008 $this->add_render_attribute( 'icon', 'class', $settings['premium_title_icon_updated']['value'] );
2009
2010 }
2011
2012 $this->add_render_attribute(
2013 'icon',
2014 array(
2015 'class' => 'premium-svg-drawer',
2016 'data-svg-reverse' => $settings['lottie_reverse'],
2017 'data-svg-loop' => $settings['lottie_loop'],
2018 'data-svg-sync' => $settings['svg_sync'],
2019 'data-svg-hover' => $settings['svg_hover'],
2020 'data-svg-fill' => $settings['svg_color'],
2021 'data-svg-frames' => $settings['frames'],
2022 'data-svg-yoyo' => $settings['svg_yoyo'],
2023 'data-svg-point' => $settings['lottie_reverse'] ? $settings['end_point']['size'] : $settings['start_point']['size'],
2024 )
2025 );
2026
2027 } else {
2028 $this->add_render_attribute( 'icon', 'class', 'premium-svg-nodraw' );
2029 }
2030 } elseif ( 'animation' === $icon_type ) {
2031 $this->add_render_attribute(
2032 'title_lottie',
2033 array(
2034 'class' => array(
2035 'premium-title-icon',
2036 'premium-lottie-animation',
2037 ),
2038 'data-lottie-url' => $settings['lottie_url'],
2039 'data-lottie-loop' => $settings['lottie_loop'],
2040 'data-lottie-reverse' => $settings['lottie_reverse'],
2041 )
2042 );
2043 } else {
2044
2045 $src = $settings['image_upload']['url'];
2046
2047 $alt = Control_Media::get_image_alt( $settings['image_upload'] );
2048
2049 $this->add_render_attribute(
2050 'title_img',
2051 array(
2052 'class' => 'premium-title-icon',
2053 'src' => $src,
2054 'alt' => $alt,
2055 )
2056 );
2057 }
2058 }
2059
2060 if ( 'yes' === $settings['link_switcher'] ) {
2061
2062 if ( 'link' === $settings['link_selection'] ) {
2063
2064 $this->add_render_attribute( 'link', 'href', get_permalink( $settings['existing_link'] ) );
2065
2066 } else {
2067
2068 $this->add_link_attributes( 'link', $settings['custom_link'] );
2069
2070 }
2071 }
2072
2073 if ( 'yes' === $settings['background_text_switcher'] ) {
2074 $this->add_render_attribute(
2075 'container',
2076 array(
2077 'class' => 'premium-title-bg-text',
2078 'data-background' => $settings['background_text'],
2079 )
2080 );
2081 }
2082
2083 ?>
2084
2085 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'container' ) ); ?>>
2086 <<?php echo wp_kses_post( $title_tag . ' ' . $this->get_render_attribute_string( 'title' ) ); ?>>
2087 <?php if ( 'style7' === $selected_style ) : ?>
2088 <?php if ( 'column' !== $icon_position ) : ?>
2089 <span class="premium-title-style7-stripe-wrap">
2090 <span class="premium-title-style7-stripe"></span>
2091 </span>
2092 <?php endif; ?>
2093 <div class="premium-title-style7-inner">
2094 <?php endif; ?>
2095
2096 <?php if ( 'yes' === $settings['premium_title_icon_switcher'] ) : ?>
2097 <?php if ( 'icon' === $icon_type ) : ?>
2098 <?php
2099 if ( ( $is_new || $migrated ) && 'yes' !== $settings['draw_svg'] ) :
2100 Icons_Manager::render_icon(
2101 $settings['premium_title_icon_updated'],
2102 array(
2103 'class' => array( 'premium-title-icon', 'premium-svg-nodraw', 'premium-drawable-icon' ),
2104 'aria-hidden' => 'true',
2105 )
2106 );
2107 else :
2108 ?>
2109 <i <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>></i>
2110 <?php endif; ?>
2111
2112 <?php elseif ( 'svg' === $icon_type ) : ?>
2113 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>>
2114 <?php $this->print_unescaped_setting( 'custom_svg' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
2115 </div>
2116 <?php elseif ( 'animation' === $icon_type ) : ?>
2117 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_lottie' ) ); ?>></div>
2118 <?php else : ?>
2119 <?php if ( 'yes' === $settings['mask_switcher'] ) : ?>
2120 <span class="premium-title-img">
2121 <?php endif; ?>
2122 <img <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_img' ) ); ?>></span>
2123 <?php if ( 'yes' === $settings['mask_switcher'] ) : ?>
2124 </span>
2125 <?php endif; ?>
2126 <?php endif; ?>
2127 <?php endif; ?>
2128
2129 <?php if ( 'style7' === $selected_style ) : ?>
2130 <?php if ( 'column' === $icon_position ) : ?>
2131 <span class="premium-title-style7-stripe-wrap">
2132 <span class="premium-title-style7-stripe"></span>
2133 </span>
2134 <?php endif; ?>
2135 <?php endif; ?>
2136 <?php if ( 'style9' !== $selected_style ) : ?>
2137 <span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_title_text' ) ); ?> >
2138 <?php echo wp_kses_post( $settings['premium_title_text'] ); ?>
2139 </span>
2140 <?php
2141 else :
2142 $letters_html = '<span class="premium-letters-container"' . $this->get_render_attribute_string( 'premium_title_text' ) . '>';
2143 $title_array = preg_split( '//u', $settings['premium_title_text'], null, PREG_SPLIT_NO_EMPTY );
2144 foreach ( $title_array as $key => $letter ) :
2145 $key = $key++;
2146 $letters_html .= '<span class="premium-title-style9-letter" data-letter-index="' . esc_attr( $key + 1 ) . '" data-letter="' . esc_attr( $letter ) . '">' . $letter . '</span>';
2147 endforeach;
2148 $the_title = $letters_html . '</span>';
2149 echo wp_kses_post( $the_title );
2150 ?>
2151 <?php endif; ?>
2152
2153 <?php if ( 'style7' === $selected_style ) : ?>
2154 </div>
2155 <?php endif; ?>
2156 <?php if ( 'yes' === $settings['link_switcher'] ) : ?>
2157 <a <?php echo wp_kses_post( $this->get_render_attribute_string( 'link' ) ); ?>></a>
2158 <?php endif; ?>
2159 </<?php echo wp_kses_post( $title_tag ); ?>>
2160 </div>
2161
2162 <?php
2163 }
2164
2165 /**
2166 * Render Title widget output in the editor.
2167 *
2168 * Written as a Backbone JavaScript template and used to generate the live preview.
2169 *
2170 * @since 1.0.0
2171 * @access protected
2172 */
2173 protected function content_template() {
2174 ?>
2175 <#
2176
2177 view.addInlineEditingAttributes('premium_title_text', 'none');
2178
2179 view.addRenderAttribute('premium_title_text', 'class', 'premium-title-text');
2180
2181 var titleTag = elementor.helpers.validateHTMLTag( settings.premium_title_tag ),
2182
2183 selectedStyle = settings.premium_title_style,
2184
2185 titleIcon = settings.premium_title_icon,
2186
2187 titleText = settings.premium_title_text;
2188
2189 view.addRenderAttribute( 'container', 'class', [ 'premium-title-container', selectedStyle ] );
2190
2191 view.addRenderAttribute( 'premium_title', 'class', [ 'premium-title-header', 'premium-title-' + selectedStyle ] );
2192
2193 if ( selectedStyle === 'style9' ) {
2194 view.addRenderAttribute( 'premium_title', 'data-blur-delay', settings.premium_title_delay );
2195 } else if( selectedStyle === 'style8') {
2196 view.addRenderAttribute( 'premium_title_text', 'data-shiny-delay', settings.premium_title_delay );
2197 view.addRenderAttribute( 'premium_title_text', 'data-shiny-dur', settings.shining_animation_duration );
2198 }
2199
2200 if ( 'yes' === settings.noise ) {
2201
2202 view.addRenderAttribute( 'premium_title_text', 'data-text', settings.premium_title_text );
2203
2204 }
2205
2206 view.addRenderAttribute( 'icon', 'class', [ 'premium-title-icon', titleIcon ] );
2207
2208 var iconPosition = '';
2209
2210 if( 'yes' === settings.premium_title_icon_switcher ) {
2211
2212 var iconType = settings.icon_type;
2213
2214 iconPosition = settings.icon_position;
2215
2216 if( 'icon' === iconType || 'svg' === iconType ) {
2217
2218 view.addRenderAttribute( 'icon', 'class', 'premium-drawable-icon' );
2219
2220 if( 'icon' === iconType ) {
2221
2222 var iconHTML = 'yes' !== settings.draw_svg ? elementor.helpers.renderIcon( view, settings.premium_title_icon_updated, { 'class': ['premium-title-icon', 'premium-svg-nodraw', 'premium-drawable-icon'], 'aria-hidden': true }, 'i' , 'object' ) : false,
2223 migrated = elementor.helpers.isIconMigrated( settings, 'premium_title_icon_updated' );
2224
2225 }
2226
2227 if( ( 'yes' === settings.draw_svg && 'icon' === iconType ) || 'svg' === iconType ) {
2228 view.addRenderAttribute( 'icon', 'class', 'premium-title-icon' );
2229 }
2230
2231 if ( 'yes' === settings.draw_svg ) {
2232
2233 view.addRenderAttribute( 'container', 'class', 'premium-drawer-hover' );
2234
2235 if ( 'icon' === iconType ) {
2236
2237 view.addRenderAttribute( 'icon', 'class', settings.premium_title_icon_updated.value );
2238
2239 }
2240
2241 view.addRenderAttribute(
2242 'icon',
2243 {
2244 'class' : 'premium-svg-drawer',
2245 'data-svg-reverse' : settings.lottie_reverse,
2246 'data-svg-loop' : settings.lottie_loop,
2247 'data-svg-sync' : settings.svg_sync,
2248 'data-svg-hover' : settings.svg_hover,
2249 'data-svg-fill' : settings.svg_color,
2250 'data-svg-frames' : settings.frames,
2251 'data-svg-yoyo' : settings.svg_yoyo,
2252 'data-svg-point' : settings.lottie_reverse ? settings.end_point.size : settings.start_point.size,
2253 }
2254 );
2255
2256 } else {
2257 view.addRenderAttribute( 'icon', 'class', 'premium-svg-nodraw' );
2258 }
2259
2260 } else if( 'animation' === iconType ) {
2261
2262 view.addRenderAttribute( 'title_lottie', {
2263 'class': [
2264 'premium-title-icon',
2265 'premium-lottie-animation'
2266 ],
2267 'data-lottie-url': settings.lottie_url,
2268 'data-lottie-loop': settings.lottie_loop,
2269 'data-lottie-reverse': settings.lottie_reverse
2270 });
2271
2272 } else {
2273
2274 view.addRenderAttribute( 'title_img', {
2275 'class': 'premium-title-icon',
2276 'src': settings.image_upload.url
2277 });
2278
2279 }
2280
2281 }
2282
2283 if( 'yes' === settings.link_switcher ) {
2284
2285 var link = '';
2286
2287 if( settings.link_selection === 'link' ) {
2288
2289 link = settings.existing_link;
2290
2291 } else {
2292
2293 link = settings.custom_link.url;
2294
2295 }
2296
2297 view.addRenderAttribute( 'link', 'href', link );
2298
2299 }
2300
2301 if( 'yes' === settings.background_text_switcher ) {
2302 view.addRenderAttribute( 'container', {
2303 'class': 'premium-title-bg-text',
2304 'data-background': settings.background_text
2305 });
2306 }
2307
2308 #>
2309 <div {{{ view.getRenderAttributeString('container') }}}>
2310 <{{{titleTag}}} {{{view.getRenderAttributeString('premium_title')}}}>
2311 <# if( 'style7' === selectedStyle ) { #>
2312 <# if( 'column' !== iconPosition ) { #>
2313 <span class="premium-title-style7-stripe-wrap">
2314 <span class="premium-title-style7-stripe"></span>
2315 </span>
2316 <# } #>
2317 <div class="premium-title-style7-inner">
2318 <# }
2319 if( 'yes' === settings.premium_title_icon_switcher ) { #>
2320 <# if( 'icon' === iconType ) { #>
2321 <# if ( iconHTML && iconHTML.rendered && ( ! settings.premium_title_icon || migrated ) ) { #>
2322 {{{ iconHTML.value }}}
2323 <# } else { #>
2324 <i {{{ view.getRenderAttributeString( 'icon' ) }}}></i>
2325 <# } #>
2326
2327 <# } else if( 'svg' === iconType ) { #>
2328 <div {{{ view.getRenderAttributeString('icon') }}}>
2329 {{{ settings.custom_svg }}}
2330 </div>
2331 <# } else if( 'animation' === iconType ) { #>
2332 <div {{{ view.getRenderAttributeString('title_lottie') }}}></div>
2333 <# } else { #>
2334 <span class="premium-title-img"><img {{{ view.getRenderAttributeString('title_img') }}}></span>
2335 <# } #>
2336 <# } #>
2337 <# if( 'style7' === selectedStyle ) { #>
2338 <# if( 'column' === iconPosition ) { #>
2339 <span class="premium-title-style7-stripe-wrap">
2340 <span class="premium-title-style7-stripe"></span>
2341 </span>
2342 <# } #>
2343 <# } #>
2344 <# if( selectedStyle !== 'style9' ) {#>
2345 <span {{{ view.getRenderAttributeString('premium_title_text') }}} >{{{ titleText }}}</span>
2346 <# } else {
2347 lettersHtml = '<span class="premium-letters-container"'+ view.getRenderAttributeString('premium_title_text') +'>';
2348 text = titleText;
2349 titleArray = text.split('');
2350 key = 0;
2351 titleArray.forEach(function (item) {
2352 key = key + 1;
2353 lettersHtml +='<span class="premium-title-style9-letter" data-letter-index="'+(key+1)+'" data-letter="'+(item)+'">'+item+'</span>';
2354 });
2355 theTitle = lettersHtml + '</span>'; #>
2356 {{{theTitle}}}
2357 <#
2358 }
2359 #>
2360 <# if( 'style7' === selectedStyle ) { #>
2361 </div>
2362 <# } #>
2363 <# if( 'yes' === settings.link_switcher && '' !== link ) { #>
2364 <a {{{ view.getRenderAttributeString('link') }}}></a>
2365 <# } #>
2366 </{{{titleTag}}}>
2367 </div>
2368
2369 <?php
2370 }
2371 }
2372