PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.11.75
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.11.75
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 1 month ago premium-banner.php 1 month ago premium-blog.php 1 month ago premium-button.php 1 month ago premium-carousel.php 1 month ago premium-contactform.php 1 month ago premium-countdown.php 1 month ago premium-counter.php 1 month ago premium-dual-header.php 1 month ago premium-fancytext.php 1 month ago premium-grid.php 1 month ago premium-icon-list.php 1 month ago premium-image-button.php 1 month ago premium-image-scroll.php 1 month ago premium-image-separator.php 1 month ago premium-lottie.php 1 month ago premium-maps.php 1 month ago premium-media-wheel.php 1 month ago premium-mobile-menu.php 1 month ago premium-modalbox.php 1 month ago premium-nav-menu.php 1 month ago premium-notifications.php 1 month ago premium-person.php 1 month ago premium-pinterest-feed.php 1 month ago premium-post-ticker.php 1 month ago premium-pricing-table.php 1 month ago premium-progressbar.php 1 month ago premium-search-form.php 1 month ago premium-svg-drawer.php 1 month ago premium-tcloud.php 1 month ago premium-testimonials.php 1 month ago premium-textual-showcase.php 1 month ago premium-tiktok-feed.php 1 month ago premium-title.php 1 month ago premium-videobox.php 1 month ago premium-vscroll.php 2 months ago premium-weather.php 1 month ago premium-world-clock.php 1 month ago
premium-title.php
2807 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 $inline_flex = array( 'style1', 'style2', 'style5', 'style6', 'style7', 'style8', 'style9' );
269
270 $this->add_responsive_control(
271 'premium_title_align',
272 array(
273 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
274 'type' => Controls_Manager::CHOOSE,
275 'options' => array(
276 'left' => array(
277 'title' => __( 'Left', 'premium-addons-for-elementor' ),
278 'icon' => 'eicon-text-align-left',
279 ),
280 'center' => array(
281 'title' => __( 'Center', 'premium-addons-for-elementor' ),
282 'icon' => 'eicon-text-align-center',
283 ),
284 'right' => array(
285 'title' => __( 'Right', 'premium-addons-for-elementor' ),
286 'icon' => 'eicon-text-align-right',
287 ),
288 ),
289 'default' => 'left',
290 'toggle' => false,
291 'selectors' => array(
292 '{{WRAPPER}} .premium-title-container' => 'text-align: {{VALUE}};',
293 ),
294 'condition' => array(
295 'premium_title_style' => $inline_flex,
296 ),
297 )
298 );
299
300 $this->add_control(
301 'premium_title_align_flex',
302 array(
303 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
304 'type' => Controls_Manager::CHOOSE,
305 'prefix_class' => 'premium-title-',
306 'options' => array(
307 'flex-start' => array(
308 'title' => __( 'Left', 'premium-addons-for-elementor' ),
309 'icon' => 'eicon-text-align-left',
310 ),
311 'center' => array(
312 'title' => __( 'Center', 'premium-addons-for-elementor' ),
313 'icon' => 'eicon-text-align-center',
314 ),
315 'flex-end' => array(
316 'title' => __( 'Right', 'premium-addons-for-elementor' ),
317 'icon' => 'eicon-text-align-right',
318 ),
319 ),
320 'default' => 'flex-start',
321 'selectors' => array(
322 '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-header' => 'justify-content: {{VALUE}}',
323 '{{WRAPPER}}.premium-title-icon-column .premium-title-header' => 'align-items: {{VALUE}}',
324 ),
325 'toggle' => false,
326 'condition' => array(
327 'premium_title_style' => array( 'style3', 'style4' ),
328 ),
329 )
330 );
331
332 $this->add_control(
333 'alignment_notice',
334 array(
335 'raw' => __( 'Please note that left/right alignment is reversed when Icon Position is set to After.', 'premium-addons-for-elementor' ),
336 'type' => Controls_Manager::RAW_HTML,
337 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
338 'condition' => array(
339 'premium_title_icon_switcher' => 'yes',
340 'icon_position' => 'row-reverse',
341 'premium_title_style' => array( 'style3', 'style4' ),
342 ),
343 )
344 );
345
346 $this->add_control(
347 'link_selection',
348 array(
349 'label' => __( 'Link Type', 'premium-addons-for-elementor' ),
350 'type' => Controls_Manager::SELECT,
351 'options' => array(
352 'url' => __( 'URL', 'premium-addons-for-elementor' ),
353 'link' => __( 'Existing Page', 'premium-addons-for-elementor' ),
354 ),
355 'default' => 'url',
356 'label_block' => true,
357 )
358 );
359
360 $this->add_control(
361 'custom_link',
362 array(
363 'label' => __( 'Link', 'premium-addons-for-elementor' ),
364 'type' => Controls_Manager::URL,
365 'dynamic' => array( 'active' => true ),
366 'label_block' => true,
367 'condition' => array(
368 'link_selection' => 'url',
369 ),
370 )
371 );
372
373 $this->add_control(
374 'existing_link',
375 array(
376 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ),
377 'type' => Premium_Post_Filter::TYPE,
378 'label_block' => true,
379 'multiple' => false,
380 'source' => array( 'post', 'page' ),
381 'condition' => array(
382 'link_selection' => 'link',
383 ),
384 )
385 );
386
387 $this->end_controls_section();
388
389 $this->start_controls_section(
390 'stripe_section',
391 array(
392 'label' => __( 'Stripe', 'premium-addons-for-elementor' ),
393 'condition' => array(
394 'premium_title_style' => 'style7',
395 ),
396 )
397 );
398
399 $this->add_control(
400 'premium_title_stripe_pos',
401 array(
402 'label' => __( 'Stripe Position', 'premium-addons-for-elementor' ),
403 'type' => Controls_Manager::SELECT,
404 'options' => array(
405 'top' => __( 'Top', 'premium-addons-for-elementor' ),
406 'bottom' => __( 'Bottom', 'premium-addons-for-elementor' ),
407 ),
408 'selectors_dictionary' => array(
409 'top' => 'initial',
410 'bottom' => '2',
411 ),
412 'default' => 'top',
413 'label_block' => true,
414 'separator' => 'before',
415 'selectors' => array(
416 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'order: {{VALUE}}',
417 ),
418 )
419 );
420
421 $this->add_responsive_control(
422 'premium_title_style7_strip_width',
423 array(
424 'label' => __( 'Stripe Width (PX)', 'premium-addons-for-elementor' ),
425 'type' => Controls_Manager::SLIDER,
426 'size_units' => array( 'px', '%', 'em', 'vw' ),
427 'default' => array(
428 'unit' => 'px',
429 'size' => '120',
430 ),
431 'selectors' => array(
432 '{{WRAPPER}} .premium-title-style7-stripe' => 'width: {{SIZE}}{{UNIT}};',
433 ),
434 'label_block' => true,
435 )
436 );
437
438 $this->add_responsive_control(
439 'premium_title_style7_strip_height',
440 array(
441 'label' => __( 'Stripe Height (PX)', 'premium-addons-for-elementor' ),
442 'type' => Controls_Manager::SLIDER,
443 'size_units' => array( 'px', 'em' ),
444 'default' => array(
445 'unit' => 'px',
446 'size' => '5',
447 ),
448 'label_block' => true,
449 'selectors' => array(
450 '{{WRAPPER}} .premium-title-style7-stripe' => 'height: {{SIZE}}{{UNIT}};',
451 ),
452 )
453 );
454
455 $this->add_responsive_control(
456 'premium_title_style7_strip_top_spacing',
457 array(
458 'label' => __( 'Stripe Top Spacing (PX)', 'premium-addons-for-elementor' ),
459 'type' => Controls_Manager::SLIDER,
460 'size_units' => array( 'px', '%', 'em' ),
461 'selectors' => array(
462 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-top: {{SIZE}}{{UNIT}};',
463 ),
464 'label_block' => true,
465 )
466 );
467
468 $this->add_responsive_control(
469 'premium_title_style7_strip_bottom_spacing',
470 array(
471 'label' => __( 'Stripe Bottom Spacing (PX)', 'premium-addons-for-elementor' ),
472 'type' => Controls_Manager::SLIDER,
473 'size_units' => array( 'px', '%', 'em' ),
474 'label_block' => true,
475 'selectors' => array(
476 '{{WRAPPER}} .premium-title-style7-stripe-wrap' => 'margin-bottom: {{SIZE}}{{UNIT}};',
477 ),
478 )
479 );
480
481 $this->add_responsive_control(
482 'premium_title_style7_strip_align',
483 array(
484 'label' => __( 'Stripe Alignment', 'premium-addons-for-elementor' ),
485 'type' => Controls_Manager::CHOOSE,
486 'options' => array(
487 'flex-start' => array(
488 'title' => __( 'Left', 'premium-addons-for-elementor' ),
489 'icon' => 'eicon-text-align-left',
490 ),
491 'center' => array(
492 'title' => __( 'Center', 'premium-addons-for-elementor' ),
493 'icon' => 'eicon-text-align-center',
494 ),
495 'flex-end' => array(
496 'title' => __( 'Right', 'premium-addons-for-elementor' ),
497 'icon' => 'eicon-text-align-right',
498 ),
499 ),
500 'toggle' => false,
501 'default' => 'center',
502 'selectors' => array(
503 '{{WRAPPER}}:not(.premium-title-icon-column) .premium-title-style7-stripe-wrap' => 'justify-content: {{VALUE}}',
504 '{{WRAPPER}}.premium-title-icon-column .premium-title-style7-stripe-wrap' => 'align-self: {{VALUE}}',
505 ),
506 )
507 );
508
509 $this->end_controls_section();
510
511 $this->start_controls_section(
512 'icon_section',
513 array(
514 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
515 )
516 );
517
518 $this->add_control(
519 'premium_title_icon_switcher',
520 array(
521 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
522 'type' => Controls_Manager::SWITCHER,
523 )
524 );
525
526 $this->add_control(
527 'icon_type',
528 array(
529 'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
530 'type' => Controls_Manager::SELECT,
531 'options' => array(
532 'icon' => __( 'Icon', 'premium-addons-for-elementor' ),
533 'image' => __( 'Image', 'premium-addons-for-elementor' ),
534 'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
535 'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ),
536 ),
537 'default' => 'icon',
538 'condition' => array(
539 'premium_title_icon_switcher' => 'yes',
540 ),
541 )
542 );
543
544 $this->add_responsive_control(
545 'icon_position',
546 array(
547 'label' => __( 'Icon Position', 'premium-addons-for-elementor' ),
548 'type' => Controls_Manager::SELECT,
549 'options' => array(
550 'row' => __( 'Before', 'premium-addons-for-elementor' ),
551 'row-reverse' => __( 'After', 'premium-addons-for-elementor' ),
552 'column' => __( 'Top', 'premium-addons-for-elementor' ),
553 'column-reverse' => __( 'Bottom', 'premium-addons-for-elementor' ),
554 ),
555 'default' => 'row',
556 'toggle' => false,
557 'render_type' => 'template',
558 'prefix_class' => 'premium-title-icon-',
559 'selectors' => array(
560 '{{WRAPPER}} .premium-title-header:not(.premium-title-style7), {{WRAPPER}} .premium-title-style7-inner' => 'flex-direction: {{VALUE}}',
561 ),
562 'condition' => array(
563 'premium_title_icon_switcher' => 'yes',
564 ),
565 )
566 );
567
568 $this->add_responsive_control(
569 'top_icon_align',
570 array(
571 'label' => __( 'Icon Alignment', 'premium-addons-for-elementor' ),
572 'type' => Controls_Manager::CHOOSE,
573 'options' => array(
574 'flex-start' => array(
575 'title' => __( 'Left', 'premium-addons-for-elementor' ),
576 'icon' => 'eicon-text-align-left',
577 ),
578 'center' => array(
579 'title' => __( 'Center', 'premium-addons-for-elementor' ),
580 'icon' => 'eicon-text-align-center',
581 ),
582 'flex-end' => array(
583 'title' => __( 'Right', 'premium-addons-for-elementor' ),
584 'icon' => 'eicon-text-align-right',
585 ),
586 ),
587 'default' => 'center',
588 'toggle' => false,
589 'selectors' => array(
590 '{{WRAPPER}}.premium-title-icon-column .premium-title-header:not(.premium-title-style7)' => 'align-items: {{VALUE}}',
591 '{{WRAPPER}}.premium-title-icon-column .premium-title-style7 .premium-title-icon' => 'align-self: {{VALUE}}',
592 ),
593 'condition' => array(
594 'premium_title_icon_switcher' => 'yes',
595 'icon_position' => 'column',
596 'premium_title_style!' => array( 'style3', 'style4' ),
597 ),
598 )
599 );
600
601 $common_conditions = array(
602 'premium_title_icon_switcher' => 'yes',
603 );
604
605 $this->add_control(
606 'premium_title_icon_updated',
607 array(
608 'label' => __( 'Font Awesome Icon', 'premium-addons-for-elementor' ),
609 'type' => Controls_Manager::ICONS,
610 'fa4compatibility' => 'premium_title_icon',
611 'default' => array(
612 'value' => 'fas fa-bars',
613 'library' => 'fa-solid',
614 ),
615 'label_block' => true,
616 'condition' => array_merge(
617 $common_conditions,
618 array(
619 'icon_type' => 'icon',
620 )
621 ),
622 )
623 );
624
625 $this->add_control(
626 'image_upload',
627 array(
628 'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
629 'type' => Controls_Manager::MEDIA,
630 'default' => array(
631 'url' => Utils::get_placeholder_image_src(),
632 ),
633 'condition' => array_merge(
634 $common_conditions,
635 array(
636 'icon_type' => 'image',
637 )
638 ),
639 )
640 );
641
642 $this->add_control(
643 'custom_svg',
644 array(
645 'label' => __( 'SVG Code', 'premium-addons-for-elementor' ),
646 'type' => Controls_Manager::TEXTAREA,
647 '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>',
648 'condition' => array_merge(
649 $common_conditions,
650 array(
651 'icon_type' => 'svg',
652 )
653 ),
654 'ai' => array(
655 'active' => false,
656 ),
657 )
658 );
659
660 $this->add_control(
661 'lottie_url',
662 array(
663 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
664 'type' => Controls_Manager::TEXT,
665 'dynamic' => array( 'active' => true ),
666 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
667 'label_block' => true,
668 'condition' => array_merge(
669 $common_conditions,
670 array(
671 'icon_type' => 'animation',
672 )
673 ),
674 'ai' => array(
675 'active' => false,
676 ),
677 )
678 );
679
680 $animation_conds = array(
681 'terms' => array(
682 array(
683 'name' => 'premium_title_icon_switcher',
684 'value' => 'yes',
685 ),
686 array(
687 'relation' => 'or',
688 'terms' => array(
689 array(
690 'name' => 'icon_type',
691 'value' => 'animation',
692 ),
693 array(
694 'terms' => array(
695 array(
696 'relation' => 'or',
697 'terms' => array(
698 array(
699 'name' => 'icon_type',
700 'value' => 'icon',
701 ),
702 array(
703 'name' => 'icon_type',
704 'value' => 'svg',
705 ),
706 ),
707 ),
708 array(
709 'name' => 'draw_svg',
710 'value' => 'yes',
711 ),
712 ),
713 ),
714 ),
715 ),
716 ),
717 );
718
719 $this->add_control(
720 'draw_svg',
721 array(
722 'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ),
723 'type' => Controls_Manager::SWITCHER,
724 '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>',
725 'classes' => $draw_icon ? '' : 'editor-pa-control-disabled',
726 'condition' => array_merge(
727 $common_conditions,
728 array(
729 'icon_type' => array( 'icon', 'svg' ),
730 'premium_title_icon_updated[library]!' => 'svg',
731 )
732 ),
733 )
734 );
735
736 if ( $draw_icon ) {
737
738 $this->add_control(
739 'path_width',
740 array(
741 'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ),
742 'type' => Controls_Manager::SLIDER,
743 'range' => array(
744 'px' => array(
745 'min' => 0,
746 'max' => 50,
747 'step' => 0.1,
748 ),
749 ),
750 'condition' => array_merge(
751 $common_conditions,
752 array(
753 'icon_type' => array( 'icon', 'svg' ),
754 )
755 ),
756 'selectors' => array(
757 '{{WRAPPER}} .premium-title-header svg *' => 'stroke-width: {{SIZE}}',
758 ),
759 )
760 );
761
762 $this->add_control(
763 'svg_sync',
764 array(
765 'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ),
766 'type' => Controls_Manager::SWITCHER,
767 'condition' => array_merge(
768 $common_conditions,
769 array(
770 'icon_type' => array( 'icon', 'svg' ),
771 'draw_svg' => 'yes',
772 )
773 ),
774 )
775 );
776
777 $this->add_control(
778 'frames',
779 array(
780 'label' => __( 'Speed', 'premium-addons-for-elementor' ),
781 'type' => Controls_Manager::NUMBER,
782 'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
783 'default' => 5,
784 'min' => 1,
785 'max' => 100,
786 'condition' => array_merge(
787 $common_conditions,
788 array(
789 'icon_type' => array( 'icon', 'svg' ),
790 'draw_svg' => 'yes',
791 )
792 ),
793 )
794 );
795
796 } else {
797
798 Helper_Functions::get_draw_svg_notice(
799 $this,
800 'heading',
801 array_merge(
802 $common_conditions,
803 array(
804 'icon_type' => array( 'icon', 'svg' ),
805 'premium_title_icon_updated[library]!' => 'svg',
806 )
807 )
808 );
809
810 }
811
812 $this->add_control(
813 'lottie_loop',
814 array(
815 'label' => __( 'Loop', 'premium-addons-for-elementor' ),
816 'type' => Controls_Manager::SWITCHER,
817 'return_value' => 'true',
818 'default' => 'true',
819 'conditions' => $animation_conds,
820 )
821 );
822
823 $this->add_control(
824 'lottie_reverse',
825 array(
826 'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
827 'type' => Controls_Manager::SWITCHER,
828 'return_value' => 'true',
829 'conditions' => $animation_conds,
830 )
831 );
832
833 if ( $draw_icon ) {
834 $this->add_control(
835 'start_point',
836 array(
837 'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ),
838 'type' => Controls_Manager::SLIDER,
839 'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ),
840 'default' => array(
841 'unit' => '%',
842 'size' => 0,
843 ),
844 'condition' => array_merge(
845 $common_conditions,
846 array(
847 'icon_type' => array( 'icon', 'svg' ),
848 'draw_svg' => 'yes',
849 'lottie_reverse!' => 'true',
850 )
851 ),
852 )
853 );
854
855 $this->add_control(
856 'end_point',
857 array(
858 'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ),
859 'type' => Controls_Manager::SLIDER,
860 'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ),
861 'default' => array(
862 'unit' => '%',
863 'size' => 0,
864 ),
865 'condition' => array_merge(
866 $common_conditions,
867 array(
868 'icon_type' => array( 'icon', 'svg' ),
869 'draw_svg' => 'yes',
870 'lottie_reverse' => 'true',
871 )
872 ),
873
874 )
875 );
876
877 $this->add_control(
878 'svg_hover',
879 array(
880 'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
881 'type' => Controls_Manager::SWITCHER,
882 'return_value' => 'true',
883 'condition' => array_merge(
884 $common_conditions,
885 array(
886 'icon_type' => array( 'icon', 'svg' ),
887 'draw_svg' => 'yes',
888 )
889 ),
890 )
891 );
892
893 $this->add_control(
894 'svg_yoyo',
895 array(
896 'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ),
897 'type' => Controls_Manager::SWITCHER,
898 'condition' => array_merge(
899 $common_conditions,
900 array(
901 'icon_type' => array( 'icon', 'svg' ),
902 'draw_svg' => 'yes',
903 'lottie_loop' => 'true',
904 )
905 ),
906 )
907 );
908 }
909
910 $this->end_controls_section();
911
912 $this->start_controls_section(
913 'background_text_section',
914 array(
915 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
916 )
917 );
918
919 $this->add_control(
920 'background_text_switcher',
921 array(
922 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
923 'type' => Controls_Manager::SWITCHER,
924 )
925 );
926
927 $this->add_control(
928 'background_text',
929 array(
930 'label' => __( 'Text', 'premium-addons-for-elementor' ),
931 'type' => Controls_Manager::TEXT,
932 'condition' => array(
933 'background_text_switcher' => 'yes',
934 ),
935
936 )
937 );
938
939 $this->add_control(
940 'bg_stroke_switcher',
941 array(
942 'label' => __( 'Stroke', 'premium-addons-for-elementor' ),
943 'type' => Controls_Manager::SWITCHER,
944 'prefix_class' => 'premium-title-bg-stroke-',
945 'condition' => array(
946 'background_text_switcher' => 'yes',
947 ),
948 )
949 );
950
951 $this->add_control(
952 'background_text_width',
953 array(
954 'label' => __( 'Width', 'premium-addons-for-elementor' ),
955 'type' => Controls_Manager::SELECT,
956 'options' => array(
957 'auto' => __( 'Auto', 'premium-addons-for-elementor' ),
958 '100%' => __( 'Full Width', 'premium-addons-for-elementor' ),
959 ),
960 'default' => 'auto',
961 'label_block' => true,
962 'selectors' => array(
963 '{{WRAPPER}} .premium-title-bg-text:before' => 'width: {{VALUE}}',
964 ),
965 'condition' => array(
966 'background_text_switcher' => 'yes',
967 ),
968 )
969 );
970
971 $this->add_responsive_control(
972 'background_text_left',
973 array(
974 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
975 'type' => Controls_Manager::SLIDER,
976 'size_units' => array( 'px', 'em', '%', 'custom' ),
977 'range' => array(
978 'px' => array(
979 'min' => -500,
980 'max' => 500,
981 ),
982 'em' => array(
983 'min' => -50,
984 'max' => 50,
985 ),
986 '%' => array(
987 'min' => -100,
988 'max' => 100,
989 ),
990 ),
991 'selectors' => array(
992 '{{WRAPPER}} .premium-title-bg-text:before' => 'left: {{SIZE}}{{UNIT}}',
993 ),
994 'condition' => array(
995 'background_text_switcher' => 'yes',
996 ),
997 )
998 );
999
1000 $this->add_responsive_control(
1001 'background_text_top',
1002 array(
1003 'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ),
1004 'type' => Controls_Manager::SLIDER,
1005 'size_units' => array( 'px', 'em', '%', 'custom' ),
1006 'range' => array(
1007 'px' => array(
1008 'min' => -500,
1009 'max' => 500,
1010 ),
1011 'em' => array(
1012 'min' => -50,
1013 'max' => 50,
1014 ),
1015 '%' => array(
1016 'min' => -100,
1017 'max' => 100,
1018 ),
1019 ),
1020 'selectors' => array(
1021 '{{WRAPPER}} .premium-title-bg-text:before' => 'top: {{SIZE}}{{UNIT}}',
1022 ),
1023 'condition' => array(
1024 'background_text_switcher' => 'yes',
1025 ),
1026 )
1027 );
1028
1029 $this->add_responsive_control(
1030 'background_text_rotate',
1031 array(
1032 'label' => __( 'Rotate (degrees)', 'premium-addons-for-elementor' ),
1033 'type' => Controls_Manager::SLIDER,
1034 'size_units' => array( 'deg' ),
1035 'default' => array(
1036 'unit' => 'deg',
1037 'size' => 0,
1038 ),
1039 'selectors' => array(
1040 '{{WRAPPER}} .premium-title-bg-text:before' => 'transform: rotate({{SIZE}}{{UNIT}})',
1041 ),
1042 'condition' => array(
1043 'background_text_switcher' => 'yes',
1044 ),
1045 )
1046 );
1047
1048 $this->end_controls_section();
1049
1050 $this->start_controls_section(
1051 'display_option_section',
1052 array(
1053 'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
1054 )
1055 );
1056
1057 $this->add_control(
1058 'hover_effect',
1059 array(
1060 'label' => __( 'Underline Hover Effect', 'premium-addons-for-elementor' ),
1061 'type' => Controls_Manager::SELECT,
1062 'options' => array(
1063 'none' => __( 'None', 'premium-addons-for-elementor' ),
1064 'line1' => __( 'Effect 1', 'premium-addons-for-elementor' ),
1065 'line2' => __( 'Effect 2', 'premium-addons-for-elementor' ),
1066 'line3' => __( 'Effect 3', 'premium-addons-for-elementor' ),
1067 'line4' => __( 'Effect 4', 'premium-addons-for-elementor' ),
1068 'line5' => __( 'Effect 5', 'premium-addons-for-elementor' ),
1069 'line7' => __( 'Effect 6', 'premium-addons-for-elementor' ),
1070 ),
1071 'default' => 'none',
1072 'label_block' => true,
1073 )
1074 );
1075
1076 $this->add_control(
1077 'stroke_switcher',
1078 array(
1079 'label' => __( 'Apply Stroke', 'premium-addons-for-elementor' ),
1080 'type' => Controls_Manager::SWITCHER,
1081 'prefix_class' => 'premium-title-stroke-',
1082
1083 )
1084 );
1085
1086 $this->add_control(
1087 'mask_switcher',
1088 array(
1089 'label' => __( 'Minimal Mask Effect', 'premium-addons-for-elementor' ),
1090 'type' => Controls_Manager::SWITCHER,
1091 'description' => __( 'Note: This effect takes place once the element is in the viewport', 'premium-addons-for-elementor' ),
1092 'render_type' => 'template',
1093 'prefix_class' => 'premium-mask-',
1094 'condition' => array(
1095 'premium_title_style!' => 'style9',
1096 ),
1097 )
1098 );
1099
1100 $this->add_control(
1101 'mask_title_color',
1102 array(
1103 'label' => __( 'Mask Color', 'premium-addons-for-elementor' ),
1104 'type' => Controls_Manager::COLOR,
1105 'render_type' => 'template',
1106 'selectors' => array(
1107 '{{WRAPPER}}.premium-mask-yes .premium-mask-span::after' => 'background: {{VALUE}};',
1108 ),
1109 'condition' => array(
1110 'mask_switcher' => 'yes',
1111 'premium_title_style!' => 'style9',
1112 ),
1113 )
1114 );
1115
1116 $this->add_control(
1117 'mask_title_dir',
1118 array(
1119 'label' => __( 'Direction', 'premium-addons-for-elementor' ),
1120 'type' => Controls_Manager::CHOOSE,
1121 'options' => array(
1122 'tr' => array(
1123 'title' => esc_html__( 'To Right', 'premium-addons-for-elementor' ),
1124 'icon' => 'eicon-arrow-right',
1125 ),
1126 'tl' => array(
1127 'title' => esc_html__( 'To Left', 'premium-addons-for-elementor' ),
1128 'icon' => 'eicon-arrow-left',
1129 ),
1130 'tt' => array(
1131 'title' => esc_html__( 'To Top', 'premium-addons-for-elementor' ),
1132 'icon' => 'eicon-arrow-up',
1133 ),
1134 'tb' => array(
1135 'title' => esc_html__( 'To Bottom', 'premium-addons-for-elementor' ),
1136 'icon' => 'eicon-arrow-down',
1137 ),
1138 ),
1139 'default' => 'tr',
1140 'prefix_class' => 'premium-mask-',
1141 'render_type' => 'template',
1142 'condition' => array(
1143 'mask_switcher' => 'yes',
1144 'premium_title_style!' => 'style9',
1145 ),
1146 )
1147 );
1148
1149 $this->add_responsive_control(
1150 'mask_title_padding',
1151 array(
1152 'label' => __( 'Words Padding', 'premium-addons-for-elementor' ),
1153 'type' => Controls_Manager::DIMENSIONS,
1154 'size_units' => array( 'px', 'em', '%' ),
1155 'selectors' => array(
1156 '{{WRAPPER}} .premium-mask-span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1157 ),
1158 'condition' => array(
1159 'mask_switcher' => 'yes',
1160 'premium_title_style!' => 'style9',
1161 ),
1162 )
1163 );
1164
1165 $this->add_control(
1166 'noise',
1167 array(
1168 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ),
1169 'type' => Controls_Manager::SWITCHER,
1170 'prefix_class' => 'premium-title-noise-',
1171 'separator' => 'before',
1172 'render_type' => 'template',
1173 'condition' => array(
1174 'premium_title_style!' => 'style9',
1175 'mask_switcher!' => 'yes',
1176 'gradient_text_switcher!' => 'yes',
1177 'background_style' => 'color',
1178 ),
1179 )
1180 );
1181
1182 $this->end_controls_section();
1183
1184 $this->start_controls_section(
1185 'premium_title_description_section',
1186 array(
1187 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1188 )
1189 );
1190
1191 $this->add_control(
1192 'premium_title_desc_switcher',
1193 array(
1194 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1195 'type' => Controls_Manager::SWITCHER,
1196 )
1197 );
1198
1199 $this->add_control(
1200 'premium_title_desc_text',
1201 array(
1202 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1203 'type' => Controls_Manager::WYSIWYG,
1204 'dynamic' => array( 'active' => true ),
1205 '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' ),
1206 'condition' => array(
1207 'premium_title_desc_switcher' => 'yes',
1208 ),
1209 )
1210 );
1211
1212 $this->add_responsive_control(
1213 'premium_title_desc_display',
1214 array(
1215 'label' => __( 'Display', 'premium-addons-for-elementor' ),
1216 'type' => Controls_Manager::CHOOSE,
1217 'separator' => 'before',
1218 'options' => array(
1219 'row' => array(
1220 'title' => __( 'Inline', 'premium-addons-for-elementor' ),
1221 'icon' => 'eicon-ellipsis-h',
1222 ),
1223 'column' => array(
1224 'title' => __( 'Block', 'premium-addons-for-elementor' ),
1225 'icon' => 'eicon-ellipsis-v',
1226 ),
1227 ),
1228 'default' => 'column',
1229 'prefix_class' => 'premium-title-desc-display-',
1230 'toggle' => false,
1231 'selectors' => array(
1232 '{{WRAPPER}} .premium-title-wrapper' => 'flex-direction: {{VALUE}};',
1233 ),
1234 'condition' => array(
1235 'premium_title_desc_switcher' => 'yes',
1236 ),
1237 )
1238 );
1239
1240 $this->add_responsive_control(
1241 'premium_title_desc_order',
1242 array(
1243 'label' => __( 'Order', 'premium-addons-for-elementor' ),
1244 'type' => Controls_Manager::CHOOSE,
1245 'options' => array(
1246 '0' => array(
1247 'title' => __( 'Before Heading', 'premium-addons-for-elementor' ),
1248 'icon' => 'eicon-order-start',
1249 ),
1250 '2' => array(
1251 'title' => __( 'After Heading', 'premium-addons-for-elementor' ),
1252 'icon' => 'eicon-order-end',
1253 ),
1254 ),
1255 'default' => '2',
1256 'toggle' => false,
1257 'selectors' => array(
1258 '{{WRAPPER}} .premium-title-description' => 'order: {{VALUE}};',
1259 ),
1260 'condition' => array(
1261 'premium_title_desc_switcher' => 'yes',
1262 ),
1263 )
1264 );
1265
1266 $this->add_responsive_control(
1267 'premium_title_desc_v_align',
1268 array(
1269 'label' => __( 'Vertical Alignment', 'premium-addons-for-elementor' ),
1270 'type' => Controls_Manager::CHOOSE,
1271 'description' => __( 'Effective when the display is set to <b>"inline</b>"', 'premium-addons-for-elementor' ),
1272 'options' => array(
1273 'start' => array(
1274 'title' => __( 'Start', 'premium-addons-for-elementor' ),
1275 'icon' => 'eicon-align-start-v',
1276 ),
1277 'center' => array(
1278 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1279 'icon' => 'eicon-align-center-v',
1280 ),
1281 'end' => array(
1282 'title' => __( 'End', 'premium-addons-for-elementor' ),
1283 'icon' => 'eicon-align-end-v',
1284 ),
1285 'stretch' => array(
1286 'title' => __( 'Stretch', 'premium-addons-for-elementor' ),
1287 'icon' => 'eicon-align-stretch-v',
1288 ),
1289 ),
1290 'default' => 'center',
1291 'toggle' => false,
1292 'selectors' => array(
1293 '{{WRAPPER}} .premium-title-description' => 'align-self: {{VALUE}};',
1294 ),
1295 'condition' => array(
1296 'premium_title_desc_switcher' => 'yes',
1297 ),
1298 )
1299 );
1300
1301 $this->add_responsive_control(
1302 'premium_title_desc_align',
1303 array(
1304 'label' => __( 'Text Alignment', 'premium-addons-for-elementor' ),
1305 'type' => Controls_Manager::CHOOSE,
1306 'toggle' => false,
1307 'options' => array(
1308 'left' => array(
1309 'title' => __( 'Left', 'premium-addons-for-elementor' ),
1310 'icon' => 'eicon-text-align-left',
1311 ),
1312 'center' => array(
1313 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1314 'icon' => 'eicon-text-align-center',
1315 ),
1316 'right' => array(
1317 'title' => __( 'Right', 'premium-addons-for-elementor' ),
1318 'icon' => 'eicon-text-align-right',
1319 ),
1320 'justify' => array(
1321 'title' => __( 'Justify', 'premium-addons-for-elementor' ),
1322 'icon' => 'eicon-text-align-justify',
1323 ),
1324 ),
1325 'selectors' => array(
1326 '{{WRAPPER}} .premium-title-description' => 'text-align: {{VALUE}};',
1327 ),
1328 'condition' => array(
1329 'premium_title_desc_switcher' => 'yes',
1330 ),
1331 )
1332 );
1333
1334 $this->end_controls_section();
1335
1336 $this->start_controls_section(
1337 'section_pa_docs',
1338 array(
1339 'label' => __( 'Help & Docs', 'premium-addons-for-elementor' ),
1340 )
1341 );
1342
1343 $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/heading-widget-tutorial/', 'heading-widget', 'wp-editor', 'get-support' );
1344
1345 $this->add_control(
1346 'doc_1',
1347 array(
1348 'type' => Controls_Manager::RAW_HTML,
1349 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Getting started »', 'premium-addons-for-elementor' ) ),
1350 'content_classes' => 'editor-pa-doc',
1351 )
1352 );
1353
1354 Helper_Functions::register_element_feedback_controls( $this );
1355
1356 $this->end_controls_section();
1357
1358 Helper_Functions::register_papro_promotion_controls( $this, 'heading' );
1359
1360 $this->start_controls_section(
1361 'premium_title_style_section',
1362 array(
1363 'label' => __( 'Title', 'premium-addons-for-elementor' ),
1364 'tab' => Controls_Manager::TAB_STYLE,
1365 )
1366 );
1367
1368 $this->add_control(
1369 'premium_title_color',
1370 array(
1371 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1372 'type' => Controls_Manager::COLOR,
1373 'global' => array(
1374 'default' => Global_Colors::COLOR_PRIMARY,
1375 ),
1376 'selectors' => array(
1377 '{{WRAPPER}} .premium-title-header, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'color: {{VALUE}}',
1378 '{{WRAPPER}}.premium-title-stroke-yes .premium-title-text' => '-webkit-text-fill-color: {{VALUE}}',
1379 '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--base-color: {{VALUE}}',
1380 ),
1381 )
1382 );
1383
1384 $this->add_control(
1385 'premium_title_blur_color',
1386 array(
1387 'label' => __( 'Blur Color', 'premium-addons-for-elementor' ),
1388 'type' => Controls_Manager::COLOR,
1389 'default' => '#000',
1390 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-color: {{VALUE}};' ),
1391 'condition' => array(
1392 'premium_title_style' => 'style9',
1393 ),
1394 )
1395 );
1396
1397 $this->add_control(
1398 'shining_shiny_color_title',
1399 array(
1400 'label' => __( 'Shiny Color', 'premium-addons-for-elementor' ),
1401 'type' => Controls_Manager::COLOR,
1402 'default' => '#fff',
1403 'condition' => array(
1404 'premium_title_style' => 'style8',
1405 ),
1406 'selectors' => array( '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--shiny-color: {{VALUE}}' ),
1407 )
1408 );
1409
1410 $this->add_group_control(
1411 Group_Control_Typography::get_type(),
1412 array(
1413 'name' => 'title_typography',
1414 'global' => array(
1415 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1416 ),
1417 'selector' => '{{WRAPPER}} .premium-title-header',
1418 )
1419 );
1420
1421 $this->add_group_control(
1422 Group_Control_Border::get_type(),
1423 array(
1424 'name' => 'style_one_border',
1425 'fields_options' => array(
1426 'border' => array(
1427 'default' => 'solid',
1428 ),
1429 ),
1430 'selector' => '{{WRAPPER}} .premium-title-style1',
1431 'condition' => array(
1432 'premium_title_style' => 'style1',
1433 ),
1434 )
1435 );
1436
1437 $this->add_control(
1438 'background_style',
1439 array(
1440 'label' => __( 'Background Style', 'premium-addons-for-elementor' ),
1441 'type' => Controls_Manager::SELECT,
1442 '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' ),
1443 'options' => array(
1444 'color' => __( 'Normal', 'premium-addons-for-elementor' ),
1445 'clipped' => __( 'Clipped', 'premium-addons-for-elementor' ),
1446 ),
1447 'prefix_class' => 'premium-title-',
1448 'default' => 'color',
1449 'label_block' => true,
1450 'separator' => 'before',
1451 'condition' => array(
1452 'premium_title_style!' => array( 'style8', 'style9' ),
1453 ),
1454 )
1455 );
1456
1457 $this->add_group_control(
1458 Premium_Background::get_type(),
1459 array(
1460 'name' => 'title_background',
1461 'types' => array( 'classic', 'gradient' ),
1462 'condition' => array(
1463 'premium_title_style!' => array( 'style8', 'style9' ),
1464 'background_style!' => '',
1465 ),
1466 'selector' => '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-header, {{WRAPPER}}.premium-title-clipped .premium-title-text',
1467 )
1468 );
1469
1470 $this->add_control(
1471 'premium_title_style2_background_color',
1472 array(
1473 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1474 'type' => Controls_Manager::COLOR,
1475 'global' => array(
1476 'default' => Global_Colors::COLOR_SECONDARY,
1477 ),
1478 'selectors' => array(
1479 '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style2, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};',
1480 ),
1481 'condition' => array(
1482 'premium_title_style' => 'style2',
1483 'background_style' => '',
1484 ),
1485 )
1486 );
1487
1488 $this->add_control(
1489 'premium_title_style3_background_color',
1490 array(
1491 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1492 'type' => Controls_Manager::COLOR,
1493 'global' => array(
1494 'default' => Global_Colors::COLOR_SECONDARY,
1495 ),
1496 'selectors' => array(
1497 '{{WRAPPER}}:not(.premium-title-clipped) .premium-title-style3, {{WRAPPER}}.premium-title-clipped .premium-title-text' => 'background-color: {{VALUE}};',
1498 ),
1499 'condition' => array(
1500 'premium_title_style' => 'style3',
1501 'background_style' => '',
1502 ),
1503 )
1504 );
1505
1506 $this->add_control(
1507 'heading_lq_effect',
1508 array(
1509 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ),
1510 'type' => Controls_Manager::SELECT,
1511 'description' => sprintf(
1512 /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */
1513 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' ),
1514 '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">',
1515 '</a>'
1516 ),
1517 'options' => array(
1518 'none' => __( 'None', 'premium-addons-for-elementor' ),
1519 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ),
1520 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ),
1521 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ),
1522 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ),
1523 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ),
1524 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ),
1525 ),
1526 'default' => 'none',
1527 'label_block' => true,
1528 'condition' => array(
1529 'background_style' => 'color',
1530 'premium_title_style!' => array( 'style8', 'style9' ),
1531 ),
1532 )
1533 );
1534
1535 $this->add_control(
1536 'premium_title_style5_header_line_color',
1537 array(
1538 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
1539 'type' => Controls_Manager::COLOR,
1540 'global' => array(
1541 'default' => Global_Colors::COLOR_PRIMARY,
1542 ),
1543 'selectors' => array(
1544 '{{WRAPPER}} .premium-title-style5' => 'border-bottom: 2px solid {{VALUE}};',
1545 ),
1546 'condition' => array(
1547 'premium_title_style' => 'style5',
1548 ),
1549 )
1550 );
1551
1552 $this->add_group_control(
1553 Group_Control_Border::get_type(),
1554 array(
1555 'name' => 'style_five_border',
1556 'selector' => '{{WRAPPER}} .premium-title-container',
1557 'condition' => array(
1558 'premium_title_style' => array( 'style2', 'style4', 'style5', 'style6' ),
1559 ),
1560 )
1561 );
1562
1563 $this->add_control(
1564 'premium_title_style6_header_line_color',
1565 array(
1566 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
1567 'type' => Controls_Manager::COLOR,
1568 'global' => array(
1569 'default' => Global_Colors::COLOR_PRIMARY,
1570 ),
1571 'selectors' => array(
1572 '{{WRAPPER}} .premium-title-style6' => 'border-bottom: 2px solid {{VALUE}};',
1573 ),
1574 'condition' => array(
1575 'premium_title_style' => 'style6',
1576 ),
1577 )
1578 );
1579
1580 $this->add_control(
1581 'premium_title_style6_triangle_color',
1582 array(
1583 'label' => __( 'Triangle Color', 'premium-addons-for-elementor' ),
1584 'type' => Controls_Manager::COLOR,
1585 'global' => array(
1586 'default' => Global_Colors::COLOR_PRIMARY,
1587 ),
1588 'selectors' => array(
1589 '{{WRAPPER}} .premium-title-style6:before' => 'border-bottom-color: {{VALUE}};',
1590 ),
1591 'condition' => array(
1592 'premium_title_style' => 'style6',
1593 ),
1594 )
1595 );
1596
1597 $this->add_group_control(
1598 Group_Control_Text_Shadow::get_type(),
1599 array(
1600 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
1601 'name' => 'premium_title_text_shadow',
1602 'selector' => '{{WRAPPER}} .premium-title-header',
1603 )
1604 );
1605
1606 $this->add_control(
1607 'premium_title_shadow_value',
1608 array(
1609 'label' => esc_html__( 'Blur Shadow Value (px)', 'premium-addons-for-elementor' ),
1610 'type' => Controls_Manager::NUMBER,
1611 'min' => '10',
1612 'max' => '500',
1613 'step' => '10',
1614 'dynamic' => array( 'active' => true ),
1615 'selectors' => array( '{{WRAPPER}} .premium-title-header' => '--shadow-value: {{VALUE}}px;' ),
1616 'default' => '120',
1617 'condition' => array(
1618 'premium_title_style' => 'style9',
1619 ),
1620 )
1621 );
1622
1623 $this->add_control(
1624 'premium_title_delay',
1625 array(
1626 'label' => esc_html__( 'Animation Delay (s)', 'premium-addons-for-elementor' ),
1627 'type' => Controls_Manager::NUMBER,
1628 'min' => '1',
1629 'max' => '30',
1630 'step' => 0.5,
1631 'condition' => array(
1632 'premium_title_style' => array( 'style8', 'style9' ),
1633 ),
1634 'render_type' => 'template',
1635 'dynamic' => array( 'active' => true ),
1636 'default' => '2',
1637 )
1638 );
1639
1640 $this->add_control(
1641 'shining_animation_duration',
1642 array(
1643 'label' => __( 'Animation Duration (s)', 'premium-addons-for-elementor' ),
1644 'type' => Controls_Manager::NUMBER,
1645 'default' => '1',
1646 'step' => 0.5,
1647 'condition' => array(
1648 'premium_title_style' => 'style8',
1649 ),
1650 'frontend_available' => true,
1651 'render_type' => 'template',
1652 'selectors' => array(
1653 '{{WRAPPER}} .premium-title-style8 .premium-title-text[data-animation="shiny"]' => '--animation-speed: {{VALUE}}s ',
1654 ),
1655 )
1656 );
1657
1658 $this->add_responsive_control(
1659 'premium_title_margin',
1660 array(
1661 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1662 'type' => Controls_Manager::DIMENSIONS,
1663 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
1664 'selectors' => array(
1665 '{{WRAPPER}} .premium-title-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1666 ),
1667 )
1668 );
1669
1670 $this->add_responsive_control(
1671 'premium_title_padding',
1672 array(
1673 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1674 'type' => Controls_Manager::DIMENSIONS,
1675 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
1676 'selectors' => array(
1677 // '{{WRAPPER}} .premium-title-text, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1678 '{{WRAPPER}} .premium-title-header, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::before, {{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1679 ),
1680 )
1681 );
1682
1683 $this->add_control(
1684 'gradient_text_switcher',
1685 array(
1686 'label' => __( 'Animated Gradient', 'premium-addons-for-elementor' ),
1687 'type' => Controls_Manager::SWITCHER,
1688 'prefix_class' => 'premium-title-gradient-',
1689 'separator' => 'before',
1690 'condition' => array(
1691 'premium_title_style!' => array( 'style8', 'style9' ),
1692 'mask_switcher!' => 'yes',
1693 'stroke_switcher!' => 'yes',
1694 'background_style' => 'color',
1695 ),
1696 )
1697 );
1698
1699 $this->add_control(
1700 'animation_transition_speed',
1701 array(
1702 'label' => __( 'Animation Speed (sec)', 'premium-addons-for-elementor' ),
1703 'type' => Controls_Manager::SLIDER,
1704 'range' => array(
1705 'px' => array(
1706 'min' => 0,
1707 'max' => 10,
1708 'step' => .1,
1709 ),
1710 ),
1711 'selectors' => array(
1712 '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text, {{WRAPPER}}.premium-title-gradient-yes .premium-title-icon' => 'animation-duration: {{SIZE}}s ',
1713 ),
1714 'condition' => array(
1715 'gradient_text_switcher' => 'yes',
1716 'premium_title_style!' => array( 'style8', 'style9' ),
1717 'mask_switcher!' => 'yes',
1718 'stroke_switcher!' => 'yes',
1719 'background_style' => 'color',
1720 ),
1721 )
1722 );
1723
1724 $this->add_group_control(
1725 Premium_Background::get_type(),
1726 array(
1727 'name' => 'text_gradient',
1728 'types' => array( 'gradient' ),
1729 'selector' => '{{WRAPPER}}.premium-title-gradient-yes .premium-title-text, {{WRAPPER}}.premium-title-gradient-yes .premium-title-icon',
1730 'condition' => array(
1731 'gradient_text_switcher' => 'yes',
1732 'premium_title_style!' => array( 'style8', 'style9' ),
1733 'mask_switcher!' => 'yes',
1734 'stroke_switcher!' => 'yes',
1735 'background_style' => 'color',
1736 ),
1737 )
1738 );
1739
1740 $this->add_control(
1741 'noise_heading',
1742 array(
1743 'label' => __( 'Glitch Effect', 'premium-addons-for-elementor' ),
1744 'type' => Controls_Manager::HEADING,
1745 'condition' => array(
1746 'noise' => 'yes',
1747 ),
1748 )
1749 );
1750
1751 $this->add_control(
1752 'noise_first_color',
1753 array(
1754 'label' => __( 'Color #1', 'premium-addons-for-elementor' ),
1755 'type' => Controls_Manager::COLOR,
1756 'condition' => array(
1757 'noise' => 'yes',
1758 ),
1759 'selectors' => array(
1760 '{{WRAPPER}}.premium-title-noise-yes .premium-title-text::before' => 'text-shadow: 1px 0 {{VALUE}};',
1761 ),
1762 )
1763 );
1764
1765 $this->add_control(
1766 'noise_second_color',
1767 array(
1768 'label' => __( 'Color #2', 'premium-addons-for-elementor' ),
1769 'type' => Controls_Manager::COLOR,
1770 'condition' => array(
1771 'noise' => 'yes',
1772 ),
1773 'selectors' => array(
1774 '{{WRAPPER}}.premium-title-noise-yes .premium-title-text::after' => 'text-shadow: -1px 0 {{VALUE}};',
1775 ),
1776 )
1777 );
1778
1779 $this->end_controls_section();
1780
1781 $this->start_controls_section(
1782 'stroke_style_section',
1783 array(
1784 'label' => __( 'Stroke', 'premium-addons-for-elementor' ),
1785 'tab' => Controls_Manager::TAB_STYLE,
1786 'condition' => array(
1787 'stroke_switcher' => 'yes',
1788 'premium_title_style!' => 'style9',
1789 'background_style' => 'color',
1790 ),
1791 )
1792 );
1793
1794 $this->add_control(
1795 'stroke_text_color',
1796 array(
1797 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1798 'type' => Controls_Manager::COLOR,
1799 'condition' => array(
1800 'stroke_switcher' => 'yes',
1801 ),
1802 'selectors' => array(
1803 '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-color: {{VALUE}};',
1804 ),
1805 )
1806 );
1807
1808 $this->add_responsive_control(
1809 'stroke_width',
1810 array(
1811 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
1812 'type' => Controls_Manager::SLIDER,
1813 'condition' => array(
1814 'stroke_switcher' => 'yes',
1815 ),
1816 'default' => array(
1817 'size' => 1,
1818 'unit' => 'px',
1819 ),
1820 'selectors' => array(
1821 '{{WRAPPER}} .premium-title-text' => '-webkit-text-stroke-width: {{SIZE}}px',
1822 ),
1823 )
1824 );
1825
1826 $this->end_controls_section();
1827
1828 $this->start_controls_section(
1829 'focused_word_style_section',
1830 array(
1831 'label' => __( 'Focused Word', 'premium-addons-for-elementor' ),
1832 'tab' => Controls_Manager::TAB_STYLE,
1833 )
1834 );
1835
1836 $this->add_control(
1837 'minimal_mask_notice',
1838 array(
1839 'raw' => __( 'Please note that focused word styling does not work with minimal mask effect', 'premium-addons-for-elementor' ),
1840 'type' => Controls_Manager::RAW_HTML,
1841 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
1842 'condition' => array(
1843 'mask_switcher' => 'yes',
1844 ),
1845 )
1846 );
1847
1848 $this->add_control(
1849 'focused_word_color',
1850 array(
1851 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1852 'type' => Controls_Manager::COLOR,
1853 'global' => array(
1854 'default' => Global_Colors::COLOR_TEXT,
1855 ),
1856 'selectors' => array(
1857 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'color: {{VALUE}}',
1858 '{{WRAPPER}}.premium-title-stroke-yes .premium-title__focused-word' => '-webkit-text-fill-color: {{VALUE}}',
1859 ),
1860 )
1861 );
1862
1863 $this->add_responsive_control(
1864 'focused_stroke_width',
1865 array(
1866 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
1867 'type' => Controls_Manager::SLIDER,
1868 'default' => array(
1869 'size' => 1,
1870 'unit' => 'px',
1871 ),
1872 'selectors' => array(
1873 '{{WRAPPER}}.premium-title-stroke-yes .premium-title__focused-word' => '-webkit-text-stroke-width: {{SIZE}}px',
1874 ),
1875 'condition' => array(
1876 'stroke_switcher' => 'yes',
1877 ),
1878 )
1879 );
1880
1881 $this->add_control(
1882 'focused_stroke_text_color',
1883 array(
1884 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1885 'type' => Controls_Manager::COLOR,
1886 'selectors' => array(
1887 '{{WRAPPER}}.premium-title-stroke-yes .premium-title__focused-word' => '-webkit-text-stroke-color: {{VALUE}};',
1888 ),
1889 'condition' => array(
1890 'stroke_switcher' => 'yes',
1891 ),
1892 )
1893 );
1894
1895 $this->add_group_control(
1896 Group_Control_Typography::get_type(),
1897 array(
1898 'name' => 'focused_word_typography',
1899 'selector' => '{{WRAPPER}} .premium-title-text .premium-title__focused-word',
1900 )
1901 );
1902
1903 $this->add_group_control(
1904 Group_Control_Border::get_type(),
1905 array(
1906 'name' => 'focused_word_border',
1907 'selector' => '{{WRAPPER}} .premium-title-text .premium-title__focused-word',
1908 )
1909 );
1910
1911 $this->add_control(
1912 'focused_word_border_radius',
1913 array(
1914 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
1915 'type' => Controls_Manager::SLIDER,
1916 'size_units' => array( 'px', '%', 'em' ),
1917 'selectors' => array(
1918 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'border-radius: {{SIZE}}{{UNIT}};',
1919 ),
1920 'condition' => array(
1921 'icon_adv_radius!' => 'yes',
1922 ),
1923 )
1924 );
1925
1926 $this->add_group_control(
1927 Group_Control_Text_Shadow::get_type(),
1928 array(
1929 'name' => 'focused_word_shadow',
1930 'selector' => '{{WRAPPER}} .premium-title-text .premium-title__focused-word',
1931 )
1932 );
1933
1934 $this->add_responsive_control(
1935 'focused_word_margin',
1936 array(
1937 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
1938 'type' => Controls_Manager::DIMENSIONS,
1939 'size_units' => array( 'px', 'em', '%', 'custom' ),
1940 'allowed_dimensions' => array( 'left', 'right' ),
1941 'placeholder' => array(
1942 'top' => '',
1943 'right' => '',
1944 'bottom' => '',
1945 'left' => '',
1946 ),
1947 'selectors' => array(
1948 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1949 ),
1950 )
1951 );
1952
1953 $this->add_responsive_control(
1954 'focused_word_padding',
1955 array(
1956 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1957 'type' => Controls_Manager::DIMENSIONS,
1958 'size_units' => array( 'px', 'em', '%', 'custom' ),
1959 'selectors' => array(
1960 '{{WRAPPER}} .premium-title-text .premium-title__focused-word' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1961 ),
1962 )
1963 );
1964
1965 $this->end_controls_section();
1966
1967 $this->start_controls_section(
1968 'premium_title_icon_style_section',
1969 array(
1970 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
1971 'tab' => Controls_Manager::TAB_STYLE,
1972 'condition' => array(
1973 'premium_title_icon_switcher' => 'yes',
1974 ),
1975 )
1976 );
1977
1978 $this->add_control(
1979 'premium_title_icon_color',
1980 array(
1981 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1982 'type' => Controls_Manager::COLOR,
1983 'global' => array(
1984 'default' => Global_Colors::COLOR_PRIMARY,
1985 ),
1986 'selectors' => array(
1987 '{{WRAPPER}} .premium-title-icon' => 'color: {{VALUE}}',
1988 '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'fill: {{VALUE}};',
1989 ),
1990 'condition' => array(
1991 'icon_type' => array( 'icon', 'svg' ),
1992 ),
1993 )
1994 );
1995
1996 if ( $draw_icon ) {
1997 $this->add_control(
1998 'stroke_color',
1999 array(
2000 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
2001 'type' => Controls_Manager::COLOR,
2002 'global' => array(
2003 'default' => Global_Colors::COLOR_ACCENT,
2004 ),
2005 'condition' => array(
2006 'icon_type' => array( 'icon', 'svg' ),
2007 ),
2008 'selectors' => array(
2009 '{{WRAPPER}} .premium-drawable-icon *, {{WRAPPER}} svg:not([class*="premium-"])' => 'stroke: {{VALUE}};',
2010 ),
2011 )
2012 );
2013
2014 $this->add_control(
2015 'svg_color',
2016 array(
2017 'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ),
2018 'type' => Controls_Manager::COLOR,
2019 'global' => false,
2020 'separator' => 'after',
2021 'condition' => array(
2022 'icon_type' => array( 'icon', 'svg' ),
2023 'draw_svg' => 'yes',
2024 ),
2025 )
2026 );
2027 }
2028
2029 $this->add_responsive_control(
2030 'premium_title_icon_size',
2031 array(
2032 'label' => __( 'Size', 'premium-addons-for-elementor' ),
2033 'type' => Controls_Manager::SLIDER,
2034 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2035 'range' => array(
2036 'px' => array(
2037 'min' => 10,
2038 'max' => 300,
2039 ),
2040 'em' => array(
2041 'min' => 1,
2042 'max' => 30,
2043 ),
2044 ),
2045 'condition' => array(
2046 'icon_type!' => 'svg',
2047 ),
2048 'selectors' => array(
2049 '{{WRAPPER}} .premium-title-header i' => 'font-size: {{SIZE}}{{UNIT}}',
2050 '{{WRAPPER}} .premium-title-header svg, {{WRAPPER}} .premium-title-header img' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important',
2051 ),
2052 )
2053 );
2054
2055 $this->add_responsive_control(
2056 'svg_icon_width',
2057 array(
2058 'label' => __( 'Width', 'premium-addons-for-elementor' ),
2059 'type' => Controls_Manager::SLIDER,
2060 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2061 'range' => array(
2062 'px' => array(
2063 'min' => 1,
2064 'max' => 600,
2065 ),
2066 'em' => array(
2067 'min' => 1,
2068 'max' => 30,
2069 ),
2070 ),
2071 'default' => array(
2072 'size' => 100,
2073 'unit' => 'px',
2074 ),
2075 'condition' => array(
2076 'icon_type' => 'svg',
2077 ),
2078 'selectors' => array(
2079 '{{WRAPPER}} .premium-title-header svg' => 'width: {{SIZE}}{{UNIT}};',
2080 ),
2081 )
2082 );
2083
2084 $this->add_responsive_control(
2085 'svg_icon_height',
2086 array(
2087 'label' => __( 'Height', 'premium-addons-for-elementor' ),
2088 'type' => Controls_Manager::SLIDER,
2089 'size_units' => array( 'px', 'em', 'custom' ),
2090 'range' => array(
2091 'px' => array(
2092 'min' => 1,
2093 'max' => 300,
2094 ),
2095 'em' => array(
2096 'min' => 1,
2097 'max' => 30,
2098 ),
2099 ),
2100 'condition' => array(
2101 'icon_type' => 'svg',
2102 ),
2103 'selectors' => array(
2104 '{{WRAPPER}} .premium-title-header svg' => 'height: {{SIZE}}{{UNIT}}',
2105 ),
2106 )
2107 );
2108
2109 $this->add_group_control(
2110 Premium_Background::get_type(),
2111 array(
2112 'name' => 'premium_title_icon_background',
2113 'types' => array( 'classic', 'gradient' ),
2114 'selector' => '{{WRAPPER}} .premium-title-icon',
2115 )
2116 );
2117
2118 $this->add_group_control(
2119 Group_Control_Border::get_type(),
2120 array(
2121 'name' => 'premium_title_icon_border',
2122 'selector' => '{{WRAPPER}} .premium-title-icon',
2123 )
2124 );
2125
2126 $this->add_control(
2127 'premium_title_icon_border_radius',
2128 array(
2129 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2130 'type' => Controls_Manager::SLIDER,
2131 'size_units' => array( 'px', '%', 'em' ),
2132 'selectors' => array(
2133 '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{SIZE}}{{UNIT}};',
2134 ),
2135 'condition' => array(
2136 'icon_adv_radius!' => 'yes',
2137 ),
2138 )
2139 );
2140
2141 $this->add_control(
2142 'icon_adv_radius',
2143 array(
2144 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
2145 'type' => Controls_Manager::SWITCHER,
2146 '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>',
2147 )
2148 );
2149
2150 $this->add_control(
2151 'icon_adv_radius_value',
2152 array(
2153 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2154 'type' => Controls_Manager::TEXT,
2155 'dynamic' => array( 'active' => true ),
2156 'selectors' => array(
2157 '{{WRAPPER}} .premium-title-icon' => 'border-radius: {{VALUE}};',
2158 ),
2159 'condition' => array(
2160 'icon_adv_radius' => 'yes',
2161 ),
2162 'ai' => array(
2163 'active' => false,
2164 ),
2165 )
2166 );
2167
2168 $this->add_responsive_control(
2169 'premium_title_icon_margin',
2170 array(
2171 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2172 'type' => Controls_Manager::DIMENSIONS,
2173 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2174 'selectors' => array(
2175 '{{WRAPPER}} .premium-title-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
2176 ),
2177 )
2178 );
2179
2180 $this->add_responsive_control(
2181 'premium_title_icon_padding',
2182 array(
2183 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2184 'type' => Controls_Manager::DIMENSIONS,
2185 'size_units' => array( 'px', 'em', '%', 'vw', 'custom' ),
2186 'selectors' => array(
2187 '{{WRAPPER}} .premium-title-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
2188 ),
2189 )
2190 );
2191
2192 $this->add_group_control(
2193 Group_Control_Text_Shadow::get_type(),
2194 array(
2195 'label' => __( 'Icon Shadow', 'premium-addons-for-elementor' ),
2196 'name' => 'premium_title_icon_text_shadow',
2197 'selector' => '{{WRAPPER}} .premium-title-icon',
2198 'condition' => array(
2199 'icon_type' => 'icon',
2200 ),
2201 )
2202 );
2203
2204 $this->end_controls_section();
2205
2206 $this->start_controls_section(
2207 'premium_title_desc_style_section',
2208 array(
2209 'label' => __( 'Description', 'premium-addons-for-elementor' ),
2210 'tab' => Controls_Manager::TAB_STYLE,
2211 'condition' => array(
2212 'premium_title_desc_switcher' => 'yes',
2213 ),
2214 )
2215 );
2216
2217 $this->add_control(
2218 'premium_title_desc_color',
2219 array(
2220 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2221 'type' => Controls_Manager::COLOR,
2222 'selectors' => array(
2223 '{{WRAPPER}} .premium-title-description, {{WRAPPER}} .premium-title-description *' => 'color: {{VALUE}};',
2224 ),
2225 )
2226 );
2227
2228 $this->add_group_control(
2229 Group_Control_Typography::get_type(),
2230 array(
2231 'name' => 'premium_title_desc_typography',
2232 'global' => array(
2233 'default' => Global_Typography::TYPOGRAPHY_TEXT,
2234 ),
2235 'selector' => '{{WRAPPER}} .premium-title-description',
2236 )
2237 );
2238
2239 $this->add_group_control(
2240 Group_Control_Text_Shadow::get_type(),
2241 array(
2242 'name' => 'premium_title_desc_text_shadow',
2243 'selector' => '{{WRAPPER}} .premium-title-description',
2244 )
2245 );
2246
2247 $this->add_group_control(
2248 Premium_Background::get_type(),
2249 array(
2250 'name' => 'premium_title_desc_background',
2251 'types' => array( 'classic', 'gradient' ),
2252 'selector' => '{{WRAPPER}} .premium-title-description',
2253 )
2254 );
2255
2256 $this->add_group_control(
2257 Group_Control_Box_Shadow::get_type(),
2258 array(
2259 'name' => 'premium_title_desc_box_shadow',
2260 'selector' => '{{WRAPPER}} .premium-title-description',
2261 )
2262 );
2263
2264 $this->add_group_control(
2265 Group_Control_Border::get_type(),
2266 array(
2267 'name' => 'premium_title_desc_border',
2268 'selector' => '{{WRAPPER}} .premium-title-description',
2269 )
2270 );
2271
2272 $this->add_responsive_control(
2273 'premium_title_desc_border_radius',
2274 array(
2275 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2276 'type' => Controls_Manager::DIMENSIONS,
2277 'size_units' => array( 'px', '%', 'em' ),
2278 'selectors' => array(
2279 '{{WRAPPER}} .premium-title-description' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2280 ),
2281 )
2282 );
2283
2284 $this->add_responsive_control(
2285 'premium_title_desc_margin',
2286 array(
2287 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2288 'type' => Controls_Manager::DIMENSIONS,
2289 'size_units' => array( 'px', 'em', '%' ),
2290 'selectors' => array(
2291 '{{WRAPPER}} .premium-title-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2292 ),
2293 )
2294 );
2295
2296 $this->add_responsive_control(
2297 'premium_title_desc_padding',
2298 array(
2299 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2300 'type' => Controls_Manager::DIMENSIONS,
2301 'size_units' => array( 'px', 'em', '%' ),
2302 'selectors' => array(
2303 '{{WRAPPER}} .premium-title-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2304 ),
2305 )
2306 );
2307
2308 $this->end_controls_section();
2309
2310 $this->start_controls_section(
2311 'stripe_style_section',
2312 array(
2313 'label' => __( 'Stripe', 'premium-addons-for-elementor' ),
2314 'tab' => Controls_Manager::TAB_STYLE,
2315 'condition' => array(
2316 'premium_title_style' => 'style7',
2317 ),
2318 )
2319 );
2320
2321 $this->add_control(
2322 'premium_title_style7_strip_color',
2323 array(
2324 'label' => __( 'Stripe Color', 'premium-addons-for-elementor' ),
2325 'type' => Controls_Manager::COLOR,
2326 'global' => array(
2327 'default' => Global_Colors::COLOR_PRIMARY,
2328 ),
2329 'selectors' => array(
2330 '{{WRAPPER}} .premium-title-style7-stripe' => 'background-color: {{VALUE}};',
2331 ),
2332 )
2333 );
2334
2335 $this->add_responsive_control(
2336 'stripe_margin',
2337 array(
2338 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2339 'type' => Controls_Manager::DIMENSIONS,
2340 'size_units' => array( 'px', 'em', '%', 'custom' ),
2341 'selectors' => array(
2342 '{{WRAPPER}} .premium-title-style7-stripe' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2343 ),
2344 )
2345 );
2346
2347 $this->end_controls_section();
2348
2349 $this->start_controls_section(
2350 'background_text_style_section',
2351 array(
2352 'label' => __( 'Background Text', 'premium-addons-for-elementor' ),
2353 'tab' => Controls_Manager::TAB_STYLE,
2354 'condition' => array(
2355 'background_text_switcher' => 'yes',
2356 ),
2357 )
2358 );
2359
2360 $this->add_control(
2361 'background_text_color',
2362 array(
2363 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2364 'type' => Controls_Manager::COLOR,
2365 'global' => array(
2366 'default' => Global_Colors::COLOR_PRIMARY,
2367 ),
2368 'selectors' => array(
2369 '{{WRAPPER}} .premium-title-bg-text:before' => 'color: {{VALUE}}',
2370 ),
2371 )
2372 );
2373
2374 $this->add_control(
2375 'bg_stroke_text_color',
2376 array(
2377 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
2378 'type' => Controls_Manager::COLOR,
2379 'condition' => array(
2380 'bg_stroke_switcher' => 'yes',
2381 ),
2382 'selectors' => array(
2383 '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-color: {{VALUE}};',
2384 ),
2385 )
2386 );
2387
2388 $this->add_group_control(
2389 Group_Control_Typography::get_type(),
2390 array(
2391 'name' => 'background_text_typography',
2392 'global' => array(
2393 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2394 ),
2395 'selector' => '{{WRAPPER}} .premium-title-bg-text:before',
2396 )
2397 );
2398
2399 $this->add_group_control(
2400 Group_Control_Text_Shadow::get_type(),
2401 array(
2402 'name' => 'background_text_shadow',
2403 'selector' => '{{WRAPPER}} .premium-title-bg-text:before',
2404 )
2405 );
2406
2407 $this->add_responsive_control(
2408 'bg_stroke_width',
2409 array(
2410 'label' => __( 'Stroke Fill Width', 'premium-addons-for-elementor' ),
2411 'type' => Controls_Manager::SLIDER,
2412 'default' => array(
2413 'size' => 1,
2414 'unit' => 'px',
2415 ),
2416 'condition' => array(
2417 'bg_stroke_switcher' => 'yes',
2418 ),
2419 'selectors' => array(
2420 '{{WRAPPER}} .premium-title-bg-text::before' => '-webkit-text-stroke-width: {{SIZE}}px',
2421 ),
2422 )
2423 );
2424
2425 $this->add_control(
2426 'background_text_mix_blend',
2427 array(
2428 'label' => __( 'Blend Mode', 'premium-addons-for-elementor' ),
2429 'type' => Controls_Manager::SELECT,
2430 'options' => array(
2431 '' => __( 'Normal', 'premium-addons-for-elementor' ),
2432 'multiply' => 'Multiply',
2433 'screen' => 'Screen',
2434 'overlay' => 'Overlay',
2435 'darken' => 'Darken',
2436 'lighten' => 'Lighten',
2437 'color-dodge' => 'Color Dodge',
2438 'saturation' => 'Saturation',
2439 'color' => 'Color',
2440 'luminosity' => 'Luminosity',
2441 ),
2442 'selectors' => array(
2443 '{{WRAPPER}} .premium-title-bg-text:before' => 'mix-blend-mode: {{VALUE}}',
2444 ),
2445 )
2446 );
2447
2448 $this->add_control(
2449 'background_text_zindex',
2450 array(
2451 'label' => __( 'z-Index', 'premium-addons-for-elementor' ),
2452 'type' => Controls_Manager::NUMBER,
2453 'min' => -10,
2454 'max' => 20,
2455 'step' => 1,
2456 'selectors' => array(
2457 '{{WRAPPER}} .premium-title-bg-text:before' => 'z-index: {{VALUE}}',
2458 ),
2459 )
2460 );
2461
2462 $this->end_controls_section();
2463
2464 $this->start_controls_section(
2465 'underline_style_section',
2466 array(
2467 'label' => __( 'Underline', 'premium-addons-for-elementor' ),
2468 'tab' => Controls_Manager::TAB_STYLE,
2469 'condition' => array(
2470 'hover_effect!' => 'none',
2471 ),
2472 )
2473 );
2474
2475 $this->add_control(
2476 'underline_color',
2477 array(
2478 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
2479 'type' => Controls_Manager::COLOR,
2480 'global' => array(
2481 'default' => Global_Colors::COLOR_SECONDARY,
2482 ),
2483 'selectors' => array(
2484 '{{WRAPPER}} .premium-btn-svg' => 'stroke: {{VALUE}};',
2485 '{{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}};',
2486 ),
2487 )
2488 );
2489
2490 $this->add_responsive_control(
2491 'line_width',
2492 array(
2493 'label' => __( 'Line Width (%)', 'premium-addons-for-elementor' ),
2494 'type' => Controls_Manager::SLIDER,
2495 'condition' => array(
2496 'hover_effect' => array( 'line1', 'line3', 'line5' ),
2497 ),
2498 'default' => array(
2499 'size' => 100,
2500 ),
2501 'selectors' => array(
2502 '{{WRAPPER}} .premium-btn-svg, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after' => 'width: {{SIZE}}%',
2503 ),
2504 )
2505 );
2506
2507 $this->add_responsive_control(
2508 'line_height',
2509 array(
2510 'label' => __( 'Line Height (PX)', 'premium-addons-for-elementor' ),
2511 'type' => Controls_Manager::SLIDER,
2512 'condition' => array(
2513 'hover_effect!' => array( 'line1', 'line3', 'line4' ),
2514 ),
2515 'selectors' => array(
2516 '{{WRAPPER}} .premium-button-line2::before, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after, {{WRAPPER}} .premium-button-line7::before' => 'height: {{SIZE}}px',
2517 ),
2518 )
2519 );
2520
2521 $this->add_responsive_control(
2522 'line_h_position',
2523 array(
2524 'label' => __( 'Line Horizontal Position (%)', 'premium-addons-for-elementor' ),
2525 'type' => Controls_Manager::SLIDER,
2526 'condition' => array(
2527 'hover_effect' => array( 'line3', 'line5' ),
2528 ),
2529 'selectors' => array(
2530 '{{WRAPPER}} .premium-btn-line-wrap, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after' => 'left: {{SIZE}}%',
2531 ),
2532 )
2533 );
2534
2535 $this->add_responsive_control(
2536 'line_v_position',
2537 array(
2538 'label' => __( 'Line Vertical Position (%)', 'premium-addons-for-elementor' ),
2539 'type' => Controls_Manager::SLIDER,
2540 'selectors' => array(
2541 '{{WRAPPER}} .premium-btn-line-wrap, {{WRAPPER}} .premium-button-line2::before, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line7::before' => 'top: {{SIZE}}%',
2542 '{{WRAPPER}} .premium-button-line5::after' => 'top: calc( ( {{SIZE}}% + 2px ) + {{line_height.SIZE}}px )',
2543 ),
2544 )
2545 );
2546
2547 $this->end_controls_section();
2548 }
2549
2550 /**
2551 * Render title widget output on the frontend.
2552 *
2553 * Written in PHP and used to generate the final HTML.
2554 *
2555 * @since 1.0.0
2556 * @access protected
2557 */
2558 protected function render() {
2559
2560 $settings = $this->get_settings_for_display();
2561
2562 $this->add_render_attribute( 'premium_title_text', 'class', 'premium-title-text' );
2563
2564 $title_tag = Helper_Functions::validate_html_tag( $settings['premium_title_tag'] );
2565
2566 $selected_style = $settings['premium_title_style'];
2567
2568 $this->add_render_attribute( 'container', 'class', array( 'premium-title-container', $selected_style ) );
2569
2570 $this->add_render_attribute( 'title', 'class', array( 'premium-title-header', 'premium-title-' . $selected_style ) );
2571
2572 if ( 'none' !== $settings['heading_lq_effect'] ) {
2573 $this->add_render_attribute( 'title', 'class', 'premium-con-lq__' . $settings['heading_lq_effect'] );
2574 }
2575
2576 if ( 'none' !== $settings['hover_effect'] ) {
2577 $this->add_render_attribute( 'title', 'class', 'premium-button-' . $settings['hover_effect'] );
2578 }
2579
2580 if ( 'style8' === $selected_style ) {
2581
2582 $this->add_render_attribute(
2583 'premium_title_text',
2584 array(
2585 'data-shiny-delay' => $settings['premium_title_delay'],
2586 'data-shiny-dur' => $settings['shining_animation_duration'],
2587 )
2588 );
2589
2590 } elseif ( 'style9' === $selected_style ) {
2591
2592 $this->add_render_attribute( 'title', 'data-blur-delay', $settings['premium_title_delay'] );
2593
2594 }
2595
2596 if ( 'yes' === $settings['noise'] ) {
2597
2598 $this->add_render_attribute( 'premium_title_text', 'data-text', str_replace( array( '{{', '}}' ), '', $settings['premium_title_text'] ) );
2599
2600 }
2601
2602 $icon_position = '';
2603
2604 if ( 'yes' === $settings['premium_title_icon_switcher'] ) {
2605
2606 $icon_type = $settings['icon_type'];
2607
2608 $icon_position = $settings['icon_position'];
2609
2610 if ( 'icon' === $icon_type || 'svg' === $icon_type ) {
2611
2612 $this->add_render_attribute( 'icon', 'class', 'premium-drawable-icon' );
2613
2614 if ( ( 'yes' === $settings['draw_svg'] && 'icon' === $icon_type ) || 'svg' === $icon_type ) {
2615 $this->add_render_attribute( 'icon', 'class', 'premium-title-icon' );
2616 }
2617
2618 if ( 'yes' === $settings['draw_svg'] ) {
2619
2620 $this->add_render_attribute(
2621 'container',
2622 'class',
2623 array(
2624 'elementor-invisible',
2625 'premium-drawer-hover',
2626 )
2627 );
2628
2629 $this->add_render_attribute(
2630 'icon',
2631 array(
2632 'class' => 'premium-svg-drawer',
2633 'data-svg-reverse' => $settings['lottie_reverse'],
2634 'data-svg-loop' => $settings['lottie_loop'],
2635 'data-svg-sync' => $settings['svg_sync'],
2636 'data-svg-hover' => $settings['svg_hover'],
2637 'data-svg-fill' => $settings['svg_color'],
2638 'data-svg-frames' => $settings['frames'],
2639 'data-svg-yoyo' => $settings['svg_yoyo'],
2640 'data-svg-point' => $settings['lottie_reverse'] ? $settings['end_point']['size'] : $settings['start_point']['size'],
2641 )
2642 );
2643
2644 } else {
2645 $this->add_render_attribute( 'icon', 'class', 'premium-svg-nodraw' );
2646 }
2647 } elseif ( 'animation' === $icon_type ) {
2648 $this->add_render_attribute(
2649 'title_lottie',
2650 array(
2651 'class' => array(
2652 'premium-title-icon',
2653 'premium-lottie-animation',
2654 ),
2655 'data-lottie-url' => $settings['lottie_url'],
2656 'data-lottie-loop' => $settings['lottie_loop'],
2657 'data-lottie-reverse' => $settings['lottie_reverse'],
2658 )
2659 );
2660 } else {
2661
2662 $src = $settings['image_upload']['url'];
2663
2664 $alt = Control_Media::get_image_alt( $settings['image_upload'] );
2665
2666 $this->add_render_attribute(
2667 'title_img',
2668 array(
2669 'class' => 'premium-title-icon',
2670 'src' => $src,
2671 'alt' => $alt,
2672 )
2673 );
2674 }
2675 }
2676
2677 $link = '';
2678 if ( 'link' === $settings['link_selection'] ) {
2679
2680 $link = ! empty( $settings['existing_link'] ) ? get_permalink( $settings['existing_link'] ) : '';
2681 $this->add_render_attribute( 'link', 'href', $link );
2682
2683 } else {
2684 $link = $settings['custom_link']['url'];
2685 $this->add_link_attributes( 'link', $settings['custom_link'] );
2686
2687 }
2688
2689 if ( ! empty( $settings['background_text'] ) ) {
2690 $this->add_render_attribute(
2691 'container',
2692 array(
2693 'class' => 'premium-title-bg-text',
2694 'data-background' => $settings['background_text'],
2695 )
2696 );
2697 }
2698
2699 $show_desc = 'yes' === $settings['premium_title_desc_switcher'] && ! empty( $settings['premium_title_desc_text'] );
2700
2701 if ( $show_desc ) {
2702 $this->add_render_attribute( 'title_description', 'class', 'premium-title-description' );
2703 }
2704
2705 ?>
2706
2707 <div class="premium-title-wrapper">
2708 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'container' ) ); ?>>
2709 <<?php echo wp_kses_post( $title_tag . ' ' . $this->get_render_attribute_string( 'title' ) ); ?>>
2710 <?php if ( 'style7' === $selected_style ) : ?>
2711 <?php if ( 'column' !== $icon_position ) : ?>
2712 <span class="premium-title-style7-stripe-wrap">
2713 <span class="premium-title-style7-stripe"></span>
2714 </span>
2715 <?php endif; ?>
2716 <div class="premium-title-style7-inner">
2717 <?php endif; ?>
2718
2719 <?php if ( 'yes' === $settings['premium_title_icon_switcher'] ) : ?>
2720 <?php if ( 'icon' === $icon_type ) : ?>
2721 <?php
2722 if ( 'yes' !== $settings['draw_svg'] ) :
2723 Icons_Manager::render_icon(
2724 $settings['premium_title_icon_updated'],
2725 array(
2726 'class' => array( 'premium-title-icon', 'premium-svg-nodraw', 'premium-drawable-icon' ),
2727 'aria-hidden' => 'true',
2728 )
2729 );
2730 else :
2731
2732 echo Helper_Functions::get_svg_by_icon(
2733 $settings['premium_title_icon_updated'],
2734 $this->get_render_attribute_string( 'icon' )
2735 );
2736
2737 endif;
2738 ?>
2739
2740 <?php elseif ( 'svg' === $icon_type ) : ?>
2741 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>>
2742 <?php echo Helper_Functions::sanitize_svg( $this->get_settings_for_display( 'custom_svg' ) ); ?>
2743 </div>
2744 <?php elseif ( 'animation' === $icon_type ) : ?>
2745 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_lottie' ) ); ?>></div>
2746 <?php else : ?>
2747 <?php if ( 'yes' === $settings['mask_switcher'] ) : ?>
2748 <span class="premium-title-img">
2749 <?php endif; ?>
2750 <img <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_img' ) ); ?>>
2751 <?php if ( 'yes' === $settings['mask_switcher'] ) : ?>
2752 </span>
2753 <?php endif; ?>
2754 <?php endif; ?>
2755 <?php endif; ?>
2756
2757 <?php if ( 'style7' === $selected_style ) : ?>
2758 <?php if ( 'column' === $icon_position ) : ?>
2759 <span class="premium-title-style7-stripe-wrap">
2760 <span class="premium-title-style7-stripe"></span>
2761 </span>
2762 <?php endif; ?>
2763 <?php endif; ?>
2764 <?php
2765 if ( 'style9' !== $selected_style ) :
2766 $text = str_replace( array( '{{', '}}' ), array( '<span class="premium-title__focused-word">', '</span>' ), $settings['premium_title_text'] );
2767 ?>
2768 <span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_title_text' ) ); ?>>
2769 <?php echo wp_kses_post( $text ); ?>
2770 </span>
2771 <?php
2772 else :
2773 $letters_html = '<span class="premium-letters-container"' . $this->get_render_attribute_string( 'premium_title_text' ) . '>';
2774 $title_array = preg_split( '//u', $settings['premium_title_text'], -1, PREG_SPLIT_NO_EMPTY );
2775 foreach ( $title_array as $key => $letter ) :
2776 $letters_html .= '<span class="premium-title-style9-letter" data-letter-index="' . esc_attr( $key + 1 ) . '" data-letter="' . esc_attr( $letter ) . '">' . $letter . '</span>';
2777 endforeach;
2778 $the_title = $letters_html . '</span>';
2779 echo wp_kses_post( $the_title );
2780 ?>
2781 <?php endif; ?>
2782
2783 <?php if ( 'style7' === $selected_style ) : ?>
2784 </div>
2785 <?php endif; ?>
2786 <?php if ( ! empty( $link ) ) : ?>
2787 <a <?php echo wp_kses_post( $this->get_render_attribute_string( 'link' ) ); ?>></a>
2788 <?php endif; ?>
2789
2790 <?php if ( 'none' !== $settings['hover_effect'] ) : ?>
2791 <?php echo Helper_Functions::get_btn_svgs( $settings['hover_effect'] ); ?>
2792 <?php endif; ?>
2793 </<?php echo wp_kses_post( $title_tag ); ?>>
2794
2795 </div>
2796
2797 <?php if ( $show_desc ) : ?>
2798 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_description' ) ); ?>>
2799 <?php echo wp_kses_post( $settings['premium_title_desc_text'] ); ?>
2800 </div>
2801 <?php endif; ?>
2802 </div>
2803
2804 <?php
2805 }
2806 }
2807