PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.7.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.7.0
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
← All changes | includes/elementor/modules/accept-reject-button/widgets/accept-reject-button.php +31 -24 1.2.32.7.0 View file →
@@ -1,8 +1,9 @@
1 1 <?php
2 2
3 3 use Elementor\Widget_Button;
4 4 use Elementor\Icons_Manager;
5 +use Elementor\Controls_Manager;
5 6
6 7 defined( 'ABSPATH' ) || die();
7 8
8 9 class Sellkit_Elementor_Accept_Reject_Button_Widget extends Sellkit_Elementor_Upsell_Base_Widget {
@@ -15,9 +16,9 @@
15 16 return 'sellkit-accept-reject-button';
16 17 }
17 18
18 19 public function get_title() {
19 - return __( 'Accept/Reject Button', 'sellkit' );
20 + return esc_html__( 'Accept/Reject Button', 'sellkit' );
20 21 }
21 22
22 23 public function get_icon() {
23 24 return 'sellkit-element-icon sellkit-accept-reject-button-icon';
@@ -110,9 +111,9 @@
110 111
111 112 $this->add_control(
112 113 'selected_icon',
113 114 [
114 - 'label' => __( 'Icon', 'elementor' ),
115 + 'label' => __( 'Icon', 'sellkit' ),
115 116 'type' => 'icons',
116 117 'fa4compatibility' => 'icon',
117 118 'skin' => 'inline',
118 119 'label_block' => false,
@@ -129,42 +130,46 @@
129 130 ],
130 131 'range' => [
131 132 'px' => [
132 133 'min' => 0,
133 - 'max' => 50,
134 + 'max' => 100,
134 135 ],
135 136 ],
136 137 'selectors' => [
138 + '{{WRAPPER}} .sellkit-accept-reject-button svg' => 'margin-right: {{SIZE}}{{UNIT}};',
137 139 '{{WRAPPER}} .sellkit-accept-reject-button i' => 'margin-right: {{SIZE}}{{UNIT}};',
140 + 'body.rtl {{WRAPPER}} .sellkit-accept-reject-button svg' => 'margin-left: {{SIZE}}{{UNIT}};',
141 + 'body.rtl {{WRAPPER}} .sellkit-accept-reject-button i' => 'margin-left: {{SIZE}}{{UNIT}};',
138 142 ],
139 143 'condition' => [
140 - 'selected_icon!' => [
141 - 'value' => '',
142 - 'library' => '',
143 - ],
144 + 'selected_icon[value]!' => '',
144 145 ],
145 146 ]
146 147 );
147 148
148 - $this->add_control(
149 + $this->add_responsive_control(
149 150 'icon_size',
150 151 [
151 - 'label' => __( 'Icon Size', 'sellkit' ),
152 - 'type' => 'slider',
152 + 'label' => esc_html__( 'Icon Size', 'sellkit' ),
153 + 'type' => Controls_Manager::SLIDER,
154 + 'size_units' => [ 'px' ],
153 155 'range' => [
154 156 'px' => [
155 157 'min' => 0,
156 - 'max' => 50,
158 + 'max' => 75,
159 + 'step' => 1,
157 160 ],
158 161 ],
162 + 'default' => [
163 + 'unit' => 'px',
164 + 'size' => 16,
165 + ],
159 166 'selectors' => [
160 - '{{WRAPPER}} .sellkit-accept-reject-button i' => 'font-size: {{SIZE}}{{UNIT}};',
167 + '{{WRAPPER}} .sellkit-accept-reject-button-widget .sellkit-accept-reject-button i' => 'font-size: {{SIZE}}{{UNIT}};',
168 + '{{WRAPPER}} .sellkit-accept-reject-button-widget .sellkit-accept-reject-button svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
161 169 ],
162 170 'condition' => [
163 - 'selected_icon!' => [
164 - 'value' => '',
165 - 'library' => '',
166 - ],
171 + 'selected_icon[value]!' => '',
167 172 ],
168 173 ]
169 174 );
170 175
@@ -171,9 +176,9 @@
171 176 $this->add_control(
172 177 'title_spacing',
173 178 [
174 179 'label' => __( 'Title Spacing', 'sellkit' ),
175 - 'type' => 'slider',
180 + 'type' => Controls_Manager::SLIDER,
176 181 'default' => [
177 182 'size' => 10,
178 183 ],
179 184 'range' => [
@@ -258,8 +263,9 @@
258 263 'label' => __( 'Text Color', 'sellkit' ),
259 264 'type' => 'color',
260 265 'selectors' => [
261 266 '{{WRAPPER}} .sellkit-accept-reject-button-widget .sellkit-accept-reject-button' => 'color: {{VALUE}} !important;',
267 + '{{WRAPPER}} .sellkit-accept-reject-button-widget .sellkit-accept-reject-button svg' => 'fill: {{VALUE}} !important;',
262 268 ],
263 269 ]
264 270 );
265 271
@@ -289,8 +295,9 @@
289 295 'label' => __( 'Text Color', 'sellkit' ),
290 296 'type' => 'color',
291 297 'selectors' => [
292 298 '{{WRAPPER}} .sellkit-accept-reject-button-widget .sellkit-accept-reject-button:hover' => 'color: {{VALUE}} !important;',
299 + '{{WRAPPER}} .sellkit-accept-reject-button-widget .sellkit-accept-reject-button:hover > svg' => 'fill: {{VALUE}} !important;',
293 300 ],
294 301 ]
295 302 );
296 303
@@ -423,26 +430,26 @@
423 430 $button_type_class = ( 'accept' === $settings['offer_type'] ) ? 'sellkit-upsell-accept-button' : 'sellkit-upsell-reject-button';
424 431 ?>
425 432 <div class="sellkit-accept-reject-button-widget">
426 433 <a
427 - class="elementor-button sellkit-accept-reject-button <?php echo $button_type_class; ?> elementor-size-<?php echo $settings['button_size']; ?>"
434 + class="elementor-button sellkit-accept-reject-button <?php echo esc_attr( $button_type_class ); ?> elementor-size-<?php echo esc_attr( $settings['button_size'] ); ?>"
428 435 data-order-key="<?php echo esc_attr( $order_key ); ?>"
429 436 >
430 437 <?php Icons_Manager::render_icon( $settings['selected_icon'] ); ?>
431 - <span class="sellkit-accept-reject-button-title" ><?php echo $settings['title']; ?></span>
438 + <span class="sellkit-accept-reject-button-title" ><?php echo wp_kses_post( $settings['title'] ); ?></span>
432 439 <br>
433 - <span class="sellkit-accept-reject-button-sub-title"><?php echo $settings['sub_title']; ?></span>
440 + <span class="sellkit-accept-reject-button-sub-title"><?php echo wp_kses_post( $settings['sub_title'] ); ?></span>
434 441 </a>
435 442 <div class="sellkit-upsell-popup">
436 443 <div class="sellkit-upsell-popup-body">
437 444 <div class="sellkit-upsell-popup-header">
438 - <img src="<?php echo sellkit()->plugin_url() . 'assets/img/icons/close-cross.svg'; ?>" >
445 + <img src="<?php echo esc_url( sellkit()->plugin_url() . 'assets/img/icons/close-cross.svg' ); ?>" >
439 446 </div>
440 447 <div class="sellkit-upsell-popup-content">
441 448 <div class="sellkit-upsell-popup-icon">
442 - <img class="rotate sellkit-upsell-updating active" src="<?php echo sellkit()->plugin_url() . 'assets/img/icons/sync-alt.svg'; ?>" >
443 - <img class="sellkit-upsell-accepted" src="<?php echo sellkit()->plugin_url() . 'assets/img/icons/check-circle.svg'; ?>" >
444 - <img class="sellkit-upsell-rejected" src="<?php echo sellkit()->plugin_url() . 'assets/img/icons/times-circle.svg'; ?>" >
449 + <img class="rotate sellkit-upsell-updating active" src="<?php echo esc_url( sellkit()->plugin_url() . 'assets/img/icons/sync-alt.svg' ); ?>" >
450 + <img class="sellkit-upsell-accepted" src="<?php echo esc_url( sellkit()->plugin_url() . 'assets/img/icons/check-circle.svg' ); ?>" >
451 + <img class="sellkit-upsell-rejected" src="<?php echo esc_url( sellkit()->plugin_url() . 'assets/img/icons/times-circle.svg' ); ?>" >
445 452 </div>
446 453 <div class="sellkit-upsell-popup-text">
447 454 <div class="sellkit-upsell-updating active">
448 455 <?php esc_html_e( 'Updating your order…', 'sellkit' ); ?>