PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.11.84
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.11.84
4.11.84 4.11.83 4.11.82 4.11.80 4.11.81 4.11.79 4.11.78 4.11.77 4.11.76 4.11.75 3.20.5 4.11.69 3.20.6 4.11.7 3.20.7 4.11.70 3.20.8 4.11.71 3.20.9 4.11.72 3.21.1 4.11.73 3.21.2 4.11.74 3.21.3 4.11.8 3.21.4 4.11.9 3.21.5 4.2.0 3.21.6 4.2.1 3.3.0 4.2.2 3.3.1 4.2.3 3.3.2 4.2.4 3.3.3 4.2.5 3.3.4 4.2.6 3.3.5 4.2.7 3.3.6 4.2.8 3.3.7 4.2.9 3.3.8 4.3.0 3.3.9 4.3.1 3.4.0 4.3.2 3.4.1 4.3.3 3.4.2 4.3.4 3.4.3 4.3.5 3.4.4 4.3.6 3.4.5 4.3.7 3.4.6 4.3.8 3.4.7 4.3.9 3.4.8 4.4.0 3.4.9 4.4.1 3.5.0 4.4.2 3.5.1 4.4.3 3.5.2 4.4.4 3.5.3 4.4.5 3.5.4 4.4.6 3.5.5 4.4.7 3.5.6 4.4.8 3.5.7 4.4.9 3.5.8 4.5.0 3.5.9 4.5.1 3.6.0 4.5.2 3.6.1 4.5.3 3.6.2 4.5.4 3.6.3 4.5.5 3.6.4 4.5.6 3.6.5 4.5.7 3.6.6 4.5.8 3.6.7 4.5.9 3.6.8 4.6.0 3.6.9 4.6.1 3.7.0 4.7.0 3.7.1 4.7.1 3.7.2 4.7.2 3.7.3 4.7.3 3.7.4 4.7.4 3.7.5 4.7.5 3.7.6 4.7.6 3.7.7 4.7.7 3.7.8 4.7.8 3.7.9 4.7.9 3.8.0 4.8.0 3.8.1 4.8.1 3.8.2 4.8.10 3.8.3 4.8.11 3.8.4 4.8.2 3.8.5 4.8.3 3.8.6 4.8.4 3.8.7 4.8.5 3.8.8 4.8.6 3.8.9 4.8.7 3.9.0 4.8.8 3.9.1 4.8.9 3.9.2 4.9.0 3.9.3 4.9.0-beta1 3.9.4 4.9.0-beta2 3.9.5 4.9.1 3.9.6 4.9.10 3.9.7 4.9.11 3.9.8 4.9.12 3.9.9 4.9.13 4.0.1 4.9.14 4.0.3 4.9.15 4.0.4 4.9.16 4.0.5 4.9.17 4.0.6 4.9.18 4.0.7 4.9.19 4.0.8 4.9.2 4.0.9 4.9.20 4.1.0 4.9.21 4.1.1 4.9.22 4.1.2 4.9.23 4.1.3 4.9.24 trunk 4.1.4 4.9.25 1.0 4.1.5 4.9.26 1.01 4.1.6 4.9.27 1.02 4.1.7 4.9.28 1.03 4.1.8 4.9.29 1.04 4.1.9 4.9.3 1.05 4.10.0 4.9.30 1.06 4.10.1 4.9.31 1.07 4.10.10 4.9.32 1.08 4.10.11 4.9.33 1.09 4.10.12 4.9.34 2.0 4.10.13 4.9.35 2.0.1 4.10.14 4.9.36 2.0.2 4.10.15 4.9.37 2.0.3 4.10.16 4.9.38 2.0.4 4.10.17 4.9.39 2.0.5 4.10.18 4.9.4 2.0.6 4.10.19 4.9.40 2.0.7 4.10.2 4.9.41 2.0.8 4.10.20 4.9.42 2.0.9 4.10.21 4.9.43 2.1.0 4.10.22 4.9.45 2.1.1 4.10.23 4.9.46 2.1.2 4.10.24 4.9.47 2.1.3 4.10.25 4.9.48 2.1.4 4.10.26 4.9.49 2.1.5 4.10.27 4.9.5 2.1.5-beta1 4.10.28 4.9.50 2.1.6 4.10.29 4.9.51 2.1.7 4.10.3 4.9.52 2.1.8 4.10.30 4.9.53 2.1.9 4.10.31 4.9.54 2.2.0 4.10.32 4.9.55 2.2.1 4.10.33 4.9.56 2.2.2 4.10.34 4.9.57 2.2.3 4.10.35 4.9.6 2.2.4 4.10.36 4.9.7 2.2.5 4.10.37 4.9.8 2.2.6 4.10.38 4.9.9 2.2.7 4.10.39 2.2.8 4.10.4 2.2.9 4.10.40 2.3.0 4.10.41 2.3.1 4.10.42 2.3.2 4.10.43 2.3.3 4.10.44 2.3.4 4.10.45 2.3.5 4.10.46 2.3.6 4.10.47 2.3.7 4.10.48 2.3.8 4.10.49 2.3.9 4.10.5 2.4.0 4.10.50 2.4.1 4.10.51 2.5.0 4.10.52 2.5.1 4.10.53 2.5.2 4.10.54 2.5.3 4.10.55 2.5.4 4.10.56 2.5.5 4.10.57 2.5.6 4.10.58 2.5.7 4.10.59 2.5.8 4.10.6 2.5.9 4.10.60 2.6.0 4.10.61 2.6.1 4.10.62 2.6.2 4.10.63 2.6.3 4.10.64 2.6.4 4.10.65 2.6.5 4.10.66 2.6.6 4.10.67 2.6.7 4.10.68 2.6.8 4.10.69 2.6.9 4.10.7 2.7.0 4.10.70 2.7.1 4.10.71 2.7.2 4.10.72 2.7.3 4.10.73 2.7.4 4.10.74 2.7.5 4.10.75 2.7.6 4.10.76 2.7.7 4.10.77 2.7.8 4.10.78 2.7.9 4.10.79 2.8.0 4.10.8 2.8.1 4.10.80 2.8.2 4.10.81 2.8.3 4.10.82 2.8.4 4.10.83 2.8.5 4.10.84 2.8.6 4.10.85 2.8.7 4.10.86 2.8.8 4.10.87 2.8.9 4.10.88 2.9.0 4.10.89 2.9.1 4.10.9 2.9.2 4.10.90 2.9.3 4.11.0 2.9.4 4.11.1 2.9.5 4.11.10 2.9.6 4.11.11 2.9.7 4.11.12 2.9.8 4.11.13 2.9.9 4.11.14 3.0.0 4.11.15 3.0.1 4.11.16 3.0.2 4.11.17 3.0.3 4.11.18 3.0.4 4.11.19 3.0.5 4.11.2 3.0.6 4.11.20 3.0.7 4.11.21 3.0.8 4.11.22 3.0.9 4.11.23 3.1.0 4.11.24 3.1.1 4.11.25 3.1.2 4.11.26 3.1.3 4.11.27 3.1.4 4.11.28 3.1.5 4.11.29 3.1.6 4.11.3 3.1.7 4.11.30 3.1.8 4.11.31 3.1.9 4.11.32 3.10.0 4.11.33 3.10.1 4.11.34 3.10.2 4.11.35 3.10.3 4.11.36 3.10.4 4.11.37 3.10.5 4.11.38 3.10.6 4.11.39 3.10.7 4.11.4 3.10.8 4.11.40 3.10.9 4.11.41 3.11.0 4.11.42 3.11.1 4.11.43 3.11.2 4.11.44 3.11.3 4.11.45 3.11.4 4.11.46 3.11.5 4.11.47 3.11.6 4.11.48 3.11.7 4.11.49 3.11.8 4.11.5 3.11.9 4.11.50 3.12.0 4.11.51 3.12.1 4.11.52 3.12.2 4.11.53 3.12.3 4.11.54 3.2.0 4.11.55 3.2.1 4.11.56 3.2.2 4.11.57 3.2.3 4.11.58 3.2.4 4.11.59 3.2.5 4.11.6 3.2.6 4.11.60 3.2.7 4.11.61 3.2.8 4.11.62 3.2.9 4.11.63 3.20.0 4.11.64 3.20.1 4.11.65 3.20.2 4.11.66 3.20.3 4.11.67 3.20.4 4.11.68
premium-addons-for-elementor / widgets / premium-pricing-table.php
premium-addons-for-elementor / widgets Last commit date
dep 3 weeks ago premium-banner.php 1 day ago premium-blog.php 2 weeks ago premium-button.php 2 weeks ago premium-carousel.php 2 weeks ago premium-contactform.php 2 weeks ago premium-countdown.php 2 weeks ago premium-counter.php 2 weeks ago premium-dual-header.php 2 weeks ago premium-fancytext.php 2 weeks ago premium-grid.php 2 weeks ago premium-icon-list.php 2 weeks ago premium-image-button.php 2 weeks ago premium-image-scroll.php 2 weeks ago premium-image-separator.php 2 weeks ago premium-lottie.php 2 weeks ago premium-maps.php 2 days ago premium-media-wheel.php 2 weeks ago premium-mobile-menu.php 2 weeks ago premium-modalbox.php 2 days ago premium-nav-menu.php 2 weeks ago premium-notifications.php 2 weeks ago premium-person.php 2 weeks ago premium-pinterest-feed.php 2 weeks ago premium-post-ticker.php 2 weeks ago premium-pricing-table.php 2 days ago premium-progressbar.php 2 weeks ago premium-search-form.php 2 days ago premium-svg-drawer.php 2 weeks ago premium-tcloud.php 2 weeks ago premium-testimonials.php 2 weeks ago premium-textual-showcase.php 2 weeks ago premium-tiktok-feed.php 2 weeks ago premium-title.php 2 days ago premium-videobox.php 2 weeks ago premium-vscroll.php 2 weeks ago premium-weather.php 2 weeks ago premium-world-clock.php 2 weeks ago
premium-pricing-table.php
3972 lines
1 <?php
2 /**
3 * Premium Pricing Table.
4 */
5
6 namespace PremiumAddons\Widgets;
7
8 // Elementor Classes.
9 use Elementor\Modules\DynamicTags\Module as TagsModule;
10 use Elementor\Icons_Manager;
11 use Elementor\Utils;
12 use Elementor\Plugin;
13 use Elementor\Widget_Base;
14 use Elementor\Controls_Manager;
15 use Elementor\Control_Media;
16 use Elementor\Repeater;
17 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
18 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
19 use Elementor\Group_Control_Border;
20 use Elementor\Group_Control_Typography;
21 use Elementor\Group_Control_Box_Shadow;
22 use PremiumAddons\Includes\Controls\Premium_Background;
23
24 // PremiumAddons Classes.
25 use PremiumAddons\Admin\Includes\Admin_Helper;
26 use PremiumAddons\Includes\Helper_Functions;
27 use PremiumAddons\Includes\Controls\Premium_Post_Filter;
28
29 if ( ! defined( 'ABSPATH' ) ) {
30 exit; // If this file is called directly, abort.
31 }
32 /**
33 * Class Premium_Pricing_Table
34 */
35 class Premium_Pricing_Table 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-pricing-table' );
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-pricing-table';
70 }
71
72 /**
73 * Retrieve Widget Title.
74 *
75 * @since 1.0.0
76 * @access public
77 */
78 public function get_title() {
79 return __( 'Pricing Table', '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-pricing-table';
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 /**
112 * Retrieve Widget Dependent JS.
113 *
114 * @since 1.0.0
115 * @access public
116 *
117 * @return array JS script handles.
118 */
119 public function get_script_depends() {
120
121 $is_edit = Helper_Functions::is_edit_mode();
122
123 $scripts = array();
124
125 if ( $is_edit ) {
126
127 $draw_scripts = $this->check_icon_draw() ? array( 'pa-tweenmax', 'pa-motionpath' ) : array();
128
129 $scripts = array_merge( $draw_scripts, array( 'pa-glass', 'lottie-js' ) );
130
131 } else {
132 $settings = $this->get_settings();
133
134 // Check main icon settings.
135 if ( 'yes' === $settings['premium_pricing_table_icon_switcher'] ) {
136
137 if ( 'yes' === $settings['draw_svg'] ) {
138 $scripts[] = 'pa-tweenmax';
139 $scripts[] = 'pa-motionpath';
140 }
141
142 if ( 'animation' === $settings['icon_type'] ) {
143 $scripts[] = 'lottie-js';
144 }
145 }
146
147 // Check feature list items settings.
148 if ( 'yes' === $settings['premium_pricing_table_list_switcher'] && ! empty( $settings['premium_fancy_text_list_items'] ) ) {
149 foreach ( $settings['premium_fancy_text_list_items'] as $item ) {
150 if ( 'yes' === $item['draw_svg'] ) {
151 $scripts[] = 'pa-tweenmax';
152 $scripts[] = 'pa-motionpath';
153 $draw_js = true;
154 }
155
156 if ( 'animation' === $item['icon_type'] ) {
157 $scripts[] = 'lottie-js';
158 $lottie_js = true;
159 }
160
161 if ( isset( $draw_js ) && isset( $lottie_js ) ) {
162 break;
163 }
164 }
165 }
166
167 if ( 'none' !== $settings['price_lq_effect'] ) {
168 $scripts[] = 'pa-glass';
169 }
170 }
171
172 return $scripts;
173 }
174
175 /**
176 * Retrieve Widget Categories.
177 *
178 * @since 1.0.0
179 * @access public
180 *
181 * @return array Widget categories.
182 */
183 public function get_categories() {
184 return array( 'premium-elements' );
185 }
186
187 /**
188 * Retrieve Widget Keywords.
189 *
190 * @since 1.0.0
191 * @access public
192 *
193 * @return array Widget keywords.
194 */
195 public function get_keywords() {
196 return array( 'pa', 'premium', 'premium pricing table', 'price', 'feature', 'list', 'bullet', 'cta' );
197 }
198
199 protected function is_dynamic_content(): bool {
200 return false;
201 }
202
203 /**
204 * Retrieve Widget Support URL.
205 *
206 * @access public
207 *
208 * @return string support URL.
209 */
210 public function get_custom_help_url() {
211 return 'https://premiumaddons.com/support/';
212 }
213
214 public function has_widget_inner_wrapper(): bool {
215 return ! Helper_Functions::check_elementor_experiment( 'e_optimized_markup' );
216 }
217
218 /**
219 * Register Pricing Table controls.
220 *
221 * @since 1.0.0
222 * @access protected
223 */
224 protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
225
226 $draw_icon = $this->check_icon_draw();
227
228 $this->add_content_tab_sections( $draw_icon );
229
230 Helper_Functions::register_papro_promotion_controls( $this, 'pricing' );
231
232 $this->add_style_tab_sections( $draw_icon );
233 }
234
235 private function add_content_tab_sections( $draw_icon ) {
236 $animation_conds = array(
237 'relation' => 'or',
238 'terms' => array(
239 array(
240 'name' => 'icon_type',
241 'value' => 'animation',
242 ),
243 array(
244 'terms' => array(
245 array(
246 'relation' => 'or',
247 'terms' => array(
248 array(
249 'name' => 'icon_type',
250 'value' => 'icon',
251 ),
252 array(
253 'name' => 'icon_type',
254 'value' => 'svg',
255 ),
256 ),
257 ),
258 array(
259 'name' => 'draw_svg',
260 'value' => 'yes',
261 ),
262 ),
263 ),
264 ),
265
266 );
267
268 $this->add_icon_controls( $draw_icon, $animation_conds );
269 $this->add_title_controls();
270 $this->add_price_controls();
271 $this->add_featured_list_controls( $draw_icon, $animation_conds );
272 $this->add_description_controls();
273 $this->add_button_controls();
274 $this->add_ribbon_controls();
275 $this->add_display_option_controls();
276 }
277
278 private function add_style_tab_sections( $draw_icon ) {
279 $this->add_icon_style_controls( $draw_icon );
280 $this->add_title_style_controls();
281 $this->add_price_style_controls();
282 $this->add_feature_list_style_controls();
283 $this->add_tooltips_style_controls();
284 $this->add_description_style_controls();
285 $this->add_button_style_controls();
286 $this->add_ribbon_style_controls();
287 $this->add_box_style_controls();
288 }
289
290 private function add_icon_controls( $draw_icon, $animation_conds ) {
291 $this->start_controls_section(
292 'premium_pricing_table_icon_section',
293 array(
294 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
295 'condition' => array(
296 'premium_pricing_table_icon_switcher' => 'yes',
297 ),
298 )
299 );
300
301 $this->add_control(
302 'icon_type',
303 array(
304 'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
305 'type' => Controls_Manager::SELECT,
306 'options' => array(
307 'icon' => __( 'Icon', 'premium-addons-for-elementor' ),
308 'image' => __( 'Image', 'premium-addons-for-elementor' ),
309 'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
310 'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ),
311 ),
312 'default' => 'icon',
313 )
314 );
315
316 $this->add_control(
317 'premium_pricing_table_icon_selection_updated',
318 array(
319 'label' => __( 'Select an Icon', 'premium-addons-for-elementor' ),
320 'type' => Controls_Manager::ICONS,
321 'fa4compatibility' => 'premium_pricing_table_icon_selection',
322 'default' => array(
323 'value' => 'fas fa-star',
324 'library' => 'fa-solid',
325 ),
326 'condition' => array(
327 'icon_type' => 'icon',
328 ),
329 )
330 );
331
332 $this->add_control(
333 'lottie_url',
334 array(
335 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
336 'type' => Controls_Manager::TEXT,
337 'dynamic' => array( 'active' => true ),
338 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
339 'label_block' => true,
340 'condition' => array(
341 'icon_type' => 'animation',
342 ),
343 'ai' => array(
344 'active' => false,
345 ),
346 )
347 );
348
349 $this->add_control(
350 'custom_svg',
351 array(
352 'label' => __( 'SVG Code', 'premium-addons-for-elementor' ),
353 'type' => Controls_Manager::TEXTAREA,
354 '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>',
355 'condition' => array(
356 'icon_type' => 'svg',
357 ),
358 'ai' => array(
359 'active' => false,
360 ),
361 )
362 );
363
364 $this->add_control(
365 'draw_svg',
366 array(
367 'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ),
368 'type' => Controls_Manager::SWITCHER,
369 '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>',
370 'classes' => $draw_icon ? '' : 'editor-pa-control-disabled',
371 'condition' => array(
372 'icon_type' => array( 'icon', 'svg' ),
373 'premium_pricing_table_icon_selection_updated[library]!' => 'svg',
374 ),
375 )
376 );
377
378 if ( $draw_icon ) {
379 $this->add_control(
380 'path_width',
381 array(
382 'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ),
383 'type' => Controls_Manager::SLIDER,
384 'range' => array(
385 'px' => array(
386 'min' => 0,
387 'max' => 50,
388 'step' => 0.1,
389 ),
390 ),
391 'condition' => array(
392 'icon_type' => array( 'icon', 'svg' ),
393 ),
394 'selectors' => array(
395 '{{WRAPPER}} .premium-pricing-icon-container svg *' => 'stroke-width: {{SIZE}}',
396 ),
397 )
398 );
399
400 $this->add_control(
401 'svg_sync',
402 array(
403 'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ),
404 'type' => Controls_Manager::SWITCHER,
405 'condition' => array(
406 'icon_type' => array( 'icon', 'svg' ),
407 'draw_svg' => 'yes',
408 ),
409 )
410 );
411
412 $this->add_control(
413 'frames',
414 array(
415 'label' => __( 'Speed', 'premium-addons-for-elementor' ),
416 'type' => Controls_Manager::NUMBER,
417 'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
418 'default' => 5,
419 'min' => 1,
420 'max' => 100,
421 'condition' => array(
422 'icon_type' => array( 'icon', 'svg' ),
423 'draw_svg' => 'yes',
424 ),
425 )
426 );
427 } else {
428
429 Helper_Functions::get_draw_svg_notice(
430 $this,
431 'pricing',
432 array(
433 'icon_type' => array( 'icon', 'svg' ),
434 'premium_pricing_table_icon_selection_updated[library]!' => 'svg',
435 )
436 );
437
438 }
439
440 $this->add_control(
441 'lottie_loop',
442 array(
443 'label' => __( 'Loop', 'premium-addons-for-elementor' ),
444 'type' => Controls_Manager::SWITCHER,
445 'return_value' => 'true',
446 'default' => 'true',
447 'conditions' => $animation_conds,
448 )
449 );
450
451 $this->add_control(
452 'lottie_reverse',
453 array(
454 'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
455 'type' => Controls_Manager::SWITCHER,
456 'return_value' => 'true',
457 'conditions' => $animation_conds,
458 )
459 );
460
461 if ( $draw_icon ) {
462 $this->add_control(
463 'start_point',
464 array(
465 'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ),
466 'type' => Controls_Manager::SLIDER,
467 'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ),
468 'default' => array(
469 'unit' => '%',
470 'size' => 0,
471 ),
472 'condition' => array(
473 'icon_type' => array( 'icon', 'svg' ),
474 'draw_svg' => 'yes',
475 'lottie_reverse!' => 'true',
476 ),
477 )
478 );
479
480 $this->add_control(
481 'end_point',
482 array(
483 'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ),
484 'type' => Controls_Manager::SLIDER,
485 'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ),
486 'default' => array(
487 'unit' => '%',
488 'size' => 0,
489 ),
490 'condition' => array(
491 'icon_type' => array( 'icon', 'svg' ),
492 'draw_svg' => 'yes',
493 'lottie_reverse' => 'true',
494 ),
495 )
496 );
497
498 $this->add_control(
499 'svg_hover',
500 array(
501 'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
502 'type' => Controls_Manager::SWITCHER,
503 'return_value' => 'true',
504 'condition' => array(
505 'icon_type' => array( 'icon', 'svg' ),
506 'draw_svg' => 'yes',
507 ),
508 )
509 );
510
511 $this->add_control(
512 'svg_yoyo',
513 array(
514 'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ),
515 'type' => Controls_Manager::SWITCHER,
516 'condition' => array(
517 'icon_type' => array( 'icon', 'svg' ),
518 'draw_svg' => 'yes',
519 'lottie_loop' => 'true',
520 ),
521 )
522 );
523 }
524
525 $this->add_control(
526 'premium_pricing_table_image',
527 array(
528 'label' => __( 'Choose Image', 'premium-addons-for-elementor' ),
529 'type' => Controls_Manager::MEDIA,
530 'default' => array(
531 'url' => Utils::get_placeholder_image_src(),
532 ),
533 'condition' => array(
534 'icon_type' => 'image',
535 ),
536 )
537 );
538
539 $this->add_control(
540 'icon_order',
541 array(
542 'label' => __( 'Order', 'premium-addons-for-elementor' ),
543 'type' => Controls_Manager::NUMBER,
544 'separator' => 'before',
545 'description' => __( 'Set the display order of this element. Elements with lower order numbers will appear before those with higher numbers. Default is 1.', 'premium-addons-for-elementor' ),
546 'default' => 1,
547 'selectors' => array(
548 '{{WRAPPER}} .premium-pricing-icon-container' => 'order: {{VALUE}};',
549 ),
550 )
551 );
552
553 $this->end_controls_section();
554 }
555
556 private function add_title_controls() {
557 $this->start_controls_section(
558 'premium_pricing_table_title_section',
559 array(
560 'label' => __( 'Title', 'premium-addons-for-elementor' ),
561 'condition' => array(
562 'premium_pricing_table_title_switcher' => 'yes',
563 ),
564 )
565 );
566
567 $demo = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/elementor-pricing-table-widget/', 'pricing', 'wp-editor', 'demo' );
568 Helper_Functions::add_templates_controls( $this, 'pricing-table', $demo );
569
570 $this->add_control(
571 'premium_pricing_table_title_text',
572 array(
573 'label' => __( 'Text', 'premium-addons-for-elementor' ),
574 'default' => __( 'Pricing Table', 'premium-addons-for-elementor' ),
575 'type' => Controls_Manager::TEXT,
576 'dynamic' => array( 'active' => true ),
577 'label_block' => true,
578 )
579 );
580
581 $this->add_control(
582 'premium_pricing_table_title_size',
583 array(
584 'label' => __( 'HTML Tag', 'premium-addons-for-elementor' ),
585 'description' => __( 'Select HTML tag for the title', 'premium-addons-for-elementor' ),
586 'type' => Controls_Manager::SELECT,
587 'default' => 'h3',
588 'options' => array(
589 'h1' => 'H1',
590 'h2' => 'H2',
591 'h3' => 'H3',
592 'h4' => 'H4',
593 'h5' => 'H5',
594 'h6' => 'H6',
595 'div' => 'div',
596 'span' => 'span',
597 'p' => 'p',
598 ),
599 'label_block' => true,
600 )
601 );
602
603 $this->add_control(
604 'title_order',
605 array(
606 'label' => __( 'Order', 'premium-addons-for-elementor' ),
607 'type' => Controls_Manager::NUMBER,
608 'separator' => 'before',
609 'description' => __( 'Set the display order of this element. Elements with lower order numbers will appear before those with higher numbers. Default is 1.', 'premium-addons-for-elementor' ),
610 'default' => 1,
611 'selectors' => array(
612 '{{WRAPPER}} .premium-pricing-table-title' => 'order: {{VALUE}};',
613 ),
614 )
615 );
616
617 $this->end_controls_section();
618 }
619
620 private function add_price_controls() {
621
622 $this->start_controls_section(
623 'premium_pricing_table_price_section',
624 array(
625 'label' => __( 'Price', 'premium-addons-for-elementor' ),
626 'condition' => array(
627 'premium_pricing_table_price_switcher' => 'yes',
628 ),
629 )
630 );
631
632 $this->add_control(
633 'premium_pricing_table_slashed_price_value',
634 array(
635 'label' => __( 'Slashed Price', 'premium-addons-for-elementor' ),
636 'description' => __( 'Enabling Discount Reveal automatically adds the currency to the Slashed Price, if available.', 'premium-addons-for-elementor' ),
637 'type' => Controls_Manager::TEXT,
638 'dynamic' => array( 'active' => true ),
639 'label_block' => true,
640 'ai' => array(
641 'active' => false,
642 ),
643 )
644 );
645
646 $this->add_control(
647 'price_display',
648 array(
649 'label' => __( 'Display', 'premium-addons-for-elementor' ),
650 'type' => Controls_Manager::CHOOSE,
651 'prefix_class' => 'pa-d-price-',
652 'options' => array(
653 'row' => array(
654 'title' => __( 'Inline', 'premium-addons-for-elementor' ),
655 'icon' => 'eicon-ellipsis-h',
656 ),
657 'column' => array(
658 'title' => __( 'Block', 'premium-addons-for-elementor' ),
659 'icon' => 'eicon-ellipsis-v',
660 ),
661 ),
662 'default' => 'row',
663 'toggle' => false,
664 'selectors' => array(
665 '{{WRAPPER}} .premium-pricing-inner-wrapper ' => 'flex-direction: {{VALUE}}',
666 ),
667 'condition' => array(
668 'premium_pricing_table_slashed_price_value!' => '',
669 'price_effects!' => 'effect-1',
670 ),
671 )
672 );
673
674 $this->add_control(
675 'slashed_price_placement',
676 array(
677 'label' => __( 'Placement', 'premium-addons-for-elementor' ),
678 'type' => Controls_Manager::CHOOSE,
679 'options' => array(
680 '0' => array(
681 'title' => __( 'Default', 'premium-addons-for-elementor' ),
682 'icon' => 'eicon-order-start',
683 ),
684 '1' => array(
685 'title' => __( 'Reverse', 'premium-addons-for-elementor' ),
686 'icon' => 'eicon-order-end',
687 ),
688 ),
689 'default' => '0',
690 'toggle' => false,
691 'selectors' => array(
692 '{{WRAPPER}} .premium-pricing-slashed-price-value' => 'order: {{VALUE}}',
693 ),
694 'condition' => array(
695 'premium_pricing_table_slashed_price_value!' => '',
696 'price_effects!' => 'effect-1',
697 ),
698 )
699 );
700
701 $this->add_control(
702 'price_effects',
703 array(
704 'label' => __( 'Discount Reveal Effect', 'premium-addons-for-elementor' ),
705 'type' => Controls_Manager::SWITCHER,
706 'return_value' => 'effect-1',
707 'default' => '',
708 'prefix_class' => 'pa-bt-effect__',
709 'render_type' => 'template',
710 'condition' => array(
711 'premium_pricing_table_slashed_price_value!' => '',
712 ),
713 ),
714 );
715
716 $this->add_control(
717 'premium_pricing_table_price_currency',
718 array(
719 'label' => __( 'Currency', 'premium-addons-for-elementor' ),
720 'type' => Controls_Manager::TEXT,
721 'dynamic' => array( 'active' => true ),
722 'default' => '$',
723 'separator' => 'before',
724 'label_block' => true,
725 'ai' => array(
726 'active' => false,
727 ),
728 )
729 );
730
731 $this->add_control(
732 'premium_pricing_table_price_value',
733 array(
734 'label' => __( 'Price', 'premium-addons-for-elementor' ),
735 'type' => Controls_Manager::TEXT,
736 'dynamic' => array( 'active' => true ),
737 'default' => '25',
738 'label_block' => true,
739 'ai' => array(
740 'active' => false,
741 ),
742 )
743 );
744
745 $this->add_control(
746 'premium_pricing_table_price_separator',
747 array(
748 'label' => __( 'Divider', 'premium-addons-for-elementor' ),
749 'type' => Controls_Manager::TEXT,
750 'dynamic' => array( 'active' => true ),
751 'default' => '/',
752 'label_block' => true,
753 'ai' => array(
754 'active' => false,
755 ),
756 )
757 );
758
759 /*Price Duration*/
760 $this->add_control(
761 'premium_pricing_table_price_duration',
762 array(
763 'label' => __( 'Duration', 'premium-addons-for-elementor' ),
764 'type' => Controls_Manager::TEXT,
765 'dynamic' => array( 'active' => true ),
766 'default' => 'm',
767 'label_block' => true,
768 'ai' => array(
769 'active' => false,
770 ),
771 )
772 );
773
774 $this->add_control(
775 'price_order',
776 array(
777 'label' => __( 'Order', 'premium-addons-for-elementor' ),
778 'type' => Controls_Manager::NUMBER,
779 'separator' => 'before',
780 'description' => __( 'Set the display order of this element. Elements with lower order numbers will appear before those with higher numbers. Default is 1.', 'premium-addons-for-elementor' ),
781 'default' => 1,
782 'selectors' => array(
783 '{{WRAPPER}} .premium-pricing-price-container' => 'order: {{VALUE}};',
784 ),
785 )
786 );
787
788 $this->end_controls_section();
789 }
790
791 private function add_featured_list_controls( $draw_icon, $animation_conds ) {
792 $this->start_controls_section(
793 'premium_pricing_table_list_section',
794 array(
795 'label' => __( 'Feature List', 'premium-addons-for-elementor' ),
796 'condition' => array(
797 'premium_pricing_table_list_switcher' => 'yes',
798 ),
799 )
800 );
801
802 $repeater = new REPEATER();
803
804 $repeater->add_control(
805 'premium_pricing_list_item_text',
806 array(
807 'label' => __( 'Text', 'premium-addons-for-elementor' ),
808 'type' => Controls_Manager::TEXT,
809 'default' => __( 'Feature Title', 'premium-addons-for-elementor' ),
810 'dynamic' => array( 'active' => true ),
811 'label_block' => true,
812 'ai' => array(
813 'active' => false,
814 ),
815 )
816 );
817
818 $repeater->add_control(
819 'icon_type',
820 array(
821 'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
822 'type' => Controls_Manager::SELECT,
823 'options' => array(
824 'icon' => __( 'Icon', 'premium-addons-for-elementor' ),
825 'image' => __( 'Image', 'premium-addons-for-elementor' ),
826 'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
827 'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ),
828 ),
829 'default' => 'icon',
830 )
831 );
832
833 $repeater->add_control(
834 'premium_pricing_list_item_icon_updated',
835 array(
836 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
837 'type' => Controls_Manager::ICONS,
838 'fa4compatibility' => 'premium_pricing_list_item_icon',
839 'default' => array(
840 'value' => 'fas fa-check',
841 'library' => 'fa-solid',
842 ),
843 'condition' => array(
844 'icon_type' => 'icon',
845 ),
846 )
847 );
848
849 $repeater->add_control(
850 'custom_svg',
851 array(
852 'label' => __( 'SVG Code', 'premium-addons-for-elementor' ),
853 'type' => Controls_Manager::TEXTAREA,
854 '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>',
855 'condition' => array(
856 'icon_type' => 'svg',
857 ),
858 'ai' => array(
859 'active' => false,
860 ),
861
862 )
863 );
864
865 $repeater->add_control(
866 'lottie_url',
867 array(
868 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
869 'type' => Controls_Manager::TEXT,
870 'dynamic' => array( 'active' => true ),
871 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
872 'label_block' => true,
873 'condition' => array(
874 'icon_type' => 'animation',
875 ),
876 'ai' => array(
877 'active' => false,
878 ),
879 )
880 );
881
882 $repeater->add_control(
883 'draw_svg',
884 array(
885 'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ),
886 'type' => Controls_Manager::SWITCHER,
887 '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>',
888 'classes' => $draw_icon ? '' : 'editor-pa-control-disabled',
889 'condition' => array(
890 'icon_type' => array( 'icon', 'svg' ),
891 'premium_pricing_list_item_icon_updated[library]!' => 'svg',
892 ),
893 )
894 );
895
896 if ( $draw_icon ) {
897 $repeater->add_control(
898 'path_width',
899 array(
900 'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ),
901 'type' => Controls_Manager::SLIDER,
902 'range' => array(
903 'px' => array(
904 'min' => 0,
905 'max' => 50,
906 'step' => 0.1,
907 ),
908 ),
909 'condition' => array(
910 'icon_type' => array( 'icon', 'svg' ),
911 ),
912 'selectors' => array(
913 '{{WRAPPER}} {{CURRENT_ITEM}}.premium-pricing-list-item svg *' => 'stroke-width: {{SIZE}}',
914 ),
915 )
916 );
917
918 $repeater->add_control(
919 'svg_sync',
920 array(
921 'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ),
922 'type' => Controls_Manager::SWITCHER,
923 'condition' => array(
924 'icon_type' => array( 'icon', 'svg' ),
925 'draw_svg' => 'yes',
926 ),
927 )
928 );
929
930 $repeater->add_control(
931 'frames',
932 array(
933 'label' => __( 'Speed', 'premium-addons-for-elementor' ),
934 'type' => Controls_Manager::NUMBER,
935 'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
936 'default' => 5,
937 'min' => 1,
938 'max' => 100,
939 'condition' => array(
940 'icon_type' => array( 'icon', 'svg' ),
941 'draw_svg' => 'yes',
942 ),
943 )
944 );
945
946 } else {
947
948 Helper_Functions::get_draw_svg_notice(
949 $repeater,
950 'pricing',
951 array(
952 'icon_type' => array( 'icon', 'svg' ),
953 'premium_pricing_list_item_icon_updated[library]!' => 'svg',
954 )
955 );
956
957 }
958
959 $repeater->add_control(
960 'lottie_loop',
961 array(
962 'label' => __( 'Loop', 'premium-addons-for-elementor' ),
963 'type' => Controls_Manager::SWITCHER,
964 'return_value' => 'true',
965 'default' => 'true',
966 'conditions' => $animation_conds,
967 )
968 );
969
970 if ( $draw_icon ) {
971 $repeater->add_control(
972 'svg_notice',
973 array(
974 'raw' => __( 'Loop and Speed options are overriden when Draw SVGs in Sequence option is enabled.', 'premium-addons-for-elementor' ),
975 'type' => Controls_Manager::RAW_HTML,
976 'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
977 'condition' => array(
978 'icon_type' => array( 'icon', 'svg' ),
979 'draw_svg' => 'yes',
980 ),
981 )
982 );
983 }
984
985 $repeater->add_control(
986 'lottie_reverse',
987 array(
988 'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
989 'type' => Controls_Manager::SWITCHER,
990 'return_value' => 'true',
991 'conditions' => $animation_conds,
992 )
993 );
994
995 if ( $draw_icon ) {
996 $repeater->add_control(
997 'start_point',
998 array(
999 'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ),
1000 'type' => Controls_Manager::SLIDER,
1001 'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ),
1002 'default' => array(
1003 'unit' => '%',
1004 'size' => 0,
1005 ),
1006 'condition' => array(
1007 'icon_type' => array( 'icon', 'svg' ),
1008 'draw_svg' => 'yes',
1009 'lottie_reverse!' => 'true',
1010 ),
1011 )
1012 );
1013
1014 $repeater->add_control(
1015 'end_point',
1016 array(
1017 'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ),
1018 'type' => Controls_Manager::SLIDER,
1019 'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ),
1020 'default' => array(
1021 'unit' => '%',
1022 'size' => 0,
1023 ),
1024 'condition' => array(
1025 'icon_type' => array( 'icon', 'svg' ),
1026 'draw_svg' => 'yes',
1027 'lottie_reverse' => 'true',
1028 ),
1029 )
1030 );
1031
1032 $repeater->add_control(
1033 'svg_hover',
1034 array(
1035 'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
1036 'type' => Controls_Manager::SWITCHER,
1037 'return_value' => 'true',
1038 'condition' => array(
1039 'icon_type' => array( 'icon', 'svg' ),
1040 'draw_svg' => 'yes',
1041 ),
1042 )
1043 );
1044
1045 $repeater->add_control(
1046 'svg_yoyo',
1047 array(
1048 'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ),
1049 'type' => Controls_Manager::SWITCHER,
1050 'condition' => array(
1051 'icon_type' => array( 'icon', 'svg' ),
1052 'draw_svg' => 'yes',
1053 'lottie_loop' => 'true',
1054 ),
1055 )
1056 );
1057 }
1058
1059 $repeater->add_control(
1060 'premium_pricing_list_image',
1061 array(
1062 'label' => __( 'Choose Image', 'premium-addons-for-elementor' ),
1063 'type' => Controls_Manager::MEDIA,
1064 'default' => array(
1065 'url' => Utils::get_placeholder_image_src(),
1066 ),
1067 'condition' => array(
1068 'icon_type' => 'image',
1069 ),
1070 )
1071 );
1072
1073 $repeater->add_control(
1074 'premium_pricing_table_item_tooltip',
1075 array(
1076 'label' => __( 'Tooltip', 'premium-addons-for-elementor' ),
1077 'type' => Controls_Manager::SWITCHER,
1078 )
1079 );
1080
1081 $repeater->add_control(
1082 'premium_pricing_table_item_tooltip_text',
1083 array(
1084 'label' => __( 'Tooltip Text', 'premium-addons-for-elementor' ),
1085 'type' => Controls_Manager::TEXTAREA,
1086 'dynamic' => array( 'active' => true ),
1087 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
1088 'condition' => array(
1089 'premium_pricing_table_item_tooltip' => 'yes',
1090 ),
1091 'ai' => array(
1092 'active' => false,
1093 ),
1094 )
1095 );
1096
1097 $repeater->add_responsive_control(
1098 'tooltip_pos',
1099 array(
1100 'label' => __( 'Position', 'premium-addons-for-elementor' ),
1101 'type' => Controls_Manager::CHOOSE,
1102 'options' => array(
1103 'bottom: calc(100% + 1px); top: unset;' => array(
1104 'title' => __( 'Top', 'premium-addons-for-elementor' ),
1105 'icon' => 'eicon-arrow-up',
1106 ),
1107 'top:calc(100% + 1px); bottom:unset;' => array(
1108 'title' => __( 'Bottom', 'premium-addons-for-elementor' ),
1109 'icon' => 'eicon-arrow-down',
1110 ),
1111 ),
1112 'default' => 'top:calc(100% + 1px); bottom:unset;',
1113 'toggle' => false,
1114 'selectors' => array(
1115 '{{WRAPPER}} {{CURRENT_ITEM}} .premium-pricing-list-tooltip' => '{{VALUE}}',
1116 ),
1117 'condition' => array(
1118 'premium_pricing_table_item_tooltip' => 'yes',
1119 ),
1120 )
1121 );
1122
1123 $repeater->add_control(
1124 'list_item_icon_color',
1125 array(
1126 'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
1127 'type' => Controls_Manager::COLOR,
1128 'selectors' => array(
1129 '{{WRAPPER}} {{CURRENT_ITEM}} .premium-pricing-feature-icon' => 'color: {{VALUE}}',
1130 '{{WRAPPER}} {{CURRENT_ITEM}}.premium-drawable-icon *, {{WRAPPER}} {{CURRENT_ITEM}}.premium-pricing-list-item svg:not([class*="premium-"])' => 'fill: {{VALUE}} !important',
1131 ),
1132 'condition' => array(
1133 'icon_type' => 'icon',
1134 ),
1135 )
1136 );
1137
1138 if ( $draw_icon ) {
1139 $repeater->add_control(
1140 'stroke_color',
1141 array(
1142 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1143 'type' => Controls_Manager::COLOR,
1144 'default' => '#61CE70',
1145 'condition' => array(
1146 'icon_type' => array( 'icon', 'svg' ),
1147 ),
1148 'selectors' => array(
1149 '{{WRAPPER}} {{CURRENT_ITEM}}.premium-drawable-icon *, {{WRAPPER}} {{CURRENT_ITEM}}.premium-pricing-list-item svg:not([class*="premium-"])' => 'stroke: {{VALUE}};',
1150 ),
1151 )
1152 );
1153
1154 $repeater->add_control(
1155 'svg_color',
1156 array(
1157 'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ),
1158 'type' => Controls_Manager::COLOR,
1159 'global' => false,
1160 'condition' => array(
1161 'icon_type' => array( 'icon', 'svg' ),
1162 'draw_svg' => 'yes',
1163 ),
1164 )
1165 );
1166 }
1167
1168 $repeater->add_control(
1169 'list_item_text_color',
1170 array(
1171 'label' => __( 'Text Color', 'premium-addons-for-elementor' ),
1172 'type' => Controls_Manager::COLOR,
1173 'selectors' => array(
1174 '{{WRAPPER}} {{CURRENT_ITEM}} .premium-pricing-list-span' => 'color: {{VALUE}};',
1175 ),
1176 )
1177 );
1178
1179 $this->add_control(
1180 'premium_fancy_text_list_items',
1181 array(
1182 'label' => __( 'Features', 'premium-addons-for-elementor' ),
1183 'type' => Controls_Manager::REPEATER,
1184 'default' => array(
1185 array(
1186 'premium_pricing_list_item_icon_updated' => array(
1187 'value' => 'fas fa-check',
1188 'library' => 'fa-solid',
1189 ),
1190 'premium_pricing_list_item_text' => __( 'List Item #1', 'premium-addons-for-elementor' ),
1191 ),
1192 array(
1193 'premium_pricing_list_item_icon_updated' => array(
1194 'value' => 'fas fa-check',
1195 'library' => 'fa-solid',
1196 ),
1197 'premium_pricing_list_item_text' => __( 'List Item #2', 'premium-addons-for-elementor' ),
1198 ),
1199 array(
1200 'premium_pricing_list_item_icon_updated' => array(
1201 'value' => 'fas fa-check',
1202 'library' => 'fa-solid',
1203 ),
1204 'premium_pricing_list_item_text' => __( 'List Item #3', 'premium-addons-for-elementor' ),
1205 ),
1206 ),
1207 'fields' => $repeater->get_controls(),
1208 'title_field' => '{{{ elementor.helpers.renderIcon( this, premium_pricing_list_item_icon_updated, {}, "i", "panel" ) || \'<i class="{{ premium_pricing_list_item_icon }}" aria-hidden="true"></i>\' }}} {{{ premium_pricing_list_item_text }}}',
1209 )
1210 );
1211
1212 if ( $draw_icon ) {
1213 $this->add_control(
1214 'draw_svgs_sequence',
1215 array(
1216 'label' => __( 'Draw SVGs In Sequence', 'premium-addons-for-elementor' ),
1217 'type' => Controls_Manager::SWITCHER,
1218 'prefix_class' => 'pa-svg-draw-seq-',
1219 'render_type' => 'template',
1220 )
1221 );
1222
1223 $this->add_control(
1224 'draw_svgs_loop',
1225 array(
1226 'label' => __( 'Loop', 'premium-addons-for-elementor' ),
1227 'type' => Controls_Manager::SWITCHER,
1228 'prefix_class' => 'pa-svg-draw-loop-',
1229 'render_type' => 'template',
1230 'condition' => array(
1231 'draw_svgs_sequence' => 'yes',
1232 ),
1233 )
1234 );
1235
1236 $this->add_control(
1237 'list_frames',
1238 array(
1239 'label' => __( 'Speed', 'premium-addons-for-elementor' ),
1240 'type' => Controls_Manager::NUMBER,
1241 'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
1242 'default' => 5,
1243 'min' => 1,
1244 'max' => 100,
1245 'condition' => array(
1246 'draw_svgs_sequence' => 'yes',
1247 ),
1248 )
1249 );
1250
1251 $this->add_control(
1252 'list_svg_yoyo',
1253 array(
1254 'label' => __( 'Yoyo Animation', 'premium-addons-for-elementor' ),
1255 'type' => Controls_Manager::SWITCHER,
1256 'prefix_class' => 'pa-svg-draw-yoyo-',
1257 'render_type' => 'template',
1258 'condition' => array(
1259 'draw_svgs_sequence' => 'yes',
1260 'draw_svgs_loop' => 'yes',
1261 ),
1262 )
1263 );
1264 }
1265
1266 $this->add_responsive_control(
1267 'premium_pricing_table_list_align',
1268 array(
1269 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
1270 'type' => Controls_Manager::CHOOSE,
1271 'separator' => 'before',
1272 'options' => array(
1273 'left' => array(
1274 'title' => __( 'Left', 'premium-addons-for-elementor' ),
1275 'icon' => 'eicon-text-align-left',
1276 ),
1277 'center' => array(
1278 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1279 'icon' => 'eicon-text-align-center',
1280 ),
1281 'right' => array(
1282 'title' => __( 'Right', 'premium-addons-for-elementor' ),
1283 'icon' => 'eicon-text-align-right',
1284 ),
1285 ),
1286 'prefix_class' => 'premium-pricing-features-',
1287 'selectors_dictionary' => array(
1288 'left' => 'start',
1289 'center' => 'center',
1290 'right' => 'end',
1291 ),
1292 'toggle' => false,
1293 'selectors' => array(
1294 '{{WRAPPER}} .premium-pricing-list .premium-pricing-list-item' => 'justify-content: {{VALUE}}',
1295 ),
1296 'default' => 'center',
1297 )
1298 );
1299
1300 $this->add_responsive_control(
1301 'featured_list_v_align',
1302 array(
1303 'label' => __( 'Vertical Alignment', 'premium-addons-for-elementor' ),
1304 'type' => Controls_Manager::CHOOSE,
1305 'options' => array(
1306 'flex-start' => array(
1307 'title' => __( 'Top', 'premium-addons-for-elementor' ),
1308 'icon' => 'eicon-arrow-up',
1309 ),
1310 'center' => array(
1311 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1312 'icon' => 'eicon-v-align-middle',
1313 ),
1314 'flex-end' => array(
1315 'title' => __( 'Bottom', 'premium-addons-for-elementor' ),
1316 'icon' => 'eicon-arrow-down',
1317 ),
1318 ),
1319 'default' => 'center',
1320 'toggle' => false,
1321 'selectors' => array(
1322 '{{WRAPPER}} .premium-pricing-list-item' => 'align-items: {{VALUE}}',
1323 ),
1324 )
1325 );
1326
1327 $this->add_control(
1328 'featured_order',
1329 array(
1330 'label' => __( 'Order', 'premium-addons-for-elementor' ),
1331 'type' => Controls_Manager::NUMBER,
1332 'separator' => 'before',
1333 'description' => __( 'Set the display order of this element. Elements with lower order numbers will appear before those with higher numbers. Default is 1.', 'premium-addons-for-elementor' ),
1334 'default' => 1,
1335 'selectors' => array(
1336 '{{WRAPPER}} .premium-pricing-list' => 'order: {{VALUE}};',
1337 ),
1338 )
1339 );
1340
1341 $this->end_controls_section();
1342 }
1343
1344 private function add_description_controls() {
1345 $this->start_controls_section(
1346 'premium_pricing_table_description_section',
1347 array(
1348 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1349 'condition' => array(
1350 'premium_pricing_table_description_switcher' => 'yes',
1351 ),
1352 )
1353 );
1354
1355 $this->add_control(
1356 'premium_pricing_table_description_text',
1357 array(
1358 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1359 'type' => Controls_Manager::WYSIWYG,
1360 'dynamic' => array( 'active' => true ),
1361 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
1362 )
1363 );
1364
1365 $this->add_control(
1366 'description_order',
1367 array(
1368 'label' => __( 'Order', 'premium-addons-for-elementor' ),
1369 'type' => Controls_Manager::NUMBER,
1370 'separator' => 'before',
1371 'description' => __( 'Set the display order of this element. Elements with lower order numbers will appear before those with higher numbers. Default is 1.', 'premium-addons-for-elementor' ),
1372 'default' => 1,
1373 'selectors' => array(
1374 '{{WRAPPER}} .premium-pricing-description-container ' => 'order: {{VALUE}};',
1375 ),
1376 )
1377 );
1378
1379 $this->end_controls_section();
1380 }
1381
1382 private function add_button_controls() {
1383 $this->start_controls_section(
1384 'premium_pricing_table_button_section',
1385 array(
1386 'label' => __( 'Button', 'premium-addons-for-elementor' ),
1387 'condition' => array(
1388 'premium_pricing_table_button_switcher' => 'yes',
1389 ),
1390 )
1391 );
1392
1393 $this->add_control(
1394 'premium_pricing_table_button_text',
1395 array(
1396 'label' => __( 'Text', 'premium-addons-for-elementor' ),
1397 'default' => __( 'Get Started', 'premium-addons-for-elementor' ),
1398 'type' => Controls_Manager::TEXT,
1399 'dynamic' => array( 'active' => true ),
1400 'label_block' => true,
1401 'ai' => array(
1402 'active' => false,
1403 ),
1404 )
1405 );
1406
1407 $this->add_control(
1408 'premium_pricing_table_button_url_type',
1409 array(
1410 'label' => __( 'Link Type', 'premium-addons-for-elementor' ),
1411 'type' => Controls_Manager::SELECT,
1412 'options' => array(
1413 'url' => __( 'URL', 'premium-addons-for-elementor' ),
1414 'link' => __( 'Existing Page', 'premium-addons-for-elementor' ),
1415 ),
1416 'default' => 'url',
1417 'label_block' => true,
1418 )
1419 );
1420
1421 $this->add_control(
1422 'premium_pricing_table_button_link',
1423 array(
1424 'label' => __( 'Link', 'premium-addons-for-elementor' ),
1425 'type' => Controls_Manager::URL,
1426 'dynamic' => array( 'active' => true ),
1427 'condition' => array(
1428 'premium_pricing_table_button_url_type' => 'url',
1429 ),
1430 'label_block' => true,
1431 )
1432 );
1433
1434 $this->add_control(
1435 'premium_pricing_table_button_link_existing_content',
1436 array(
1437 'label' => __( 'Existing Page', 'premium-addons-for-elementor' ),
1438 'type' => Premium_Post_Filter::TYPE,
1439 'label_block' => true,
1440 'multiple' => false,
1441 'source' => array( 'post', 'page' ),
1442 'condition' => array(
1443 'premium_pricing_table_button_url_type' => 'link',
1444 ),
1445 )
1446 );
1447
1448 $this->add_responsive_control(
1449 'button_width',
1450 array(
1451 'label' => __( 'Width', 'premium-addons-for-elementor' ),
1452 'type' => Controls_Manager::SLIDER,
1453 'size_units' => array( 'px', '%', 'custom' ),
1454 'range' => array(
1455 'px' => array(
1456 'min' => 1,
1457 'max' => 500,
1458 ),
1459 ),
1460 'default' => array(
1461 'size' => 100,
1462 'unit' => '%',
1463 ),
1464 'selectors' => array(
1465 '{{WRAPPER}} .premium-pricing-price-button' => 'width: {{SIZE}}{{UNIT}};',
1466 ),
1467 )
1468 );
1469
1470 Helper_Functions::add_btn_hover_controls( $this, array() );
1471
1472 $this->add_control(
1473 'btn_order',
1474 array(
1475 'label' => __( 'Order', 'premium-addons-for-elementor' ),
1476 'type' => Controls_Manager::NUMBER,
1477 'default' => 1,
1478 'separator' => 'before',
1479 'description' => __( 'Set the display order of this element. Elements with lower order numbers will appear before those with higher numbers. Default is 1.', 'premium-addons-for-elementor' ),
1480 'selectors' => array(
1481 '{{WRAPPER}} .premium-pricing-button-container ' => 'order: {{VALUE}};',
1482 ),
1483 )
1484 );
1485
1486 $this->end_controls_section();
1487 }
1488
1489 private function add_ribbon_controls() {
1490 $this->start_controls_section(
1491 'premium_pricing_table_ribbon_section',
1492 array(
1493 'label' => __( 'Ribbon', 'premium-addons-for-elementor' ),
1494 'condition' => array(
1495 'premium_pricing_table_badge_switcher' => 'yes',
1496 ),
1497 )
1498 );
1499
1500 $this->add_control(
1501 'ribbon_type',
1502 array(
1503 'label' => __( 'Type', 'premium-addons-for-elementor' ),
1504 'type' => Controls_Manager::SELECT,
1505 'options' => array(
1506 'triangle' => __( 'Triangle', 'premium-addons-for-elementor' ),
1507 'circle' => __( 'Circle', 'premium-addons-for-elementor' ),
1508 'stripe' => __( 'Stripe', 'premium-addons-for-elementor' ),
1509 'flag' => __( 'Flag', 'premium-addons-for-elementor' ),
1510 ),
1511 'default' => 'triangle',
1512 )
1513 );
1514
1515 $this->add_control(
1516 'premium_pricing_table_badge_text',
1517 array(
1518 'label' => __( 'Text', 'premium-addons-for-elementor' ),
1519 'default' => __( 'NEW', 'premium-addons-for-elementor' ),
1520 'type' => Controls_Manager::TEXT,
1521 'dynamic' => array( 'active' => true ),
1522 'label_block' => true,
1523 'ai' => array(
1524 'active' => false,
1525 ),
1526 )
1527 );
1528
1529 $this->add_responsive_control(
1530 'premium_pricing_table_badge_left_size',
1531 array(
1532 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1533 'type' => Controls_Manager::SLIDER,
1534 'range' => array(
1535 'px' => array(
1536 'min' => 1,
1537 'max' => 300,
1538 ),
1539 ),
1540 'selectors' => array(
1541 '{{WRAPPER}} .premium-badge-triangle.premium-badge-left .corner' => 'border-top-width: {{SIZE}}px; border-bottom-width: {{SIZE}}px; border-right-width: {{SIZE}}px;',
1542 ),
1543 'condition' => array(
1544 'ribbon_type' => 'triangle',
1545 'premium_pricing_table_badge_position' => 'left',
1546 ),
1547 )
1548 );
1549
1550 $this->add_responsive_control(
1551 'premium_pricing_table_badge_right_size',
1552 array(
1553 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1554 'type' => Controls_Manager::SLIDER,
1555 'range' => array(
1556 'px' => array(
1557 'min' => 1,
1558 'max' => 300,
1559 ),
1560 ),
1561 'selectors' => array(
1562 '{{WRAPPER}} .premium-badge-triangle.premium-badge-right .corner' => 'border-right-width: {{SIZE}}px; border-bottom-width: {{SIZE}}px; border-left-width: {{SIZE}}px;',
1563 ),
1564 'condition' => array(
1565 'ribbon_type' => 'triangle',
1566 'premium_pricing_table_badge_position' => 'right',
1567 ),
1568 )
1569 );
1570
1571 $this->add_responsive_control(
1572 'circle_ribbon_size',
1573 array(
1574 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1575 'type' => Controls_Manager::SLIDER,
1576 'range' => array(
1577 'px' => array(
1578 'min' => 1,
1579 'max' => 10,
1580 ),
1581 ),
1582 'selectors' => array(
1583 '{{WRAPPER}} .premium-badge-circle' => 'min-width: {{SIZE}}em; min-height: {{SIZE}}em; line-height: {{SIZE}}',
1584 ),
1585 'condition' => array(
1586 'ribbon_type' => 'circle',
1587 ),
1588 )
1589 );
1590
1591 if ( ! is_rtl() ) {
1592
1593 $this->add_control(
1594 'premium_pricing_table_badge_position',
1595 array(
1596 'label' => __( 'Position', 'premium-addons-for-elementor' ),
1597 'type' => Controls_Manager::CHOOSE,
1598 'toggle' => false,
1599 'options' => array(
1600 'left' => array(
1601 'title' => __( 'Left', 'premium-addons-for-elementor' ),
1602 'icon' => 'eicon-h-align-left',
1603 ),
1604 'right' => array(
1605 'title' => __( 'Right', 'premium-addons-for-elementor' ),
1606 'icon' => 'eicon-h-align-right',
1607 ),
1608 ),
1609 'default' => 'right',
1610 )
1611 );
1612
1613 } else {
1614 $this->add_control(
1615 'premium_pricing_table_badge_position',
1616 array(
1617 'label' => __( 'Position', 'premium-addons-for-elementor' ),
1618 'type' => Controls_Manager::CHOOSE,
1619 'toggle' => false,
1620 'options' => array(
1621 'left' => array(
1622 'title' => __( 'Left', 'premium-addons-for-elementor' ),
1623 'icon' => 'eicon-h-align-left',
1624 ),
1625 'right' => array(
1626 'title' => __( 'Right', 'premium-addons-for-elementor' ),
1627 'icon' => 'eicon-h-align-right',
1628 ),
1629 ),
1630 'default' => 'right',
1631 'condition' => array(
1632 'ribbon_type!' => 'flag',
1633 ),
1634 )
1635 );
1636 }
1637
1638 $this->add_responsive_control(
1639 'premium_pricing_table_badge_right_right',
1640 array(
1641 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
1642 'type' => Controls_Manager::SLIDER,
1643 'size_units' => array( 'px', 'em', '%' ),
1644 'range' => array(
1645 'px' => array(
1646 'min' => 1,
1647 'max' => 170,
1648 ),
1649 'em' => array(
1650 'min' => 1,
1651 'max' => 30,
1652 ),
1653 ),
1654 'selectors' => array(
1655 '{{WRAPPER}} .premium-badge-right .corner span' => 'right: {{SIZE}}{{UNIT}}',
1656 '{{WRAPPER}} .premium-badge-circle' => 'right: {{SIZE}}{{UNIT}}',
1657 ),
1658 'condition' => array(
1659 'ribbon_type!' => array( 'stripe', 'flag' ),
1660 'premium_pricing_table_badge_position' => 'right',
1661 ),
1662 )
1663 );
1664
1665 $this->add_responsive_control(
1666 'premium_pricing_table_badge_right_left',
1667 array(
1668 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
1669 'type' => Controls_Manager::SLIDER,
1670 'size_units' => array( 'px', 'em', '%' ),
1671 'range' => array(
1672 'px' => array(
1673 'min' => 1,
1674 'max' => 170,
1675 ),
1676 'em' => array(
1677 'min' => 1,
1678 'max' => 30,
1679 ),
1680 ),
1681 'selectors' => array(
1682 '{{WRAPPER}} .premium-badge-left .corner span' => 'left: {{SIZE}}{{UNIT}}',
1683 '{{WRAPPER}} .premium-badge-circle' => 'left: {{SIZE}}{{UNIT}}',
1684 ),
1685 'condition' => array(
1686 'ribbon_type!' => array( 'stripe', 'flag' ),
1687 'premium_pricing_table_badge_position' => 'left',
1688 ),
1689 )
1690 );
1691
1692 $this->add_responsive_control(
1693 'premium_pricing_table_badge_right_top',
1694 array(
1695 'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ),
1696 'type' => Controls_Manager::SLIDER,
1697 'size_units' => array( 'px', 'em', '%' ),
1698 'range' => array(
1699 'px' => array(
1700 'min' => 1,
1701 'max' => 200,
1702 ),
1703 'em' => array(
1704 'min' => 1,
1705 'max' => 20,
1706 ),
1707 ),
1708 'condition' => array(
1709 'ribbon_type!' => 'stripe',
1710 ),
1711 'selectors' => array(
1712 '{{WRAPPER}} .premium-pricing-badge-container .corner span' => 'top: {{SIZE}}{{UNIT}}',
1713 '{{WRAPPER}} .premium-badge-circle, {{WRAPPER}} .premium-badge-flag .corner' => 'top: {{SIZE}}{{UNIT}}',
1714 ),
1715 )
1716 );
1717
1718 $this->end_controls_section();
1719 }
1720
1721 private function add_display_option_controls() {
1722 $this->start_controls_section(
1723 'premium_pricing_table_title',
1724 array(
1725 'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
1726 )
1727 );
1728
1729 $this->add_control(
1730 'premium_pricing_table_icon_switcher',
1731 array(
1732 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
1733 'type' => Controls_Manager::SWITCHER,
1734 )
1735 );
1736
1737 $this->add_control(
1738 'premium_pricing_table_title_switcher',
1739 array(
1740 'label' => __( 'Title', 'premium-addons-for-elementor' ),
1741 'type' => Controls_Manager::SWITCHER,
1742 'default' => 'yes',
1743 )
1744 );
1745
1746 $this->add_control(
1747 'premium_pricing_table_price_switcher',
1748 array(
1749 'label' => __( 'Price', 'premium-addons-for-elementor' ),
1750 'type' => Controls_Manager::SWITCHER,
1751 'default' => 'yes',
1752 )
1753 );
1754
1755 $this->add_control(
1756 'premium_pricing_table_list_switcher',
1757 array(
1758 'label' => __( 'Features', 'premium-addons-for-elementor' ),
1759 'type' => Controls_Manager::SWITCHER,
1760 'default' => 'yes',
1761 )
1762 );
1763
1764 $this->add_control(
1765 'premium_pricing_table_description_switcher',
1766 array(
1767 'label' => __( 'Description', 'premium-addons-for-elementor' ),
1768 'type' => Controls_Manager::SWITCHER,
1769 )
1770 );
1771
1772 $this->add_control(
1773 'premium_pricing_table_button_switcher',
1774 array(
1775 'label' => __( 'Button', 'premium-addons-for-elementor' ),
1776 'type' => Controls_Manager::SWITCHER,
1777 'default' => 'yes',
1778 )
1779 );
1780
1781 $this->add_control(
1782 'premium_pricing_table_badge_switcher',
1783 array(
1784 'label' => __( 'Ribbon', 'premium-addons-for-elementor' ),
1785 'type' => Controls_Manager::SWITCHER,
1786 'default' => 'yes',
1787 )
1788 );
1789
1790 $this->add_responsive_control(
1791 'pa_pt_alignment',
1792 array(
1793 'label' => __( 'Content Alignment', 'premium-addons-for-elementor' ),
1794 'type' => Controls_Manager::CHOOSE,
1795 'separator' => 'before',
1796 'options' => array(
1797 'left' => array(
1798 'title' => __( 'Left', 'premium-addons-for-elementor' ),
1799 'icon' => 'eicon-text-align-left',
1800 ),
1801 'center' => array(
1802 'title' => __( 'Center', 'premium-addons-for-elementor' ),
1803 'icon' => 'eicon-text-align-center',
1804 ),
1805 'right' => array(
1806 'title' => __( 'Right', 'premium-addons-for-elementor' ),
1807 'icon' => 'eicon-text-align-right',
1808 ),
1809 ),
1810 'selectors_dictionary' => array(
1811 'left' => 'start',
1812 'center' => 'center',
1813 'right' => 'end',
1814 ),
1815 'toggle' => false,
1816 'selectors' => array(
1817 '{{WRAPPER}} .premium-pricing-price-container, {{WRAPPER}} .premium-pricing-icon-container' => 'justify-content: {{VALUE}}',
1818 '{{WRAPPER}} .premium-pricing-list' => 'justify-self: {{VALUE}}',
1819 '{{WRAPPER}} .premium-pricing-table-container' => 'text-align: {{VALUE}}',
1820 ),
1821 'default' => 'center',
1822 )
1823 );
1824
1825 $this->end_controls_section();
1826 }
1827
1828 private function add_icon_style_controls( $draw_icon ) {
1829 $this->start_controls_section(
1830 'premium_pricing_icon_style_settings',
1831 array(
1832 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
1833 'tab' => Controls_Manager::TAB_STYLE,
1834 'condition' => array(
1835 'premium_pricing_table_icon_switcher' => 'yes',
1836 ),
1837 )
1838 );
1839
1840 $this->add_control(
1841 'premium_pricing_icon_color',
1842 array(
1843 'label' => __( 'Color', 'premium-addons-for-elementor' ),
1844 'type' => Controls_Manager::COLOR,
1845 'global' => array(
1846 'default' => Global_Colors::COLOR_SECONDARY,
1847 ),
1848 'selectors' => array(
1849 '{{WRAPPER}} .premium-pricing-icon-container i' => 'color: {{VALUE}};',
1850 '{{WRAPPER}} .premium-pricing-icon-container .premium-drawable-icon *, {{WRAPPER}} .premium-pricing-icon-container svg:not([class*="premium-"])' => 'fill: {{VALUE}};',
1851 ),
1852 'condition' => array(
1853 'icon_type' => 'icon',
1854 ),
1855 )
1856 );
1857
1858 if ( $draw_icon ) {
1859 $this->add_control(
1860 'stroke_color',
1861 array(
1862 'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
1863 'type' => Controls_Manager::COLOR,
1864 'global' => array(
1865 'default' => Global_Colors::COLOR_ACCENT,
1866 ),
1867 'condition' => array(
1868 'icon_type' => array( 'icon', 'svg' ),
1869 ),
1870 'selectors' => array(
1871 '{{WRAPPER}} .premium-pricing-icon-container .premium-drawable-icon *, {{WRAPPER}} .premium-pricing-icon-container svg:not([class*="premium-"])' => 'stroke: {{VALUE}};',
1872 ),
1873 )
1874 );
1875
1876 $this->add_control(
1877 'svg_color',
1878 array(
1879 'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ),
1880 'type' => Controls_Manager::COLOR,
1881 'global' => false,
1882 'condition' => array(
1883 'icon_type' => array( 'icon', 'svg' ),
1884 'draw_svg' => 'yes',
1885 ),
1886 )
1887 );
1888 }
1889
1890 $this->add_responsive_control(
1891 'premium_pricing_icon_size',
1892 array(
1893 'label' => __( 'Size', 'premium-addons-for-elementor' ),
1894 'type' => Controls_Manager::SLIDER,
1895 'size_units' => array( 'px', '%', 'em' ),
1896 'default' => array(
1897 'size' => 25,
1898 'unit' => 'px',
1899 ),
1900 'condition' => array(
1901 'icon_type!' => 'svg',
1902 ),
1903 'selectors' => array(
1904 '{{WRAPPER}} .premium-pricing-icon-container i' => 'font-size: {{SIZE}}{{UNIT}}',
1905 '{{WRAPPER}} .premium-pricing-icon-container svg, {{WRAPPER}} .premium-pricing-icon-container img' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important',
1906 ),
1907 )
1908 );
1909
1910 $this->add_responsive_control(
1911 'svg_icon_width',
1912 array(
1913 'label' => __( 'Width', 'premium-addons-for-elementor' ),
1914 'type' => Controls_Manager::SLIDER,
1915 'size_units' => array( 'px', 'em', '%' ),
1916 'range' => array(
1917 'px' => array(
1918 'min' => 1,
1919 'max' => 600,
1920 ),
1921 'em' => array(
1922 'min' => 1,
1923 'max' => 30,
1924 ),
1925 ),
1926 'default' => array(
1927 'size' => 100,
1928 'unit' => 'px',
1929 ),
1930 'condition' => array(
1931 'icon_type' => 'svg',
1932 ),
1933 'selectors' => array(
1934 '{{WRAPPER}} .premium-pricing-icon-container svg' => 'width: {{SIZE}}{{UNIT}};',
1935 ),
1936 )
1937 );
1938
1939 $this->add_responsive_control(
1940 'svg_icon_height',
1941 array(
1942 'label' => __( 'Height', 'premium-addons-for-elementor' ),
1943 'type' => Controls_Manager::SLIDER,
1944 'size_units' => array( 'px', 'em' ),
1945 'range' => array(
1946 'px' => array(
1947 'min' => 1,
1948 'max' => 300,
1949 ),
1950 'em' => array(
1951 'min' => 1,
1952 'max' => 30,
1953 ),
1954 ),
1955 'condition' => array(
1956 'icon_type' => 'svg',
1957 ),
1958 'selectors' => array(
1959 '{{WRAPPER}} .premium-pricing-icon-container svg' => 'height: {{SIZE}}{{UNIT}}',
1960 ),
1961 )
1962 );
1963
1964 $this->add_control(
1965 'premium_pricing_icon_back_color',
1966 array(
1967 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
1968 'type' => Controls_Manager::COLOR,
1969 'global' => array(
1970 'default' => Global_Colors::COLOR_PRIMARY,
1971 ),
1972 'selectors' => array(
1973 '{{WRAPPER}} .premium-pricing-icon-wrapper' => 'background-color: {{VALUE}};',
1974 ),
1975 )
1976 );
1977
1978 $this->add_responsive_control(
1979 'premium_pricing_icon_inner_padding',
1980 array(
1981 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
1982 'type' => Controls_Manager::SLIDER,
1983 'size_units' => array( 'px', 'em' ),
1984 'default' => array(
1985 'size' => 5,
1986 'unit' => 'px',
1987 ),
1988 'selectors' => array(
1989 '{{WRAPPER}} .premium-pricing-icon-wrapper' => 'padding: {{SIZE}}{{UNIT}};',
1990 ),
1991 )
1992 );
1993
1994 $this->add_group_control(
1995 Group_Control_Border::get_type(),
1996 array(
1997 'name' => 'premium_pricing_icon_inner_border',
1998 'selector' => '{{WRAPPER}} .premium-pricing-icon-wrapper',
1999 )
2000 );
2001
2002 $this->add_control(
2003 'premium_pricing_icon_inner_radius',
2004 array(
2005 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2006 'type' => Controls_Manager::SLIDER,
2007 'size_units' => array( 'px', '%', 'em' ),
2008 'default' => array(
2009 'size' => 100,
2010 'unit' => 'px',
2011 ),
2012 'selectors' => array(
2013 '{{WRAPPER}} .premium-pricing-icon-wrapper' => 'border-radius: {{SIZE}}{{UNIT}};',
2014 ),
2015 'separator' => 'after',
2016 )
2017 );
2018
2019 $this->add_control(
2020 'premium_pricing_icon_container_heading',
2021 array(
2022 'label' => __( 'Container', 'premium-addons-for-elementor' ),
2023 'type' => Controls_Manager::HEADING,
2024 )
2025 );
2026
2027 $this->add_group_control(
2028 Premium_Background::get_type(),
2029 array(
2030 'name' => 'premium_pricing_table_icon_background',
2031 'types' => array( 'classic', 'gradient' ),
2032 'selector' => '{{WRAPPER}} .premium-pricing-icon-container',
2033 )
2034 );
2035
2036 $this->add_group_control(
2037 Group_Control_Border::get_type(),
2038 array(
2039 'name' => 'premium_pricing_icon_border',
2040 'selector' => '{{WRAPPER}} .premium-pricing-icon-container',
2041 )
2042 );
2043
2044 $this->add_control(
2045 'premium_pricing_icon_border_radius',
2046 array(
2047 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2048 'type' => Controls_Manager::SLIDER,
2049 'size_units' => array( 'px', '%', 'em' ),
2050 'selectors' => array(
2051 '{{WRAPPER}} .premium-pricing-icon-container' => 'border-radius: {{SIZE}}{{UNIT}};',
2052 ),
2053 )
2054 );
2055
2056 $this->add_responsive_control(
2057 'premium_pricing_icon_padding',
2058 array(
2059 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2060 'type' => Controls_Manager::DIMENSIONS,
2061 'size_units' => array( 'px', 'em', '%' ),
2062 'default' => array(
2063 'top' => 0,
2064 'right' => 0,
2065 'bottom' => 0,
2066 'left' => 0,
2067 'unit' => 'px',
2068 ),
2069 'selectors' => array(
2070 '{{WRAPPER}} .premium-pricing-icon-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2071 ),
2072 )
2073 );
2074
2075 $this->add_responsive_control(
2076 'premium_pricing_icon_margin',
2077 array(
2078 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2079 'type' => Controls_Manager::DIMENSIONS,
2080 'size_units' => array( 'px', 'em', '%' ),
2081 'default' => array(
2082 'top' => 50,
2083 'right' => 0,
2084 'bottom' => 20,
2085 'left' => 0,
2086 'unit' => 'px',
2087 ),
2088 'selectors' => array(
2089 '{{WRAPPER}} .premium-pricing-icon-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2090 ),
2091 )
2092 );
2093
2094 $this->end_controls_section();
2095 }
2096
2097 private function add_title_style_controls() {
2098 $this->start_controls_section(
2099 'premium_pricing_title_style_settings',
2100 array(
2101 'label' => __( 'Title', 'premium-addons-for-elementor' ),
2102 'tab' => Controls_Manager::TAB_STYLE,
2103 'condition' => array(
2104 'premium_pricing_table_title_switcher' => 'yes',
2105 ),
2106 )
2107 );
2108
2109 $this->add_control(
2110 'premium_pricing_title_color',
2111 array(
2112 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2113 'type' => Controls_Manager::COLOR,
2114 'global' => array(
2115 'default' => Global_Colors::COLOR_PRIMARY,
2116 ),
2117 'selectors' => array(
2118 '{{WRAPPER}} .premium-pricing-table-title' => 'color: {{VALUE}};',
2119 ),
2120 )
2121 );
2122
2123 $this->add_group_control(
2124 Group_Control_Typography::get_type(),
2125 array(
2126 'name' => 'title_typo',
2127 'global' => array(
2128 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2129 ),
2130 'selector' => '{{WRAPPER}} .premium-pricing-table-title',
2131 )
2132 );
2133
2134 $this->add_group_control(
2135 Premium_Background::get_type(),
2136 array(
2137 'name' => 'premium_pricing_table_title_background',
2138 'types' => array( 'classic', 'gradient' ),
2139 'selector' => '{{WRAPPER}} .premium-pricing-table-title',
2140 )
2141 );
2142
2143 $this->add_responsive_control(
2144 'premium_pricing_title_padding',
2145 array(
2146 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2147 'type' => Controls_Manager::DIMENSIONS,
2148 'size_units' => array( 'px', 'em', '%' ),
2149 'selectors' => array(
2150 '{{WRAPPER}} .premium-pricing-table-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2151 ),
2152 )
2153 );
2154
2155 $this->add_responsive_control(
2156 'premium_pricing_title_margin',
2157 array(
2158 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2159 'type' => Controls_Manager::DIMENSIONS,
2160 'size_units' => array( 'px', 'em', '%' ),
2161 'selectors' => array(
2162 '{{WRAPPER}} .premium-pricing-table-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2163 ),
2164 )
2165 );
2166
2167 $this->end_controls_section();
2168 }
2169
2170 private function add_price_style_controls() {
2171
2172 $this->start_controls_section(
2173 'premium_pricing_price_style_settings',
2174 array(
2175 'label' => __( 'Price', 'premium-addons-for-elementor' ),
2176 'tab' => Controls_Manager::TAB_STYLE,
2177 'condition' => array(
2178 'premium_pricing_table_price_switcher' => 'yes',
2179 ),
2180 )
2181 );
2182
2183 $this->add_control(
2184 'premium_pricing_slashed_price_heading',
2185 array(
2186 'label' => __( 'Slashed Price', 'premium-addons-for-elementor' ),
2187 'type' => Controls_Manager::HEADING,
2188 )
2189 );
2190
2191 $this->add_control(
2192 'premium_pricing_slashed_price_color',
2193 array(
2194 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2195 'type' => Controls_Manager::COLOR,
2196 'global' => array(
2197 'default' => Global_Colors::COLOR_PRIMARY,
2198 ),
2199 'selectors' => array(
2200 '{{WRAPPER}} .premium-pricing-slashed-price-value' => 'color: {{VALUE}};',
2201 ),
2202 )
2203 );
2204
2205 $this->add_group_control(
2206 Group_Control_Typography::get_type(),
2207 array(
2208 'name' => 'slashed_price_typo',
2209 'global' => array(
2210 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2211 ),
2212 'selector' => '{{WRAPPER}} .premium-pricing-slashed-price-value',
2213 'condition' => array(
2214 'price_effects!' => 'effect-1',
2215 ),
2216 )
2217 );
2218
2219 $this->add_responsive_control(
2220 'premium_pricing_slashed_price_margin',
2221 array(
2222 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2223 'type' => Controls_Manager::DIMENSIONS,
2224 'size_units' => array( 'px', 'em', '%' ),
2225 'selectors' => array(
2226 '{{WRAPPER}} .premium-pricing--slashed-price-value' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2227 ),
2228 'condition' => array(
2229 'price_effects!' => 'effect-1',
2230 ),
2231 )
2232 );
2233
2234 $this->add_control(
2235 'premium_pricing_currency_heading',
2236 array(
2237 'label' => __( 'Currency', 'premium-addons-for-elementor' ),
2238 'type' => Controls_Manager::HEADING,
2239 'separator' => 'before',
2240 )
2241 );
2242
2243 $this->add_control(
2244 'premium_pricing_currency_color',
2245 array(
2246 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2247 'type' => Controls_Manager::COLOR,
2248 'global' => array(
2249 'default' => Global_Colors::COLOR_PRIMARY,
2250 ),
2251 'selectors' => array(
2252 '{{WRAPPER}} .premium-pricing-price-currency' => 'color: {{VALUE}};',
2253 ),
2254 )
2255 );
2256
2257 $this->add_group_control(
2258 Group_Control_Typography::get_type(),
2259 array(
2260 'label' => __( 'Typography', 'premium-addons-for-elementor' ),
2261 'name' => 'currency_typo',
2262 'global' => array(
2263 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2264 ),
2265 'selector' => '{{WRAPPER}} .premium-pricing-price-currency',
2266 'condition' => array(
2267 'price_effects!' => 'effect-1',
2268 ),
2269 )
2270 );
2271
2272 $this->add_responsive_control(
2273 'premium_pricing_currency_align',
2274 array(
2275 'label' => __( 'Vertical Align', 'premium-addons-for-elementor' ),
2276 'type' => Controls_Manager::CHOOSE,
2277 'options' => array(
2278 'top' => array(
2279 'title' => __( 'Top', 'premium-addons-for-elementor' ),
2280 'icon' => 'eicon-arrow-up',
2281 ),
2282 'unset' => array(
2283 'title' => __( 'Unset', 'premium-addons-for-elementor' ),
2284 'icon' => 'eicon-text-align-justify',
2285 ),
2286 'bottom' => array(
2287 'title' => __( 'Bottom', 'premium-addons-for-elementor' ),
2288 'icon' => 'eicon-arrow-down',
2289 ),
2290 ),
2291 'default' => 'unset',
2292 'toggle' => false,
2293 'selectors_dictionary' => array(
2294 'top' => 'flex-start',
2295 'unset' => 'unset',
2296 'bottom' => 'flex-end',
2297 ),
2298 'selectors' => array(
2299 '{{WRAPPER}} .premium-pricing-price-currency' => 'align-self: {{VALUE}};',
2300 ),
2301 'label_block' => false,
2302 'condition' => array(
2303 'price_effects!' => 'effect-1',
2304 ),
2305 )
2306 );
2307
2308 $this->add_responsive_control(
2309 'premium_pricing_currency_margin',
2310 array(
2311 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2312 'type' => Controls_Manager::DIMENSIONS,
2313 'size_units' => array( 'px', 'em', '%' ),
2314 'selectors' => array(
2315 '{{WRAPPER}} .premium-pricing-price-currency' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2316 'separator' => 'after',
2317 ),
2318 'condition' => array(
2319 'price_effects!' => 'effect-1',
2320 ),
2321 )
2322 );
2323
2324 $this->add_control(
2325 'premium_pricing_price_heading',
2326 array(
2327 'label' => __( 'Price', 'premium-addons-for-elementor' ),
2328 'type' => Controls_Manager::HEADING,
2329 'separator' => 'before',
2330 )
2331 );
2332
2333 $this->add_control(
2334 'premium_pricing_price_color',
2335 array(
2336 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2337 'type' => Controls_Manager::COLOR,
2338 'global' => array(
2339 'default' => Global_Colors::COLOR_PRIMARY,
2340 ),
2341 'selectors' => array(
2342 '{{WRAPPER}} .premium-pricing-price-value' => 'color: {{VALUE}};',
2343 ),
2344 )
2345 );
2346
2347 $this->add_group_control(
2348 Group_Control_Typography::get_type(),
2349 array(
2350 'label' => __( 'Typography', 'premium-addons-for-elementor' ),
2351 'name' => 'price_typo',
2352 'global' => array(
2353 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2354 ),
2355 'selector' => '{{WRAPPER}} .premium-pricing-price-value ,
2356 {{WRAPPER}}.pa-bt-effect__effect-1 .premium-pricing-price-value ,
2357 {{WRAPPER}}.pa-bt-effect__effect-1 .premium-pricing-price-currency ,
2358 {{WRAPPER}}.pa-bt-effect__effect-1 .premium-pricing-slashed-price-value ',
2359 )
2360 );
2361
2362 $this->add_control(
2363 'pa_price_background_color',
2364 array(
2365 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
2366 'type' => Controls_Manager::COLOR,
2367 'global' => array(
2368 'default' => Global_Colors::COLOR_TEXT,
2369 ),
2370 'selectors' => array(
2371 '{{WRAPPER}} .premium-pricing-reveal-wrapper .premium-pricing-actual-wrapper' => 'background-color: {{VALUE}};',
2372 ),
2373 'condition' => array(
2374 'price_effects' => 'effect-1',
2375 ),
2376 )
2377 );
2378
2379 $this->add_control(
2380 'pa_price_border_radius',
2381 array(
2382 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2383 'type' => Controls_Manager::DIMENSIONS,
2384 'size_units' => array( 'px', 'em', '%', 'custom' ),
2385 'selectors' => array(
2386 '{{WRAPPER}} .premium-pricing-reveal-wrapper.premium-pricing-actual-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2387 ),
2388 'condition' => array(
2389 'price_effects' => 'effect-1',
2390 ),
2391 )
2392 );
2393
2394 $this->add_responsive_control(
2395 'premium_pricing_price_margin',
2396 array(
2397 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2398 'type' => Controls_Manager::DIMENSIONS,
2399 'size_units' => array( 'px', 'em', '%' ),
2400 'selectors' => array(
2401 '{{WRAPPER}} .premium-pricing-price-value ' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2402 ),
2403 'condition' => array(
2404 'price_effects!' => 'effect-1',
2405 ),
2406 )
2407 );
2408
2409 $this->add_responsive_control(
2410 'pa_pricing_price_reveal_padding',
2411 array(
2412 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2413 'type' => Controls_Manager::DIMENSIONS,
2414 'size_units' => array( 'px', 'em', '%' ),
2415 'selectors' => array(
2416 '{{WRAPPER}} .premium-pricing-reveal-wrapper .premium-pricing-actual-wrapper, {{WRAPPER}} .premium-pricing-slashed-price-value ' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2417 ),
2418 'condition' => array(
2419 'price_effects' => 'effect-1',
2420 ),
2421 )
2422 );
2423
2424 $this->add_control(
2425 'premium_pricing_sep_heading',
2426 array(
2427 'label' => __( 'Divider', 'premium-addons-for-elementor' ),
2428 'type' => Controls_Manager::HEADING,
2429 'separator' => 'before',
2430 )
2431 );
2432
2433 $this->add_control(
2434 'premium_pricing_sep_color',
2435 array(
2436 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2437 'type' => Controls_Manager::COLOR,
2438 'global' => array(
2439 'default' => Global_Colors::COLOR_PRIMARY,
2440 ),
2441 'selectors' => array(
2442 '{{WRAPPER}} .premium-pricing-price-separator' => 'color: {{VALUE}};',
2443 ),
2444 )
2445 );
2446
2447 $this->add_group_control(
2448 Group_Control_Typography::get_type(),
2449 array(
2450 'label' => __( 'Typography', 'premium-addons-for-elementor' ),
2451 'name' => 'separator_typo',
2452 'global' => array(
2453 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2454 ),
2455 'selector' => '{{WRAPPER}} .premium-pricing-price-separator',
2456 )
2457 );
2458
2459 $this->add_responsive_control(
2460 'premium_pricing_sep_margin',
2461 array(
2462 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2463 'type' => Controls_Manager::DIMENSIONS,
2464 'size_units' => array( 'px', 'em', '%' ),
2465 'default' => array(
2466 'top' => 0,
2467 'right' => 0,
2468 'bottom' => 20,
2469 'left' => 0,
2470 'unit' => 'px',
2471 ),
2472 'selectors' => array(
2473 '{{WRAPPER}} .premium-pricing-price-separator' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2474 ),
2475 )
2476 );
2477
2478 $this->add_control(
2479 'premium_pricing_dur_heading',
2480 array(
2481 'label' => __( 'Duration', 'premium-addons-for-elementor' ),
2482 'type' => Controls_Manager::HEADING,
2483 'separator' => 'before',
2484 )
2485 );
2486
2487 $this->add_control(
2488 'premium_pricing_dur_color',
2489 array(
2490 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2491 'type' => Controls_Manager::COLOR,
2492 'global' => array(
2493 'default' => Global_Colors::COLOR_PRIMARY,
2494 ),
2495 'selectors' => array(
2496 '{{WRAPPER}} .premium-pricing-price-duration' => 'color: {{VALUE}};',
2497 ),
2498 )
2499 );
2500
2501 $this->add_group_control(
2502 Group_Control_Typography::get_type(),
2503 array(
2504 'label' => __( 'Typography', 'premium-addons-for-elementor' ),
2505 'name' => 'duration_typo',
2506 'global' => array(
2507 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2508 ),
2509 'selector' => '{{WRAPPER}} .premium-pricing-price-duration',
2510 )
2511 );
2512
2513 $this->add_responsive_control(
2514 'premium_pricing_dur_margin',
2515 array(
2516 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2517 'type' => Controls_Manager::DIMENSIONS,
2518 'size_units' => array( 'px', 'em', '%' ),
2519 'selectors' => array(
2520 '{{WRAPPER}} .premium-pricing-price-duration' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2521 'separator' => 'after',
2522 ),
2523 )
2524 );
2525
2526 $this->add_control(
2527 'premium_pricing_price_container_heading',
2528 array(
2529 'label' => __( 'Container', 'premium-addons-for-elementor' ),
2530 'type' => Controls_Manager::HEADING,
2531 'separator' => 'before',
2532 )
2533 );
2534
2535 /*Price Background*/
2536 $this->add_group_control(
2537 Premium_Background::get_type(),
2538 array(
2539 'name' => 'premium_pricing_table_price_background',
2540 'types' => array( 'classic', 'gradient' ),
2541 'selector' => '{{WRAPPER}} .premium-pricing-price-container',
2542 )
2543 );
2544
2545 $this->add_control(
2546 'price_lq_effect',
2547 array(
2548 'label' => __( 'Liquid Glass Effect', 'premium-addons-for-elementor' ),
2549 'type' => Controls_Manager::SELECT,
2550 'description' => sprintf(
2551 /* translators: 1: `<a>` opening tag, 2: `</a>` closing tag. */
2552 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' ),
2553 '<a href="https://premiumaddons.com/liquid-glass/" target="_blank">',
2554 '</a>'
2555 ),
2556 'options' => array(
2557 'none' => __( 'None', 'premium-addons-for-elementor' ),
2558 'glass1' => __( 'Preset 01', 'premium-addons-for-elementor' ),
2559 'glass2' => __( 'Preset 02', 'premium-addons-for-elementor' ),
2560 'glass3' => apply_filters( 'pa_pro_label', __( 'Preset 03 (Pro)', 'premium-addons-for-elementor' ) ),
2561 'glass4' => apply_filters( 'pa_pro_label', __( 'Preset 04 (Pro)', 'premium-addons-for-elementor' ) ),
2562 'glass5' => apply_filters( 'pa_pro_label', __( 'Preset 05 (Pro)', 'premium-addons-for-elementor' ) ),
2563 'glass6' => apply_filters( 'pa_pro_label', __( 'Preset 06 (Pro)', 'premium-addons-for-elementor' ) ),
2564 ),
2565 'default' => 'none',
2566 'label_block' => true,
2567 )
2568 );
2569
2570 $this->add_group_control(
2571 Group_Control_Border::get_type(),
2572 array(
2573 'name' => 'price_cont_border',
2574 'selector' => '{{WRAPPER}} .premium-pricing-price-container',
2575 )
2576 );
2577
2578 $this->add_responsive_control(
2579 'premium_pricing_price_padding',
2580 array(
2581 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2582 'type' => Controls_Manager::DIMENSIONS,
2583 'size_units' => array( 'px', 'em', '%' ),
2584 'selectors' => array(
2585 '{{WRAPPER}} .premium-pricing-price-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2586 ),
2587 )
2588 );
2589
2590 $this->add_responsive_control(
2591 'premium_pricing_price_container_margin',
2592 array(
2593 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2594 'type' => Controls_Manager::DIMENSIONS,
2595 'size_units' => array( 'px', 'em', '%' ),
2596 'selectors' => array(
2597 '{{WRAPPER}} .premium-pricing-price-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2598 ),
2599 )
2600 );
2601
2602 $this->end_controls_section();
2603 }
2604
2605 private function add_feature_list_style_controls() {
2606 $this->start_controls_section(
2607 'premium_pricing_list_style_settings',
2608 array(
2609 'label' => __( 'Features', 'premium-addons-for-elementor' ),
2610 'tab' => Controls_Manager::TAB_STYLE,
2611 'condition' => array(
2612 'premium_pricing_table_list_switcher' => 'yes',
2613 ),
2614 )
2615 );
2616
2617 $this->add_control(
2618 'premium_pricing_features_text_heading',
2619 array(
2620 'label' => __( 'Text', 'premium-addons-for-elementor' ),
2621 'type' => Controls_Manager::HEADING,
2622 )
2623 );
2624
2625 $this->add_control(
2626 'premium_pricing_list_text_color',
2627 array(
2628 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2629 'type' => Controls_Manager::COLOR,
2630 'global' => array(
2631 'default' => Global_Colors::COLOR_SECONDARY,
2632 ),
2633 'selectors' => array(
2634 '{{WRAPPER}} .premium-pricing-list-span' => 'color: {{VALUE}};',
2635 ),
2636 )
2637 );
2638
2639 $this->add_group_control(
2640 Group_Control_Typography::get_type(),
2641 array(
2642 'name' => 'list_typo',
2643 'global' => array(
2644 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2645 ),
2646 'selector' => '{{WRAPPER}} .premium-pricing-list .premium-pricing-list-span',
2647 )
2648 );
2649
2650 $this->add_control(
2651 'premium_pricing_features_icon_heading',
2652 array(
2653 'label' => __( 'Icon', 'premium-addons-for-elementor' ),
2654 'type' => Controls_Manager::HEADING,
2655 'separator' => 'before',
2656 )
2657 );
2658
2659 $this->add_control(
2660 'premium_pricing_list_icon_color',
2661 array(
2662 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2663 'type' => Controls_Manager::COLOR,
2664 'global' => array(
2665 'default' => Global_Colors::COLOR_PRIMARY,
2666 ),
2667 'selectors' => array(
2668 '{{WRAPPER}} .premium-pricing-feature-icon' => 'color: {{VALUE}}',
2669 '{{WRAPPER}} .premium-pricing-list-item .premium-drawable-icon *, {{WRAPPER}} .premium-pricing-list-item svg:not([class*="premium-"])' => 'fill: {{VALUE}};',
2670 ),
2671 )
2672 );
2673
2674 $this->add_responsive_control(
2675 'premium_pricing_list_icon_size',
2676 array(
2677 'label' => __( 'Size', 'premium-addons-for-elementor' ),
2678 'type' => Controls_Manager::SLIDER,
2679 'default' => array(
2680 'unit' => 'px',
2681 'size' => 30,
2682 ),
2683 'selectors' => array(
2684 '{{WRAPPER}} .premium-pricing-list i' => 'font-size: {{SIZE}}px',
2685 '{{WRAPPER}} .premium-pricing-list svg, {{WRAPPER}} .premium-pricing-list img' => 'width: {{SIZE}}px !important; height: {{SIZE}}px !important',
2686 ),
2687 )
2688 );
2689
2690 $features_spacing = is_rtl() ? 'left' : 'right';
2691
2692 $this->add_responsive_control(
2693 'premium_pricing_list_icon_spacing',
2694 array(
2695 'label' => __( 'Spacing', 'premium-addons-for-elementor' ),
2696 'type' => Controls_Manager::SLIDER,
2697 'default' => array(
2698 'size' => 5,
2699 ),
2700 'selectors' => array(
2701 '{{WRAPPER}} .premium-pricing-feature-icon, {{WRAPPER}} .premium-pricing-list-item > svg' => 'margin-' . $features_spacing . ': {{SIZE}}px',
2702 ),
2703 )
2704 );
2705
2706 $this->add_responsive_control(
2707 'premium_pricing_list_item_margin',
2708 array(
2709 'label' => __( 'Vertical Spacing', 'premium-addons-for-elementor' ),
2710 'type' => Controls_Manager::SLIDER,
2711 'selectors' => array(
2712 '{{WRAPPER}} .premium-pricing-list .premium-pricing-list-item' => 'margin-bottom: {{SIZE}}px;',
2713 ),
2714 'separator' => 'after',
2715 )
2716 );
2717
2718 $this->add_control(
2719 'premium_pricing_features_container_heading',
2720 array(
2721 'label' => __( 'Container', 'premium-addons-for-elementor' ),
2722 'type' => Controls_Manager::HEADING,
2723 )
2724 );
2725
2726 $this->add_group_control(
2727 Premium_Background::get_type(),
2728 array(
2729 'name' => 'premium_pricing_list_background',
2730 'types' => array( 'classic', 'gradient' ),
2731 'selector' => '{{WRAPPER}} .premium-pricing-list',
2732 )
2733 );
2734
2735 /*List Border*/
2736 $this->add_group_control(
2737 Group_Control_Border::get_type(),
2738 array(
2739 'name' => 'premium_pricing_list_border',
2740 'selector' => '{{WRAPPER}} .premium-pricing-list',
2741 )
2742 );
2743
2744 /*List Border Radius*/
2745 $this->add_control(
2746 'premium_pricing_list_border_radius',
2747 array(
2748 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
2749 'type' => Controls_Manager::SLIDER,
2750 'size_units' => array( 'px', 'em', '%' ),
2751 'selectors' => array(
2752 '{{WRAPPER}} .premium-pricing-list' => 'border-radius: {{SIZE}}{{UNIT}};',
2753 ),
2754 )
2755 );
2756
2757 /*List Padding*/
2758 $this->add_responsive_control(
2759 'premium_pricing_list_padding',
2760 array(
2761 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2762 'type' => Controls_Manager::DIMENSIONS,
2763 'size_units' => array( 'px', 'em', '%' ),
2764 'selectors' => array(
2765 '{{WRAPPER}} .premium-pricing-list' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2766 ),
2767 )
2768 );
2769
2770 /*List Margin*/
2771 $this->add_responsive_control(
2772 'premium_pricing_list_margin',
2773 array(
2774 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2775 'type' => Controls_Manager::DIMENSIONS,
2776 'size_units' => array( 'px', 'em', '%' ),
2777 'default' => array(
2778 'top' => 30,
2779 'right' => 0,
2780 'bottom' => 30,
2781 'left' => 0,
2782 'unit' => 'px',
2783 ),
2784 'selectors' => array(
2785 '{{WRAPPER}} .premium-pricing-list' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2786 ),
2787 )
2788 );
2789
2790 $this->end_controls_section();
2791 }
2792
2793 private function add_tooltips_style_controls() {
2794 $this->start_controls_section(
2795 'tooltips_style',
2796 array(
2797 'label' => __( 'Tooltips', 'premium-addons-for-elementor' ),
2798 'tab' => Controls_Manager::TAB_STYLE,
2799 'condition' => array(
2800 'premium_pricing_table_list_switcher' => 'yes',
2801 ),
2802 )
2803 );
2804
2805 $this->add_responsive_control(
2806 'tooltips_align',
2807 array(
2808 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
2809 'type' => Controls_Manager::CHOOSE,
2810 'options' => array(
2811 'left' => array(
2812 'title' => __( 'Left', 'premium-addons-for-elementor' ),
2813 'icon' => 'eicon-text-align-left',
2814 ),
2815 'center' => array(
2816 'title' => __( 'Center', 'premium-addons-for-elementor' ),
2817 'icon' => 'eicon-text-align-center',
2818 ),
2819 'right' => array(
2820 'title' => __( 'Right', 'premium-addons-for-elementor' ),
2821 'icon' => 'eicon-text-align-right',
2822 ),
2823 ),
2824 'selectors' => array(
2825 '{{WRAPPER}} .premium-pricing-list-tooltip' => 'text-align: {{VALUE}}',
2826 ),
2827 )
2828 );
2829
2830 $this->add_responsive_control(
2831 'tooltips_width',
2832 array(
2833 'label' => __( 'Width', 'premium-addons-for-elementor' ),
2834 'type' => Controls_Manager::SLIDER,
2835 'range' => array(
2836 'px' => array(
2837 'min' => 1,
2838 'max' => 400,
2839 ),
2840 ),
2841 'selectors' => array(
2842 '{{WRAPPER}} .premium-pricing-list-tooltip' => 'min-width: {{SIZE}}px;',
2843 ),
2844 )
2845 );
2846
2847 $this->add_control(
2848 'tooltips_color',
2849 array(
2850 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2851 'type' => Controls_Manager::COLOR,
2852 'selectors' => array(
2853 '{{WRAPPER}} .premium-pricing-list-tooltip' => 'color: {{VALUE}};',
2854 ),
2855 )
2856 );
2857
2858 $this->add_group_control(
2859 Group_Control_Typography::get_type(),
2860 array(
2861 'name' => 'tooltips_typo',
2862 'global' => array(
2863 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2864 ),
2865 'selector' => '{{WRAPPER}} .premium-pricing-list-tooltip',
2866 )
2867 );
2868
2869 $this->add_control(
2870 'tooltips_background_color',
2871 array(
2872 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
2873 'type' => Controls_Manager::COLOR,
2874 'selectors' => array(
2875 '{{WRAPPER}} .premium-pricing-list-tooltip' => 'background-color: {{VALUE}};',
2876 ),
2877 )
2878 );
2879
2880 $this->add_control(
2881 'tooltips_border_color',
2882 array(
2883 'label' => __( 'Border Color', 'premium-addons-for-elementor' ),
2884 'type' => Controls_Manager::COLOR,
2885 'selectors' => array(
2886 '{{WRAPPER}} .list-item-tooltip' => 'border-color: {{VALUE}};',
2887 ),
2888 )
2889 );
2890
2891 $this->end_controls_section();
2892 }
2893
2894 private function add_description_style_controls() {
2895 $this->start_controls_section(
2896 'premium_pricing_description_style_settings',
2897 array(
2898 'label' => __( 'Description', 'premium-addons-for-elementor' ),
2899 'tab' => Controls_Manager::TAB_STYLE,
2900 'condition' => array(
2901 'premium_pricing_table_description_switcher' => 'yes',
2902 ),
2903 )
2904 );
2905
2906 $this->add_control(
2907 'premium_pricing_desc_text_heading',
2908 array(
2909 'label' => __( 'Text', 'premium-addons-for-elementor' ),
2910 'type' => Controls_Manager::HEADING,
2911 )
2912 );
2913
2914 $this->add_control(
2915 'premium_pricing_desc_color',
2916 array(
2917 'label' => __( 'Color', 'premium-addons-for-elementor' ),
2918 'type' => Controls_Manager::COLOR,
2919 'global' => array(
2920 'default' => Global_Colors::COLOR_SECONDARY,
2921 ),
2922 'selectors' => array(
2923 '{{WRAPPER}} .premium-pricing-description-container' => 'color: {{VALUE}};',
2924 ),
2925 )
2926 );
2927
2928 $this->add_group_control(
2929 Group_Control_Typography::get_type(),
2930 array(
2931 'name' => 'description_typo',
2932 'global' => array(
2933 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
2934 ),
2935 'selector' => '{{WRAPPER}} .premium-pricing-description-container',
2936 )
2937 );
2938
2939 $this->add_control(
2940 'premium_pricing_desc_container_heading',
2941 array(
2942 'label' => __( 'Container', 'premium-addons-for-elementor' ),
2943 'type' => Controls_Manager::HEADING,
2944 )
2945 );
2946
2947 $this->add_group_control(
2948 Premium_Background::get_type(),
2949 array(
2950 'name' => 'premium_pricing_table_desc_background',
2951 'types' => array( 'classic', 'gradient' ),
2952 'selector' => '{{WRAPPER}} .premium-pricing-description-container',
2953 )
2954 );
2955
2956 $this->add_responsive_control(
2957 'premium_pricing_desc_margin',
2958 array(
2959 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
2960 'type' => Controls_Manager::DIMENSIONS,
2961 'size_units' => array( 'px', 'em', '%' ),
2962 'default' => array(
2963 'top' => 16,
2964 'right' => 0,
2965 'bottom' => 16,
2966 'left' => 0,
2967 'unit' => 'px',
2968 ),
2969 'selectors' => array(
2970 '{{WRAPPER}} .premium-pricing-description-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2971 ),
2972 )
2973 );
2974
2975 $this->add_responsive_control(
2976 'premium_pricing_desc_padding',
2977 array(
2978 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
2979 'type' => Controls_Manager::DIMENSIONS,
2980 'size_units' => array( 'px', 'em', '%' ),
2981 'selectors' => array(
2982 '{{WRAPPER}} .premium-pricing-description-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2983 ),
2984 )
2985 );
2986
2987 $this->end_controls_section();
2988 }
2989
2990 private function add_button_style_controls() {
2991 $this->start_controls_section(
2992 'premium_pricing_button_style_settings',
2993 array(
2994 'label' => __( 'Button', 'premium-addons-for-elementor' ),
2995 'tab' => Controls_Manager::TAB_STYLE,
2996 'condition' => array(
2997 'premium_pricing_table_button_switcher' => 'yes',
2998 ),
2999 )
3000 );
3001
3002 $this->add_group_control(
3003 Group_Control_Typography::get_type(),
3004 array(
3005 'name' => 'button_typo',
3006 'global' => array(
3007 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
3008 ),
3009 'selector' => '{{WRAPPER}} .premium-pricing-price-button',
3010 )
3011 );
3012
3013 $this->start_controls_tabs( 'premium_pricing_table_button_style_tabs' );
3014
3015 $this->start_controls_tab(
3016 'premium_pricing_table_button_style_normal',
3017 array(
3018 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
3019 )
3020 );
3021
3022 $this->add_control(
3023 'premium_pricing_button_color',
3024 array(
3025 'label' => __( 'Text Color', 'premium-addons-for-elementor' ),
3026 'type' => Controls_Manager::COLOR,
3027 'global' => array(
3028 'default' => Global_Colors::COLOR_SECONDARY,
3029 ),
3030 'selectors' => array(
3031 '{{WRAPPER}} .premium-pricing-price-button' => 'color: {{VALUE}};',
3032 ),
3033 )
3034 );
3035
3036 $this->add_group_control(
3037 Premium_Background::get_type(),
3038 array(
3039 'name' => 'premium_pricing_table_button_background',
3040 'types' => array( 'classic', 'gradient' ),
3041 'selector' => '{{WRAPPER}} .premium-pricing-price-button, {{WRAPPER}} .premium-button-style2-shutinhor:before , {{WRAPPER}} .premium-button-style2-shutinver:before , {{WRAPPER}} .premium-button-style5-radialin:before , {{WRAPPER}} .premium-button-style5-rectin:before',
3042 )
3043 );
3044
3045 $this->add_group_control(
3046 Group_Control_Border::get_type(),
3047 array(
3048 'name' => 'premium_pricing_table_button_border',
3049 'selector' => '{{WRAPPER}} .premium-pricing-price-button',
3050 )
3051 );
3052
3053 $this->add_control(
3054 'premium_pricing_table_box_button_radius',
3055 array(
3056 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
3057 'type' => Controls_Manager::SLIDER,
3058 'size_units' => array( 'px', 'em', '%' ),
3059 'selectors' => array(
3060 '{{WRAPPER}} .premium-pricing-price-button' => 'border-radius: {{SIZE}}{{UNIT}};',
3061 ),
3062 )
3063 );
3064
3065 $this->add_group_control(
3066 Group_Control_Box_Shadow::get_type(),
3067 array(
3068 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
3069 'name' => 'premium_pricing_table_button_box_shadow',
3070 'selector' => '{{WRAPPER}} .premium-pricing-price-button',
3071 )
3072 );
3073
3074 $this->add_responsive_control(
3075 'premium_pricing_button_margin',
3076 array(
3077 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
3078 'type' => Controls_Manager::DIMENSIONS,
3079 'size_units' => array( 'px', 'em', '%' ),
3080 'selectors' => array(
3081 '{{WRAPPER}} .premium-pricing-button-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3082 ),
3083 )
3084 );
3085
3086 $this->add_responsive_control(
3087 'premium_pricing_button_padding',
3088 array(
3089 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
3090 'type' => Controls_Manager::DIMENSIONS,
3091 'size_units' => array( 'px', 'em', '%' ),
3092 'default' => array(
3093 'top' => 20,
3094 'right' => 0,
3095 'bottom' => 20,
3096 'left' => 0,
3097 'unit' => 'px',
3098 ),
3099 'selectors' => array(
3100 '{{WRAPPER}} .premium-pricing-price-button, {{WRAPPER}} .premium-button-line6::after' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3101 ),
3102 )
3103 );
3104
3105 $this->end_controls_tab();
3106
3107 $this->start_controls_tab(
3108 'premium_pricing_table_button_style_hover',
3109 array(
3110 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
3111 )
3112 );
3113
3114 $this->add_control(
3115 'premium_pricing_button_hover_color',
3116 array(
3117 'label' => __( 'Color', 'premium-addons-for-elementor' ),
3118 'type' => Controls_Manager::COLOR,
3119 'global' => array(
3120 'default' => Global_Colors::COLOR_SECONDARY,
3121 ),
3122 'selectors' => array(
3123 '{{WRAPPER}} .premium-pricing-price-button:hover, {{WRAPPER}} .premium-button-line6::after' => 'color: {{VALUE}};',
3124 ),
3125 )
3126 );
3127
3128 $this->add_control(
3129 'underline_color',
3130 array(
3131 'label' => __( 'Line Color', 'premium-addons-for-elementor' ),
3132 'type' => Controls_Manager::COLOR,
3133 'global' => array(
3134 'default' => Global_Colors::COLOR_SECONDARY,
3135 ),
3136 'selectors' => array(
3137 '{{WRAPPER}} .premium-btn-svg' => 'stroke: {{VALUE}};',
3138 '{{WRAPPER}} .premium-button-line2::before, {{WRAPPER}} .premium-button-line4::before, {{WRAPPER}} .premium-button-line5::before, {{WRAPPER}} .premium-button-line5::after, {{WRAPPER}} .premium-button-line6::before, {{WRAPPER}} .premium-button-line7::before' => 'background-color: {{VALUE}};',
3139 ),
3140 'condition' => array(
3141 'premium_button_hover_effect' => 'style8',
3142 ),
3143 )
3144 );
3145
3146 $this->add_control(
3147 'first_layer_hover',
3148 array(
3149 'label' => __( 'Layer #1 Color', 'premium-addons-for-elementor' ),
3150 'type' => Controls_Manager::COLOR,
3151 'global' => array(
3152 'default' => Global_Colors::COLOR_SECONDARY,
3153 ),
3154 'selectors' => array(
3155 '{{WRAPPER}} .premium-button-style7 .premium-button-text-icon-wrapper:before' => 'background-color: {{VALUE}}',
3156 ),
3157 'condition' => array(
3158 'premium_button_hover_effect' => 'style7',
3159
3160 ),
3161 )
3162 );
3163
3164 $this->add_control(
3165 'second_layer_hover',
3166 array(
3167 'label' => __( 'Layer #2 Color', 'premium-addons-for-elementor' ),
3168 'type' => Controls_Manager::COLOR,
3169 'global' => array(
3170 'default' => Global_Colors::COLOR_TEXT,
3171 ),
3172 'selectors' => array(
3173 '{{WRAPPER}} .premium-button-style7 .premium-button-text-icon-wrapper:after' => 'background-color: {{VALUE}}',
3174 ),
3175 'condition' => array(
3176 'premium_button_hover_effect' => 'style7',
3177 ),
3178 )
3179 );
3180
3181 $this->add_group_control(
3182 Premium_Background::get_type(),
3183 array(
3184 'name' => 'premium_pricing_table_button_background_hover',
3185 'types' => array( 'classic', 'gradient' ),
3186 'selector' => '{{WRAPPER}} .premium-button-none:hover, {{WRAPPER}} .premium-button-style8:hover, {{WRAPPER}} .premium-button-style1:before, {{WRAPPER}} .premium-button-style2-shutouthor:before, {{WRAPPER}} .premium-button-style2-shutoutver:before, {{WRAPPER}} .premium-button-style2-shutinhor, {{WRAPPER}} .premium-button-style2-shutinver, {{WRAPPER}} .premium-button-style2-dshutinhor:before, {{WRAPPER}} .premium-button-style2-dshutinver:before, {{WRAPPER}} .premium-button-style2-scshutouthor:before, {{WRAPPER}} .premium-button-style2-scshutoutver:before, {{WRAPPER}} .premium-button-style5-radialin, {{WRAPPER}} .premium-button-style5-radialout:before, {{WRAPPER}} .premium-button-style5-rectin, {{WRAPPER}} .premium-button-style5-rectout:before, {{WRAPPER}} .premium-button-style6-bg, {{WRAPPER}} .premium-button-style6:before',
3187 'condition' => array(
3188 'premium_button_hover_effect!' => 'style7',
3189 ),
3190 ),
3191 );
3192
3193 $this->add_group_control(
3194 Group_Control_Border::get_type(),
3195 array(
3196 'name' => 'premium_pricing_table_button_border_hover',
3197 'selector' => '{{WRAPPER}} .premium-pricing-price-button:hover',
3198 )
3199 );
3200
3201 $this->add_control(
3202 'premium_pricing_table_button_border_radius_hover',
3203 array(
3204 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
3205 'type' => Controls_Manager::SLIDER,
3206 'size_units' => array( 'px', 'em', '%' ),
3207 'selectors' => array(
3208 '{{WRAPPER}} .premium-pricing-price-button:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
3209 ),
3210 )
3211 );
3212
3213 $this->add_group_control(
3214 Group_Control_Box_Shadow::get_type(),
3215 array(
3216 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
3217 'name' => 'premium_pricing_table_button_shadow_hover',
3218 'selector' => '{{WRAPPER}} .premium-pricing-price-button:hover',
3219 )
3220 );
3221
3222 $this->add_responsive_control(
3223 'premium_pricing_button_margin_hover',
3224 array(
3225 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
3226 'type' => Controls_Manager::DIMENSIONS,
3227 'size_units' => array( 'px', 'em', '%' ),
3228 'selectors' => array(
3229 '{{WRAPPER}} .premium-pricing-button-container:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3230 ),
3231 )
3232 );
3233
3234 $this->add_responsive_control(
3235 'premium_pricing_button_padding_hover',
3236 array(
3237 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
3238 'type' => Controls_Manager::DIMENSIONS,
3239 'default' => array(
3240 'top' => 20,
3241 'right' => 0,
3242 'bottom' => 20,
3243 'left' => 0,
3244 'unit' => 'px',
3245 ),
3246 'size_units' => array( 'px', 'em', '%' ),
3247 'selectors' => array(
3248 '{{WRAPPER}} .premium-pricing-price-button:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3249 ),
3250 )
3251 );
3252
3253 $this->end_controls_tab();
3254
3255 $this->end_controls_tabs();
3256
3257 $this->end_controls_section();
3258 }
3259
3260 private function add_ribbon_style_controls() {
3261 $this->start_controls_section(
3262 'premium_pricing_table_badge_style',
3263 array(
3264 'label' => __( 'Ribbon', 'premium-addons-for-elementor' ),
3265 'tab' => Controls_Manager::TAB_STYLE,
3266 'condition' => array(
3267 'premium_pricing_table_badge_switcher' => 'yes',
3268 ),
3269 )
3270 );
3271
3272 $this->add_control(
3273 'premium_pricing_badge_text_color',
3274 array(
3275 'label' => __( 'Color', 'premium-addons-for-elementor' ),
3276 'type' => Controls_Manager::COLOR,
3277 'global' => array(
3278 'default' => Global_Colors::COLOR_SECONDARY,
3279 ),
3280 'selectors' => array(
3281 '{{WRAPPER}} .premium-pricing-badge-container .corner span' => 'color: {{VALUE}};',
3282 ),
3283 )
3284 );
3285
3286 $this->add_group_control(
3287 Group_Control_Typography::get_type(),
3288 array(
3289 'name' => 'badge_text_typo',
3290 'global' => array(
3291 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
3292 ),
3293 'selector' => '{{WRAPPER}} .premium-pricing-badge-container .corner span',
3294 )
3295 );
3296
3297 $this->add_control(
3298 'premium_pricing_badge_left_color',
3299 array(
3300 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
3301 'type' => Controls_Manager::COLOR,
3302 'global' => array(
3303 'default' => Global_Colors::COLOR_PRIMARY,
3304 ),
3305 'selectors' => array(
3306 '{{WRAPPER}} .premium-badge-triangle.premium-badge-left .corner' => 'border-top-color: {{VALUE}}',
3307 '{{WRAPPER}} .premium-badge-triangle.premium-badge-right .corner' => 'border-right-color: {{VALUE}}',
3308 ),
3309 'condition' => array(
3310 'ribbon_type' => 'triangle',
3311 ),
3312 )
3313 );
3314
3315 $this->add_control(
3316 'ribbon_background',
3317 array(
3318 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
3319 'type' => Controls_Manager::COLOR,
3320 'global' => array(
3321 'default' => Global_Colors::COLOR_PRIMARY,
3322 ),
3323 'selectors' => array(
3324 '{{WRAPPER}} .premium-badge-circle, {{WRAPPER}} .premium-badge-stripe .corner, {{WRAPPER}} .premium-badge-flag .corner' => 'background-color: {{VALUE}}',
3325 '{{WRAPPER}} .premium-badge-flag.premium-badge-right .corner::before' => 'border-left: 8px solid {{VALUE}}',
3326 '{{WRAPPER}} .premium-badge-flag.premium-badge-left .corner::after' => 'border-right: 8px solid {{VALUE}}',
3327 ),
3328 'condition' => array(
3329 'ribbon_type!' => 'triangle',
3330 ),
3331 )
3332 );
3333
3334 $this->add_group_control(
3335 Group_Control_Box_Shadow::get_type(),
3336 array(
3337 'name' => 'ribbon_shadow',
3338 'selector' => '{{WRAPPER}} .premium-badge-circle, {{WRAPPER}} .premium-badge-stripe .corner, {{WRAPPER}} .premium-badge-flag .corner',
3339 'condition' => array(
3340 'ribbon_type!' => 'triangle',
3341 ),
3342 )
3343 );
3344
3345 $this->end_controls_section();
3346 }
3347
3348 private function add_box_style_controls() {
3349 $this->start_controls_section(
3350 'premium_pricing_box_style_settings',
3351 array(
3352 'label' => __( 'Box Settings', 'premium-addons-for-elementor' ),
3353 'tab' => Controls_Manager::TAB_STYLE,
3354 )
3355 );
3356
3357 $this->start_controls_tabs( 'premium_pricing_table_box_style_tabs' );
3358
3359 $this->start_controls_tab(
3360 'premium_pricing_table_box_style_normal',
3361 array(
3362 'label' => __( 'Normal', 'premium-addons-for-elementor' ),
3363 )
3364 );
3365
3366 $this->add_group_control(
3367 Premium_Background::get_type(),
3368 array(
3369 'name' => 'premium_pricing_table_box_background',
3370 'types' => array( 'classic', 'gradient' ),
3371 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
3372 )
3373 );
3374
3375 $this->add_group_control(
3376 Group_Control_Border::get_type(),
3377 array(
3378 'name' => 'premium_pricing_table_box_border',
3379 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
3380 )
3381 );
3382
3383 $this->add_control(
3384 'premium_pricing_table_box_border_radius',
3385 array(
3386 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
3387 'type' => Controls_Manager::SLIDER,
3388 'size_units' => array( 'px', '%', 'em' ),
3389 'selectors' => array(
3390 '{{WRAPPER}} .premium-pricing-table-container' => 'border-radius: {{SIZE}}{{UNIT}};',
3391 ),
3392 'condition' => array(
3393 'table_adv_radius!' => 'yes',
3394 ),
3395 )
3396 );
3397
3398 $this->add_control(
3399 'table_adv_radius',
3400 array(
3401 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
3402 'type' => Controls_Manager::SWITCHER,
3403 '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>',
3404 )
3405 );
3406
3407 $this->add_control(
3408 'table_adv_radius_value',
3409 array(
3410 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
3411 'type' => Controls_Manager::TEXT,
3412 'dynamic' => array( 'active' => true ),
3413 'selectors' => array(
3414 '{{WRAPPER}} .premium-pricing-table-container' => 'border-radius: {{VALUE}};',
3415 ),
3416 'condition' => array(
3417 'table_adv_radius' => 'yes',
3418 ),
3419 'ai' => array(
3420 'active' => false,
3421 ),
3422 )
3423 );
3424
3425 $this->add_group_control(
3426 Group_Control_Box_Shadow::get_type(),
3427 array(
3428 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
3429 'name' => 'premium_pricing_table_box_shadow',
3430 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
3431 )
3432 );
3433
3434 $this->add_responsive_control(
3435 'premium_pricing_box_margin',
3436 array(
3437 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
3438 'type' => Controls_Manager::DIMENSIONS,
3439 'size_units' => array( 'px', 'em', '%' ),
3440 'selectors' => array(
3441 '{{WRAPPER}} .premium-pricing-table-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3442 ),
3443 )
3444 );
3445
3446 $this->add_responsive_control(
3447 'premium_pricing_box_padding',
3448 array(
3449 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
3450 'type' => Controls_Manager::DIMENSIONS,
3451 'size_units' => array( 'px', 'em', '%' ),
3452 'default' => array(
3453 'top' => 40,
3454 'right' => 0,
3455 'bottom' => 0,
3456 'left' => 0,
3457 'unit' => 'px',
3458 ),
3459 'selectors' => array(
3460 '{{WRAPPER}} .premium-pricing-table-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3461 ),
3462 )
3463 );
3464
3465 $this->end_controls_tab();
3466
3467 $this->start_controls_tab(
3468 'premium_pricing_table_box_style_hover',
3469 array(
3470 'label' => __( 'Hover', 'premium-addons-for-elementor' ),
3471 )
3472 );
3473
3474 $this->add_group_control(
3475 Premium_Background::get_type(),
3476 array(
3477 'name' => 'premium_pricing_table_box_background_hover',
3478 'types' => array( 'classic', 'gradient' ),
3479 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
3480 )
3481 );
3482
3483 $this->add_group_control(
3484 Group_Control_Border::get_type(),
3485 array(
3486 'name' => 'premium_pricing_table_box_border_hover',
3487 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
3488 )
3489 );
3490
3491 $this->add_control(
3492 'premium_pricing_table_box_border_radius_hover',
3493 array(
3494 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
3495 'type' => Controls_Manager::SLIDER,
3496 'size_units' => array( 'px', 'em', '%' ),
3497 'selectors' => array(
3498 '{{WRAPPER}} .premium-pricing-table-container:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
3499 ),
3500 'condition' => array(
3501 'table_hover_adv_radius' => 'yes',
3502 ),
3503 )
3504 );
3505
3506 $this->add_control(
3507 'table_hover_adv_radius',
3508 array(
3509 'label' => __( 'Advanced Border Radius', 'premium-addons-for-elementor' ),
3510 'type' => Controls_Manager::SWITCHER,
3511 '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>',
3512 )
3513 );
3514
3515 $this->add_control(
3516 'table_hover_adv_radius_value',
3517 array(
3518 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
3519 'type' => Controls_Manager::TEXT,
3520 'dynamic' => array( 'active' => true ),
3521 'selectors' => array(
3522 '{{WRAPPER}} .premium-pricing-table-container:hover' => 'border-radius: {{VALUE}};',
3523 ),
3524 'condition' => array(
3525 'table_hover_adv_radius' => 'yes',
3526 ),
3527 'ai' => array(
3528 'active' => false,
3529 ),
3530 )
3531 );
3532
3533 $this->add_group_control(
3534 Group_Control_Box_Shadow::get_type(),
3535 array(
3536 'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
3537 'name' => 'premium_pricing_table_box_shadow_hover',
3538 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
3539 )
3540 );
3541
3542 $this->add_responsive_control(
3543 'premium_pricing_box_margin_hover',
3544 array(
3545 'label' => __( 'Margin', 'premium-addons-for-elementor' ),
3546 'type' => Controls_Manager::DIMENSIONS,
3547 'size_units' => array( 'px', 'em', '%' ),
3548 'selectors' => array(
3549 '{{WRAPPER}} .premium-pricing-table-container:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3550 ),
3551 )
3552 );
3553
3554 $this->add_responsive_control(
3555 'premium_pricing_box_padding_hover',
3556 array(
3557 'label' => __( 'Padding', 'premium-addons-for-elementor' ),
3558 'type' => Controls_Manager::DIMENSIONS,
3559 'size_units' => array( 'px', 'em', '%' ),
3560 'default' => array(
3561 'top' => 40,
3562 'right' => 0,
3563 'bottom' => 0,
3564 'left' => 0,
3565 'unit' => 'px',
3566 ),
3567 'selectors' => array(
3568 '{{WRAPPER}} .premium-pricing-table-container:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3569 ),
3570 )
3571 );
3572
3573 $this->end_controls_tab();
3574
3575 $this->end_controls_tabs();
3576
3577 $this->end_controls_section();
3578 }
3579
3580 /**
3581 * Render Pricing Table widget output on the frontend.
3582 *
3583 * Written in PHP and used to generate the final HTML.
3584 *
3585 * @since 1.0.0
3586 * @access protected
3587 */
3588 protected function render() {
3589
3590 $settings = $this->get_settings_for_display();
3591
3592 $this->add_inline_editing_attributes( 'premium_pricing_table_title_text' );
3593 $this->add_render_attribute( 'premium_pricing_table_title_text', 'class', 'premium-pricing-table-title' );
3594
3595 $this->add_inline_editing_attributes( 'premium_pricing_table_description_text', 'advanced' );
3596 $this->add_render_attribute( 'premium_pricing_table_description_text', 'class', 'premium-pricing-description-container' );
3597
3598 $has_title = 'yes' === $settings['premium_pricing_table_title_switcher'];
3599 $price_enabled = 'yes' === $settings['premium_pricing_table_price_switcher'];
3600
3601 if ( $has_title ) {
3602 $title_tag = Helper_Functions::validate_html_tag( $settings['premium_pricing_table_title_size'] );
3603 }
3604
3605 if ( 'yes' === $settings['premium_pricing_table_badge_switcher'] ) {
3606 $badge_position = 'premium-badge-' . $settings['premium_pricing_table_badge_position'];
3607 $badge_style = 'premium-badge-' . $settings['ribbon_type'];
3608
3609 $this->add_inline_editing_attributes( 'premium_pricing_table_badge_text' );
3610 }
3611
3612 $link_type = $settings['premium_pricing_table_button_url_type'];
3613
3614 if ( 'link' === $link_type ) {
3615 $link_url = get_permalink( $settings['premium_pricing_table_button_link_existing_content'] );
3616 } elseif ( 'url' === $link_type ) {
3617 $link_url = $settings['premium_pricing_table_button_link'];
3618 }
3619
3620 if ( ! empty( $link_url ) ) {
3621
3622 $effect_class = Helper_Functions::get_button_class( $settings );
3623
3624 $this->add_render_attribute(
3625 'button',
3626 array(
3627 'class' => array(
3628 'premium-pricing-price-button',
3629 $effect_class,
3630 ),
3631 'data-text' => $settings['premium_pricing_table_button_text'],
3632 )
3633 );
3634
3635 if ( 'link' === $link_type ) {
3636 $this->add_render_attribute( 'button', 'href', $link_url );
3637 } else {
3638 $this->add_link_attributes( 'button', $link_url );
3639 }
3640 }
3641
3642 if ( 'yes' === $settings['premium_pricing_table_icon_switcher'] ) {
3643 $icon_type = $settings['icon_type'];
3644
3645 if ( 'icon' === $icon_type || 'svg' === $icon_type ) {
3646
3647 $this->add_render_attribute( 'icon', 'class', 'premium-drawable-icon' );
3648
3649 if ( 'yes' === $settings['draw_svg'] ) {
3650
3651 $this->add_render_attribute(
3652 'container',
3653 'class',
3654 array(
3655 'elementor-invisible',
3656 'premium-drawer-hover',
3657 )
3658 );
3659
3660 $this->add_render_attribute(
3661 'icon',
3662 array(
3663 'class' => 'premium-svg-drawer',
3664 'data-svg-reverse' => $settings['lottie_reverse'],
3665 'data-svg-loop' => $settings['lottie_loop'],
3666 'data-svg-sync' => $settings['svg_sync'],
3667 'data-svg-hover' => $settings['svg_hover'],
3668 'data-svg-fill' => $settings['svg_color'],
3669 'data-svg-frames' => $settings['frames'],
3670 'data-svg-yoyo' => $settings['svg_yoyo'],
3671 'data-svg-point' => $settings['lottie_reverse'] ? $settings['end_point']['size'] : $settings['start_point']['size'],
3672 )
3673 );
3674
3675 } else {
3676 $this->add_render_attribute( 'icon', 'class', 'premium-svg-nodraw' );
3677 }
3678 } elseif ( 'animation' === $icon_type ) {
3679 $this->add_render_attribute(
3680 'pricing_lottie',
3681 array(
3682 'class' => array(
3683 'premium-pricing-icon',
3684 'premium-lottie-animation',
3685 ),
3686 'data-lottie-url' => $settings['lottie_url'],
3687 'data-lottie-loop' => $settings['lottie_loop'],
3688 'data-lottie-reverse' => $settings['lottie_reverse'],
3689 )
3690 );
3691 } else {
3692 $this->add_render_attribute(
3693 'pricing_img',
3694 array(
3695 'src' => $settings['premium_pricing_table_image']['url'],
3696 'alt' => Control_Media::get_image_alt( $settings['premium_pricing_table_image'] ),
3697 )
3698 );
3699 }
3700 }
3701
3702 $this->add_render_attribute( 'container', 'class', 'premium-pricing-table-container' );
3703
3704 $draw_icon = $this->check_icon_draw();
3705 if ( $draw_icon && 'yes' === $settings['draw_svgs_sequence'] ) {
3706 $this->add_render_attribute( 'container', 'data-speed', $settings['list_frames'] );
3707 }
3708
3709 if ( $price_enabled ) {
3710 $this->add_render_attribute( 'price_container', 'class', 'premium-pricing-price-container' );
3711
3712 if ( 'none' !== $settings['price_lq_effect'] ) {
3713 $this->add_render_attribute( 'price_container', 'class', 'premium-con-lq__' . $settings['price_lq_effect'] );
3714 }
3715
3716 $price = $settings['premium_pricing_table_price_value'];
3717 $slashed_price = $settings['premium_pricing_table_slashed_price_value'];
3718 $has_slashed_price = ! empty( $slashed_price );
3719 $has_effect = ( 'effect-1' === $settings['price_effects'] ) && $has_slashed_price;
3720 $currency = $settings['premium_pricing_table_price_currency'];
3721 $separator = $settings['premium_pricing_table_price_separator'];
3722 $duration = $settings['premium_pricing_table_price_duration'];
3723 }
3724
3725 ?>
3726
3727 <div <?php $this->print_render_attribute_string( 'container' ); ?>>
3728 <?php if ( 'yes' === $settings['premium_pricing_table_badge_switcher'] ) : ?>
3729 <div class="premium-pricing-badge-container <?php echo esc_attr( $badge_position . ' ' . $badge_style ); ?>">
3730 <div class="corner">
3731 <span <?php $this->print_render_attribute_string( 'premium_pricing_table_badge_text' ); ?>>
3732 <?php echo wp_kses_post( $settings['premium_pricing_table_badge_text'] ); ?>
3733 </span>
3734 </div>
3735 </div>
3736 <?php
3737 endif;
3738 if ( 'yes' === $settings['premium_pricing_table_icon_switcher'] ) :
3739 ?>
3740 <div class="premium-pricing-icon-container">
3741 <div class="premium-pricing-icon-wrapper">
3742 <?php if ( 'icon' === $icon_type ) : ?>
3743 <?php
3744 if ( 'yes' !== $settings['draw_svg'] ) :
3745 Icons_Manager::render_icon(
3746 $settings['premium_pricing_table_icon_selection_updated'],
3747 array(
3748 'class' => array( 'premium-svg-nodraw', 'premium-drawable-icon' ),
3749 'aria-hidden' => 'true',
3750 )
3751 );
3752 else :
3753 echo Helper_Functions::get_svg_by_icon( $settings['premium_pricing_table_icon_selection_updated'], $this->get_render_attribute_string( 'icon' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_svg_by_icon() returns sanitized inline SVG/icon markup.
3754
3755 endif;
3756 ?>
3757
3758 <?php elseif ( 'svg' === $icon_type ) : ?>
3759 <div <?php $this->print_render_attribute_string( 'icon' ); ?>>
3760 <?php echo Helper_Functions::sanitize_svg( $this->get_settings_for_display( 'custom_svg' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- sanitize_svg passes through wp_kses with a strict SVG allowlist. ?>
3761 </div>
3762 <?php elseif ( 'animation' === $icon_type ) : ?>
3763 <div <?php $this->print_render_attribute_string( 'pricing_lottie' ); ?>></div>
3764 <?php else : ?>
3765 <div class='premium-pricing-image'>
3766 <img <?php $this->print_render_attribute_string( 'pricing_img' ); ?> />
3767 </div>
3768 <?php endif; ?>
3769 </div>
3770 </div>
3771 <?php
3772 endif;
3773
3774 if ( $has_title ) :
3775 ?>
3776 <<?php echo wp_kses_post( $title_tag ) . ' ' . wp_kses_post( $this->get_render_attribute_string( 'premium_pricing_table_title_text' ) ); ?>>
3777 <?php echo wp_kses_post( $settings['premium_pricing_table_title_text'] ); ?>
3778 </<?php echo wp_kses_post( $title_tag ); ?>>
3779 <?php endif; ?>
3780
3781 <?php if ( $price_enabled ) : ?>
3782 <div <?php $this->print_render_attribute_string( 'price_container' ); ?>>
3783 <div class="premium-pricing-inner-wrapper <?php echo ( $has_effect ? esc_attr( 'premium-pricing-reveal-wrapper' ) : '' ); ?>">
3784 <?php if ( $has_slashed_price ) : ?>
3785 <s class="premium-pricing-slashed-price-value">
3786 <?php echo wp_kses_post( ( $has_effect ? $currency : '' ) . $slashed_price ); ?>
3787 </s>
3788 <?php endif; ?>
3789
3790 <div class="premium-pricing-actual-wrapper">
3791 <?php if ( ! empty( $currency ) ) : ?>
3792 <span class="premium-pricing-price-currency"><?php echo wp_kses_post( $currency ); ?></span>
3793 <?php endif; ?>
3794 <?php if ( ! empty( $price ) ) : ?>
3795 <span class="premium-pricing-price-value"><?php echo wp_kses_post( $price ); ?></span>
3796 <?php endif; ?>
3797 </div>
3798 </div>
3799
3800 <div class="separate-duration-wrapper">
3801 <?php if ( ! empty( $separator ) ) : ?>
3802 <span class="premium-pricing-price-separator">
3803 <?php echo wp_kses_post( $separator ); ?>
3804 </span>
3805 <?php endif; ?>
3806
3807 <?php if ( ! empty( $duration ) ) : ?>
3808 <span class="premium-pricing-price-duration">
3809 <?php echo wp_kses_post( $duration ); ?>
3810 </span>
3811 <?php endif; ?>
3812 </div>
3813 </div>
3814 <?php
3815 endif;
3816 if ( 'yes' === $settings['premium_pricing_table_list_switcher'] ) :
3817 ?>
3818 <ul class="premium-pricing-list">
3819 <?php
3820 foreach ( $settings['premium_fancy_text_list_items'] as $index => $item ) :
3821
3822 $key = 'pricing_list_item_' . $index;
3823
3824 if ( 'icon' === $item['icon_type'] ) :
3825 $icon_migrated = isset( $item['__fa4_migrated']['premium_pricing_list_item_icon_updated'] );
3826 $icon_new = empty( $item['premium_pricing_list_item_icon'] ) && Icons_Manager::is_migration_allowed();
3827 endif;
3828
3829 $this->add_render_attribute(
3830 $key,
3831 array(
3832 'class' => array(
3833 'elementor-repeater-item-' . $item['_id'],
3834 'premium-pricing-list-item',
3835 ),
3836 )
3837 );
3838
3839 if ( 'icon' === $item['icon_type'] || 'svg' === $item['icon_type'] ) {
3840
3841 $this->add_render_attribute( $key, 'class', 'premium-drawable-icon' );
3842
3843 if ( 'yes' === $item['draw_svg'] ) {
3844
3845 $this->add_render_attribute(
3846 $key,
3847 array(
3848 'class' => array( 'premium-svg-drawer', 'elementor-invisible' ),
3849 'data-svg-reverse' => $item['lottie_reverse'],
3850 'data-svg-loop' => $item['lottie_loop'],
3851 'data-svg-hover' => $item['svg_hover'],
3852 'data-svg-sync' => $item['svg_sync'],
3853 'data-svg-fill' => $item['svg_color'],
3854 'data-svg-frames' => $item['frames'],
3855 'data-svg-yoyo' => $item['svg_yoyo'],
3856 'data-svg-point' => $item['lottie_reverse'] ? $item['end_point']['size'] : $item['start_point']['size'],
3857 )
3858 );
3859
3860 } else {
3861 $this->add_render_attribute( $key, 'class', 'premium-svg-nodraw' );
3862 }
3863 }
3864
3865 ?>
3866 <li <?php $this->print_render_attribute_string( $key ); ?>>
3867 <?php if ( 'icon' === $item['icon_type'] ) : ?>
3868 <?php
3869
3870 if ( ( $icon_new || $icon_migrated ) && 'yes' !== $item['draw_svg'] ) :
3871 Icons_Manager::render_icon(
3872 $item['premium_pricing_list_item_icon_updated'],
3873 array(
3874 'class' => array( 'premium-pricing-feature-icon', 'premium-svg-nodraw', 'premium-drawable-icon' ),
3875 'aria-hidden' => 'true',
3876 )
3877 );
3878 else :
3879 echo Helper_Functions::get_svg_by_icon( $item['premium_pricing_list_item_icon_updated'], array( 'class' => 'premium-pricing-feature-icon' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_svg_by_icon() returns sanitized inline SVG/icon markup.
3880
3881 endif;
3882 ?>
3883 <?php elseif ( 'svg' === $item['icon_type'] ) : ?>
3884 <?php echo Helper_Functions::sanitize_svg( $item['custom_svg'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- sanitize_svg passes through wp_kses with a strict SVG allowlist. ?>
3885 <?php
3886 elseif ( 'animation' === $item['icon_type'] ) :
3887 $lottie_key = 'pricing_item_lottie_' . $index;
3888 $this->add_render_attribute(
3889 $lottie_key,
3890 array(
3891 'class' => array(
3892 'premium-pricing-feature-icon',
3893 'premium-lottie-animation',
3894 ),
3895 'data-lottie-url' => $item['lottie_url'],
3896 'data-lottie-loop' => $item['lottie_loop'],
3897 'data-lottie-reverse' => $item['lottie_reverse'],
3898 )
3899 );
3900 ?>
3901 <div <?php $this->print_render_attribute_string( $lottie_key ); ?>></div>
3902 <?php
3903 else :
3904 $img_key = 'pricing_list_img' . $index;
3905 $this->add_render_attribute(
3906 $img_key,
3907 array(
3908 'src' => $item['premium_pricing_list_image']['url'],
3909 'alt' => Control_Media::get_image_alt( $item['premium_pricing_list_image'] ),
3910 )
3911 );
3912 ?>
3913 <div class='premium-pricing-list-image premium-pricing-feature-icon'>
3914 <img <?php $this->print_render_attribute_string( $img_key ); ?> />
3915 </div>
3916 <?php endif; ?>
3917
3918 <?php
3919 if ( ! empty( $item['premium_pricing_list_item_text'] ) ) :
3920 $item_class = 'yes' === $item['premium_pricing_table_item_tooltip'] ? ' list-item-tooltip' : '';
3921 ?>
3922 <span class="premium-pricing-list-span<?php echo esc_attr( $item_class ); ?>">
3923 <?php
3924 echo wp_kses_post( $item['premium_pricing_list_item_text'] );
3925 if ( 'yes' === $item['premium_pricing_table_item_tooltip'] && ! empty( $item['premium_pricing_table_item_tooltip_text'] ) ) :
3926 ?>
3927 <span class="premium-pricing-list-tooltip"><?php echo wp_kses_post( $item['premium_pricing_table_item_tooltip_text'] ); ?></span>
3928 <?php endif; ?>
3929 </span>
3930 <?php endif; ?>
3931 </li>
3932 <?php endforeach; ?>
3933 </ul>
3934 <?php endif; ?>
3935 <?php if ( 'yes' === $settings['premium_pricing_table_description_switcher'] ) : ?>
3936 <div <?php $this->print_render_attribute_string( 'premium_pricing_table_description_text' ); ?>>
3937 <?php echo $this->parse_text_editor( $settings['premium_pricing_table_description_text'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
3938 </div>
3939 <?php endif; ?>
3940 <?php if ( 'yes' === $settings['premium_pricing_table_button_switcher'] ) : ?>
3941 <div class="premium-pricing-button-container">
3942 <a <?php $this->print_render_attribute_string( 'button' ); ?>>
3943 <div class="premium-button-text-icon-wrapper">
3944 <span><?php echo wp_kses_post( $settings['premium_pricing_table_button_text'] ); ?></span>
3945 </div>
3946 <?php if ( 'style6' === $settings['premium_button_hover_effect'] && 'yes' === $settings['mouse_detect'] ) : ?>
3947 <span class="premium-button-style6-bg"></span>
3948 <?php endif; ?>
3949
3950 <?php if ( 'style8' === $settings['premium_button_hover_effect'] ) : ?>
3951 <?php echo Helper_Functions::get_btn_svgs( $settings['underline_style'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_btn_svgs() returns sanitized inline SVG markup. ?>
3952 <?php endif; ?>
3953
3954 </a>
3955 </div>
3956 <?php endif; ?>
3957 </div>
3958
3959 <?php
3960 }
3961
3962 /**
3963 * Render Pricing Table widget output in the editor.
3964 *
3965 * Written as a Backbone JavaScript template and used to generate the live preview.
3966 *
3967 * @since 1.0.0
3968 * @access protected
3969 */
3970 protected function content_template() {}
3971 }
3972