PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 5.8.7
Essential Addons for Elementor – Popular Elementor Templates & Widgets v5.8.7
6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / includes / Elements / Creative_Button.php
essential-addons-for-elementor-lite / includes / Elements Last commit date
Adv_Accordion.php 2 years ago Adv_Tabs.php 2 years ago Advanced_Data_Table.php 2 years ago Better_Payment.php 4 years ago Betterdocs_Category_Box.php 2 years ago Betterdocs_Category_Grid.php 2 years ago Betterdocs_Search_Form.php 2 years ago Business_Reviews.php 2 years ago Caldera_Forms.php 2 years ago Career_Page.php 4 years ago Contact_Form_7.php 2 years ago Content_Ticker.php 2 years ago Countdown.php 2 years ago Creative_Button.php 2 years ago Crowdfundly_All_Campaign.php 4 years ago Crowdfundly_Organization.php 4 years ago Crowdfundly_Single_Campaign.php 4 years ago Cta_Box.php 2 years ago Data_Table.php 2 years ago Dual_Color_Header.php 2 years ago EmbedPress.php 4 years ago Event_Calendar.php 2 years ago Facebook_Feed.php 2 years ago Fancy_Text.php 2 years ago Feature_List.php 2 years ago Filterable_Gallery.php 2 years ago Flip_Box.php 2 years ago FluentForm.php 2 years ago Formstack.php 2 years ago GravityForms.php 2 years ago Image_Accordion.php 2 years ago Info_Box.php 2 years ago Interactive_Circle.php 2 years ago Login_Register.php 2 years ago NFT_Gallery.php 2 years ago NinjaForms.php 2 years ago Post_Grid.php 2 years ago Post_Timeline.php 2 years ago Pricing_Table.php 2 years ago Product_Grid.php 2 years ago Progress_Bar.php 2 years ago SVG_Draw.php 3 years ago Simple_Menu.php 2 years ago Sticky_Video.php 2 years ago Team_Member.php 2 years ago Testimonial.php 2 years ago Tooltip.php 2 years ago Twitter_Feed.php 2 years ago TypeForm.php 2 years ago WeForms.php 2 years ago Woo_Cart.php 2 years ago Woo_Checkout.php 2 years ago Woo_Product_Carousel.php 2 years ago Woo_Product_Compare.php 4 years ago Woo_Product_Gallery.php 2 years ago Woocommerce_Review.php 4 years ago WpForms.php 2 years ago index.php 3 years ago
Creative_Button.php
632 lines
1 <?php
2
3 namespace Essential_Addons_Elementor\Elements;
4
5 // If this file is called directly, abort.
6 if (!defined('ABSPATH')) {
7 exit;
8 }
9
10 use \Elementor\Controls_Manager;
11 use \Elementor\Group_Control_Background;
12 use \Elementor\Group_Control_Border;
13 use \Elementor\Group_Control_Box_Shadow;
14 use \Elementor\Group_Control_Typography;
15 use Elementor\Icons_Manager;
16 use Elementor\Modules\DynamicTags\Module as TagsModule;
17 use \Elementor\Core\Kits\Documents\Tabs\Global_Typography;
18 use \Elementor\Widget_Base;
19 use Essential_Addons_Elementor\Classes\Helper;
20
21
22 class Creative_Button extends Widget_Base
23 {
24
25 public function get_name()
26 {
27 return 'eael-creative-button';
28 }
29
30 public function get_title()
31 {
32 return esc_html__('Creative Button', 'essential-addons-for-elementor-lite');
33 }
34
35 public function get_icon()
36 {
37 return 'eaicon-creative-button';
38 }
39
40 public function get_categories()
41 {
42 return ['essential-addons-elementor'];
43 }
44
45 public function get_keywords()
46 {
47 return [
48 'button',
49 'ea button',
50 'creative button',
51 'ea creative button',
52 'cta',
53 'call to action',
54 'ea',
55 'marketing button',
56 'essential addons',
57 ];
58 }
59
60 public function get_custom_help_url()
61 {
62 return 'https://essential-addons.com/elementor/docs/creative-buttons/';
63 }
64
65 protected function register_controls()
66 {
67
68 if ( !apply_filters( 'eael/pro_enabled', false ) ) {
69 // Content Controls
70 $this->start_controls_section(
71 'eael_section_creative_button_content',
72 [
73 'label' => esc_html__('Button Content', 'essential-addons-for-elementor-lite'),
74 ]
75 );
76
77 $this->add_control(
78 'creative_button_text',
79 [
80 'label' => __('Button Text', 'essential-addons-for-elementor-lite'),
81 'type' => Controls_Manager::TEXT,
82 'dynamic' => [
83 'active' => true,
84 ],
85 'label_block' => true,
86 'default' => 'Click Me!',
87 'placeholder' => __('Enter button text', 'essential-addons-for-elementor-lite'),
88 'title' => __('Enter button text here', 'essential-addons-for-elementor-lite'),
89 'ai' => [
90 'active' => false,
91 ],
92 ]
93 );
94
95 $this->add_control(
96 'creative_button_secondary_text',
97 [
98 'label' => __('Button Secondary Text', 'essential-addons-for-elementor-lite'),
99 'type' => Controls_Manager::TEXT,
100 'dynamic' => [
101 'active' => true,
102 ],
103 'label_block' => true,
104 'default' => 'Go!',
105 'placeholder' => __('Enter button secondary text', 'essential-addons-for-elementor-lite'),
106 'title' => __('Enter button secondary text here', 'essential-addons-for-elementor-lite'),
107 'ai' => [
108 'active' => false,
109 ],
110 ]
111 );
112
113 $this->add_control(
114 'creative_button_link_url',
115 [
116 'label' => esc_html__('Link URL', 'essential-addons-for-elementor-lite'),
117 'type' => Controls_Manager::URL,
118 'dynamic' => [
119 'active' => true,
120 'categories' => [
121 TagsModule::POST_META_CATEGORY,
122 TagsModule::URL_CATEGORY,
123 ],
124 ],
125 'label_block' => true,
126 'default' => [
127 'url' => '#',
128 'is_external' => '',
129 ],
130 'show_external' => true,
131 ]
132 );
133
134 $this->add_control(
135 'eael_creative_button_icon_new',
136 [
137 'label' => esc_html__('Icon', 'essential-addons-for-elementor-lite'),
138 'type' => Controls_Manager::ICONS,
139 'fa4compatibility' => 'eael_creative_button_icon',
140 'condition' => [
141 'creative_button_effect!' => ['eael-creative-button--tamaya'],
142 ],
143 ]
144 );
145
146 $this->add_control(
147 'eael_creative_button_icon_alignment',
148 [
149 'label' => esc_html__('Icon Position', 'essential-addons-for-elementor-lite'),
150 'type' => Controls_Manager::SELECT,
151 'default' => 'left',
152 'options' => [
153 'left' => esc_html__('Before', 'essential-addons-for-elementor-lite'),
154 'right' => esc_html__('After', 'essential-addons-for-elementor-lite'),
155 ],
156 'condition' => [
157 'eael_creative_button_icon_new!' => '',
158 'creative_button_effect!' => ['eael-creative-button--tamaya'],
159 ],
160 ]
161 );
162
163 $this->add_responsive_control(
164 'eael_creative_button_icon_indent',
165 [
166 'label' => esc_html__('Icon Spacing', 'essential-addons-for-elementor-lite'),
167 'type' => Controls_Manager::SLIDER,
168 'range' => [
169 'px' => [
170 'max' => 60,
171 ],
172 ],
173 'condition' => [
174 'eael_creative_button_icon_new!' => '',
175 'creative_button_effect!' => ['eael-creative-button--tamaya'],
176 ],
177 'selectors' => [
178 '{{WRAPPER}} .eael-creative-button-icon-right' => 'margin-left: {{SIZE}}px;',
179 '{{WRAPPER}} .eael-creative-button-icon-left' => 'margin-right: {{SIZE}}px;',
180 '{{WRAPPER}} .eael-creative-button--shikoba i' => 'left: {{SIZE}}%;',
181 ],
182 ]
183 );
184
185 $this->end_controls_section();
186 } else {
187 do_action('eael_creative_button_pro_controls', $this);
188 }
189
190 if ( !apply_filters( 'eael/pro_enabled', false ) ) {
191 $this->start_controls_section(
192 'eael_section_pro',
193 [
194 'label' => __('Go Premium for More Features', 'essential-addons-for-elementor-lite'),
195 ]
196 );
197
198 $this->add_control(
199 'eael_control_get_pro',
200 [
201 'label' => __('Unlock more possibilities', 'essential-addons-for-elementor-lite'),
202 'type' => Controls_Manager::CHOOSE,
203 'options' => [
204 '1' => [
205 'title' => '',
206 'icon' => 'fa fa-unlock-alt',
207 ],
208 ],
209 'default' => '1',
210 'description' => '<span class="pro-feature"> Get the <a href="https://wpdeveloper.com/upgrade/ea-pro" target="_blank">Pro version</a> for more stunning elements and customization options.</span>',
211 ]
212 );
213
214 $this->end_controls_section();
215 }
216
217 // Style Controls
218 $this->start_controls_section(
219 'eael_section_creative_button_settings',
220 [
221 'label' => esc_html__('Button Effects &amp; Styles', 'essential-addons-for-elementor-lite'),
222 'tab' => Controls_Manager::TAB_STYLE,
223 ]
224 );
225 if (!apply_filters('eael/pro_enabled', false)) {
226 $this->add_control(
227 'creative_button_effect',
228 [
229 'label' => esc_html__('Set Button Effect', 'essential-addons-for-elementor-lite'),
230 'type' => Controls_Manager::SELECT,
231 'default' => 'eael-creative-button--default',
232 'options' => [
233 'eael-creative-button--default' => esc_html__('Default', 'essential-addons-for-elementor-lite'),
234 'eael-creative-button--winona' => esc_html__('Winona', 'essential-addons-for-elementor-lite'),
235 'eael-creative-button--ujarak' => esc_html__('Ujarak', 'essential-addons-for-elementor-lite'),
236 'eael-creative-button--wayra' => esc_html__('Wayra', 'essential-addons-for-elementor-lite'),
237 'eael-creative-button--tamaya' => esc_html__('Tamaya', 'essential-addons-for-elementor-lite'),
238 'eael-creative-button--rayen' => esc_html__('Rayen', 'essential-addons-for-elementor-lite'),
239 'eael-creative-button--pipaluk' => esc_html__('Pipaluk (Pro)', 'essential-addons-for-elementor-lite'),
240 'eael-creative-button--moema' => esc_html__('Moema (Pro)', 'essential-addons-for-elementor-lite'),
241 'eael-creative-button--wave' => esc_html__('Wave (Pro)', 'essential-addons-for-elementor-lite'),
242 'eael-creative-button--aylen' => esc_html__('Aylen (Pro)', 'essential-addons-for-elementor-lite'),
243 'eael-creative-button--saqui' => esc_html__('Saqui (Pro)', 'essential-addons-for-elementor-lite'),
244 'eael-creative-button--wapasha' => esc_html__('Wapasha (Pro)', 'essential-addons-for-elementor-lite'),
245 'eael-creative-button--nuka' => esc_html__('Nuka (Pro)', 'essential-addons-for-elementor-lite'),
246 'eael-creative-button--antiman' => esc_html__('Antiman (Pro)', 'essential-addons-for-elementor-lite'),
247 'eael-creative-button--quidel' => esc_html__('Quidel (Pro)', 'essential-addons-for-elementor-lite'),
248 'eael-creative-button--shikoba' => esc_html__('Shikoba (Pro)', 'essential-addons-for-elementor-lite'),
249 ],
250 'description' => '10 more effects on <a href="https://wpdeveloper.com/in/upgrade-essential-addons-elementor">Pro version</a>',
251 ]
252 );
253 $this->add_control(
254 'use_gradient_background',
255 [
256 'label' => __('Use Gradient Background', 'essential-addons-for-elementor-lite'),
257 'type' => Controls_Manager::SWITCHER,
258 'label_on' => __('Show', 'essential-addons-for-elementor-lite'),
259 'label_off' => __('Hide', 'essential-addons-for-elementor-lite'),
260 'return_value' => 'yes',
261 'default' => '',
262 ]
263 );
264 $this->start_controls_tabs('eael_creative_button_tabs');
265
266 $this->start_controls_tab('normal', ['label' => esc_html__('Normal', 'essential-addons-for-elementor-lite')]);
267
268 $this->add_control('eael_creative_button_icon_color',
269 [
270 'label' => esc_html__('Icon Color', 'essential-addons-for-elementor-lite'),
271 'type' => Controls_Manager::COLOR,
272 'default' => '#ffffff',
273 'selectors' => [
274 '{{WRAPPER}} .eael-creative-button i' => 'color: {{VALUE}};',
275 '{{WRAPPER}} .eael-creative-button .creative-button-inner svg' => 'fill: {{VALUE}};',
276 ],
277 ]
278 );
279
280 $this->add_control(
281 'eael_creative_button_text_color',
282 [
283 'label' => esc_html__('Text Color', 'essential-addons-for-elementor-lite'),
284 'type' => Controls_Manager::COLOR,
285 'default' => '#ffffff',
286 'selectors' => [
287 '{{WRAPPER}} .eael-creative-button' => 'color: {{VALUE}};',
288 '{{WRAPPER}} .eael-creative-button svg' => 'fill: {{VALUE}};',
289 '{{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya::before' => 'color: {{VALUE}};',
290 '{{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya::after' => 'color: {{VALUE}};',
291 ],
292 ]
293 );
294 $this->add_control(
295 'eael_creative_button_background_color',
296 [
297 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'),
298 'type' => Controls_Manager::COLOR,
299 'default' => '#f54',
300 'selectors' => [
301 '{{WRAPPER}} .eael-creative-button' => 'background-color: {{VALUE}};',
302 '{{WRAPPER}} .eael-creative-button.eael-creative-button--ujarak:hover' => 'background-color: {{VALUE}};',
303 '{{WRAPPER}} .eael-creative-button.eael-creative-button--wayra:hover' => 'background-color: {{VALUE}};',
304 '{{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya::before' => 'background-color: {{VALUE}};',
305 '{{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya::after' => 'background-color: {{VALUE}};',
306 ],
307 'condition' => [
308 'use_gradient_background' => '',
309 ],
310 ]
311 );
312
313 $this->add_group_control(
314 Group_Control_Background::get_type(),
315 [
316 'name' => 'eael_creative_button_gradient_background',
317 'types' => ['gradient', 'classic'],
318 'selector' => '
319 {{WRAPPER}} .eael-creative-button,
320 {{WRAPPER}} .eael-creative-button.eael-creative-button--ujarak:hover,
321 {{WRAPPER}} .eael-creative-button.eael-creative-button--wayra:hover,
322 {{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya::before,
323 {{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya::after
324 ',
325 'condition' => [
326 'use_gradient_background' => 'yes',
327 ],
328 ]
329 );
330
331 $this->add_group_control(
332 Group_Control_Border::get_type(),
333 [
334 'name' => 'eael_creative_button_border',
335 'selector' => '{{WRAPPER}} .eael-creative-button',
336 ]
337 );
338
339 $this->add_control(
340 'eael_creative_button_border_radius',
341 [
342 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'),
343 'type' => Controls_Manager::SLIDER,
344 'range' => [
345 'px' => [
346 'max' => 100,
347 ],
348 ],
349 'selectors' => [
350 '{{WRAPPER}} .eael-creative-button' => 'border-radius: {{SIZE}}px;',
351 '{{WRAPPER}} .eael-creative-button::before' => 'border-radius: {{SIZE}}px;',
352 '{{WRAPPER}} .eael-creative-button::after' => 'border-radius: {{SIZE}}px;',
353 ],
354 ]
355 );
356
357 $this->end_controls_tab();
358
359 $this->start_controls_tab('eael_creative_button_hover', ['label' => esc_html__('Hover', 'essential-addons-for-elementor-lite')]);
360
361 $this->add_control('eael_creative_button_hover_icon_color',
362 [
363 'label' => esc_html__('Icon Color', 'essential-addons-for-elementor-lite'),
364 'type' => Controls_Manager::COLOR,
365 'default' => '#ffffff',
366 'selectors' => [
367 '{{WRAPPER}} .eael-creative-button:hover i' => 'color: {{VALUE}};',
368 '{{WRAPPER}} .eael-creative-button:hover .creative-button-inner svg' => 'fill: {{VALUE}};',
369 ],
370 ]
371 );
372
373 $this->add_control(
374 'eael_creative_button_hover_text_color',
375 [
376 'label' => esc_html__('Text Color', 'essential-addons-for-elementor-lite'),
377 'type' => Controls_Manager::COLOR,
378 'default' => '#ffffff',
379 'selectors' => [
380 '{{WRAPPER}} .eael-creative-button:hover .cretive-button-text' => 'color: {{VALUE}};',
381 '{{WRAPPER}} .eael-creative-button.eael-creative-button--winona::after' => 'color: {{VALUE}};',
382 '{{WRAPPER}} .eael-creative-button.eael-creative-button--rayen:hover::before' => 'color: {{VALUE}};',
383 ],
384 ]
385 );
386
387 $this->add_control(
388 'eael_creative_button_hover_background_color',
389 [
390 'label' => esc_html__('Background Color', 'essential-addons-for-elementor-lite'),
391 'type' => Controls_Manager::COLOR,
392 'default' => '#f54',
393 'selectors' => [
394 '{{WRAPPER}} .eael-creative-button:hover' => 'background-color: {{VALUE}};',
395 '{{WRAPPER}} .eael-creative-button.eael-creative-button--ujarak::before' => 'background-color: {{VALUE}};',
396 '{{WRAPPER}} .eael-creative-button.eael-creative-button--wayra:hover::before' => 'background-color: {{VALUE}};',
397 '{{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya:hover' => 'background-color: {{VALUE}};',
398 '{{WRAPPER}} .eael-creative-button.eael-creative-button--rayen::before' => 'background-color: {{VALUE}};',
399 '{{WRAPPER}} .eael-creative-button.eael-creative-button--rayen:hover::before' => 'background-color: {{VALUE}};',
400 ],
401 'condition' => [
402 'use_gradient_background' => '',
403 ],
404 ]
405 );
406
407 $this->add_group_control(
408 Group_Control_Background::get_type(),
409 [
410 'name' => 'eael_creative_button_hover_gradient_background',
411 'types' => ['gradient', 'classic'],
412 'selector' => '
413 {{WRAPPER}} .eael-creative-button:hover,
414 {{WRAPPER}} .eael-creative-button.eael-creative-button--ujarak::before,
415 {{WRAPPER}} .eael-creative-button.eael-creative-button--wayra:hover::before,
416 {{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya:hover,
417 {{WRAPPER}} .eael-creative-button.eael-creative-button--rayen::before,
418 {{WRAPPER}} .eael-creative-button.eael-creative-button--rayen:hover::before
419 ',
420 'condition' => [
421 'use_gradient_background' => 'yes',
422 ],
423 ]
424 );
425
426 $this->add_control(
427 'eael_creative_button_hover_border_color',
428 [
429 'label' => esc_html__('Border Color', 'essential-addons-for-elementor-lite'),
430 'type' => Controls_Manager::COLOR,
431 'default' => '',
432 'selectors' => [
433 '{{WRAPPER}} .eael-creative-button:hover' => 'border-color: {{VALUE}};',
434 '{{WRAPPER}} .eael-creative-button.eael-creative-button--wapasha::before' => 'border-color: {{VALUE}};',
435 '{{WRAPPER}} .eael-creative-button.eael-creative-button--antiman::before' => 'border-color: {{VALUE}};',
436 '{{WRAPPER}} .eael-creative-button.eael-creative-button--pipaluk::before' => 'border-color: {{VALUE}};',
437 '{{WRAPPER}} .eael-creative-button.eael-creative-button--quidel::before' => 'background-color: {{VALUE}};',
438 ],
439 ]
440 );
441
442 $this->end_controls_tab();
443
444 $this->end_controls_tabs();
445
446 $this->add_responsive_control(
447 'eael_creative_button_alignment',
448 [
449 'label' => esc_html__('Button Alignment', 'essential-addons-for-elementor-lite'),
450 'type' => Controls_Manager::CHOOSE,
451 'label_block' => true,
452 'options' => [
453 'flex-start' => [
454 'title' => esc_html__('Left', 'essential-addons-for-elementor-lite'),
455 'icon' => 'eicon-text-align-left',
456 ],
457 'center' => [
458 'title' => esc_html__('Center', 'essential-addons-for-elementor-lite'),
459 'icon' => 'eicon-text-align-center',
460 ],
461 'flex-end' => [
462 'title' => esc_html__('Right', 'essential-addons-for-elementor-lite'),
463 'icon' => 'eicon-text-align-right',
464 ],
465 ],
466 'default' => '',
467 'selectors' => [
468 '{{WRAPPER}} .eael-creative-button-wrapper' => 'justify-content: {{VALUE}};',
469 ],
470 ]
471 );
472
473 $this->add_responsive_control(
474 'eael_creative_button_width',
475 [
476 'label' => esc_html__('Width', 'essential-addons-for-elementor-lite'),
477 'type' => Controls_Manager::SLIDER,
478 'size_units' => ['px', '%'],
479 'range' => [
480 'px' => [
481 'min' => 0,
482 'max' => 500,
483 'step' => 1,
484 ],
485 '%' => [
486 'min' => 0,
487 'max' => 100,
488 ],
489 ],
490 'selectors' => [
491 '{{WRAPPER}} .eael-creative-button' => 'width: {{SIZE}}{{UNIT}};',
492 ],
493 ]
494 );
495
496 $this->add_group_control(
497 Group_Control_Typography::get_type(),
498 [
499 'name' => 'eael_creative_button_typography',
500 'global' => [
501 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
502 ],
503 'selector' => '{{WRAPPER}} .eael-creative-button .cretive-button-text, {{WRAPPER}} .eael-creative-button--winona::after, {{WRAPPER}} .eael-creative-button--rayen::before, {{WRAPPER}} .eael-creative-button--tamaya::after, {{WRAPPER}} .eael-creative-button--tamaya::before',
504 ]
505 );
506
507 $this->add_responsive_control(
508 'eael_creative_button_icon_size',
509 [
510 'label' => esc_html__('Icon Size', 'essential-addons-for-elementor-lite'),
511 'type' => Controls_Manager::SLIDER,
512 'size_units' => ['px', '%'],
513 'default' => [
514 'size' => 30,
515 'unit' => 'px',
516 ],
517 'range' => [
518 'px' => [
519 'min' => 0,
520 'max' => 500,
521 'step' => 1,
522 ],
523 '%' => [
524 'min' => 0,
525 'max' => 100,
526 ],
527 ],
528 'selectors' => [
529 '{{WRAPPER}} .eael-creative-button i' => 'font-size: {{SIZE}}{{UNIT}};',
530 '{{WRAPPER}} .eael-creative-button svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
531 ],
532 ]
533 );
534
535 $this->add_responsive_control(
536 'eael_creative_button_padding',
537 [
538 'label' => esc_html__('Button Padding', 'essential-addons-for-elementor-lite'),
539 'type' => Controls_Manager::DIMENSIONS,
540 'size_units' => ['px', 'em', '%'],
541 'selectors' => [
542 '{{WRAPPER}} .eael-creative-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
543 '{{WRAPPER}} .eael-creative-button.eael-creative-button--winona::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
544 '{{WRAPPER}} .eael-creative-button.eael-creative-button--winona > .creative-button-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
545 '{{WRAPPER}} .eael-creative-button.eael-creative-button--tamaya::before' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
546 '{{WRAPPER}} .eael-creative-button.eael-creative-button--rayen::before' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
547 '{{WRAPPER}} .eael-creative-button.eael-creative-button--rayen > .creative-button-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
548 '{{WRAPPER}} .eael-creative-button.eael-creative-button--saqui::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
549 ],
550 ]
551 );
552 } else {
553 do_action('eael_creative_button_style_pro_controls', $this);
554 }
555
556 $this->add_group_control(
557 Group_Control_Box_Shadow::get_type(),
558 [
559 'name' => 'button_box_shadow',
560 'selector' => '{{WRAPPER}} .eael-creative-button',
561 ]
562 );
563
564 $this->end_controls_section();
565 }
566
567 protected function render()
568 {
569 $settings = $this->get_settings_for_display();
570 $icon_migrated = isset($settings['__fa4_migrated']['eael_creative_button_icon_new']);
571 $icon_is_new = empty($settings['eael_creative_button_icon']);
572
573 $this->add_render_attribute('eael_creative_button', [
574 'class' => ['eael-creative-button', esc_attr($settings['creative_button_effect'])],
575 ]);
576
577 if ( ! empty( $settings['creative_button_link_url']['url'] ) ) {
578 $this->add_link_attributes( 'eael_creative_button', $settings['creative_button_link_url'] );
579 }
580
581 if ($settings['creative_button_link_url']['is_external']) {
582 $this->add_render_attribute('eael_creative_button', 'target', '_blank');
583 }
584
585 if ($settings['creative_button_link_url']['nofollow']) {
586 $this->add_render_attribute('eael_creative_button', 'rel', 'nofollow');
587 }
588
589 $this->add_render_attribute('eael_creative_button', 'data-text', esc_attr($settings['creative_button_secondary_text']));
590 ?>
591 <div class="eael-creative-button-wrapper">
592
593 <a <?php echo $this->get_render_attribute_string('eael_creative_button'); ?>>
594
595 <?php if ($settings['creative_button_effect'] === 'eael-creative-button--tamaya' ) : ?>
596 <div class="eael-creative-button--tamaya-secondary eael-creative-button--tamaya-before"><span><?php echo Helper::eael_wp_kses($settings['creative_button_secondary_text']); ?></span></div>
597 <?php endif; ?>
598
599 <div class="creative-button-inner">
600
601 <?php if ($settings['creative_button_effect'] !== 'eael-creative-button--tamaya' && $settings['eael_creative_button_icon_alignment'] == 'left') : ?>
602 <?php if ($icon_migrated || $icon_is_new) {
603 echo '<span class="eael-creative-button-icon-left">';
604 Icons_Manager::render_icon( $settings['eael_creative_button_icon_new'], [ 'aria-hidden' => 'true' ] );
605 echo '</span>';
606 } else { ?>
607 <i class="<?php echo esc_attr($settings['eael_creative_button_icon']); ?> eael-creative-button-icon-left" aria-hidden="true"></i>
608 <?php } ?>
609 <?php endif; ?>
610
611 <span class="cretive-button-text"><?php echo Helper::eael_wp_kses($settings['creative_button_text']); ?></span>
612
613 <?php if ($settings['creative_button_effect'] !== 'eael-creative-button--tamaya' && $settings['eael_creative_button_icon_alignment'] == 'right') : ?>
614 <?php if ($icon_migrated || $icon_is_new) {
615 echo '<span class="eael-creative-button-icon-right">';
616 Icons_Manager::render_icon( $settings['eael_creative_button_icon_new'], [ 'aria-hidden' => 'true' ] );
617 echo '</span>';
618 } else { ?>
619 <i class="<?php echo esc_attr($settings['eael_creative_button_icon']); ?> eael-creative-button-icon-right" aria-hidden="true"></i>
620 <?php } ?>
621 <?php endif; ?>
622 </div>
623 <?php if ($settings['creative_button_effect'] === 'eael-creative-button--tamaya' ) : ?>
624 <div class="eael-creative-button--tamaya-secondary eael-creative-button--tamaya-after"><span><?php echo Helper::eael_wp_kses($settings['creative_button_secondary_text']); ?></span></div>
625 <?php endif; ?>
626 </a>
627 </div>
628 <?php
629
630 }
631 }
632