PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.13
ShopBuilder – WooCommerce Builder For Elementor v2.1.13
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Modules/QuickView/QuickView.php +7 -20 3.4.02.1.13 View file →
@@ -1,10 +1,5 @@
1 1 <?php
2 -/**
3 - * Quick View Module Class.
4 - *
5 - * @package RadiusTheme\SB
6 - */
7 2
8 3 namespace RadiusTheme\SB\Modules\QuickView;
9 4
10 5 // Do not allow directly accessing this file.
@@ -12,13 +7,12 @@
12 7 exit( 'This script cannot be accessed directly.' );
13 8 }
14 9
15 10 use RadiusTheme\SB\Helpers\Fns;
11 +use RadiusTheme\SB\Modules\Compare\CompareInstaller;
16 12 use RadiusTheme\SB\Traits\SingletonTrait;
13 +use RadiusTheme\SBPRO\Modules\Badges\BadgesFns;
17 14
18 -/**
19 - * Quick View Module Class.
20 - */
21 15 final class QuickView {
22 16 /**
23 17 * @var array
24 18 */
@@ -36,13 +30,8 @@
36 30 * Options
37 31 */
38 32 use SingletonTrait;
39 33
40 - /**
41 - * Class constructor.
42 - *
43 - * @return void
44 - */
45 34 private function __construct() {
46 35 QuickViewFrontEnd::instance();
47 36 $this->options = Fns::get_options( 'modules', 'quick_view' );
48 37 add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_public_scripts' ], 99 );
@@ -54,12 +43,10 @@
54 43 */
55 44 public function enqueue_public_scripts() {
56 45 $cache_key = 'quick_view_style_cache';
57 46 $width = ! empty( $this->options['modal_width'] ) ? $this->options['modal_width'] : '950';
58 - $handle = Fns::optimized_handle( 'rtsb-public' );
59 -
60 47 wp_localize_script(
61 - $handle,
48 + 'rtsb-public',
62 49 'QvModalParams',
63 50 [
64 51 'modal_width' => absint( $width ),
65 52 ]
@@ -65,13 +52,13 @@
65 52 ]
66 53 );
67 54
68 55 if ( isset( $this->cache[ $cache_key ] ) && ! empty( $this->cache[ $cache_key ] ) ) {
69 - wp_add_inline_style( Fns::optimized_handle( 'rtsb-frontend' ), $this->cache[ $cache_key ] );
56 + wp_add_inline_style( 'rtsb-frontend', $this->cache[ $cache_key ] );
70 57 return;
71 58 }
72 59
73 - $height = ! empty( $this->options['modal_height'] ) ? absint( $this->options['modal_height'] ) : false;
60 + $height = $this->options['modal_height'] ?? false;
74 61 $wrapper_padding = $this->options['modal_wrapper_padding'] ?? '0';
75 62 $bg_color = $this->options['modal_bg_color'] ?? false;
76 63 $box_shadow = $this->options['modal_box_shadow_color'] ?? false;
77 64 $overly_color = $this->options['modal_overly_color'] ?? false;
@@ -79,9 +66,9 @@
79 66 ob_start();
80 67
81 68 if ( $height ) { ?>
82 69 .rtsb-ui-modal .rtsb-modal-content{
83 - height: <?php echo absint( $height ); ?>px;
70 + height: <?php echo esc_attr( $height ); ?>;
84 71 }
85 72 <?php
86 73 }
87 74
@@ -117,8 +104,8 @@
117 104
118 105 $dynamic_css = ob_get_clean();
119 106 $this->cache[ $cache_key ] = $dynamic_css;
120 107 if ( ! empty( $dynamic_css ) ) {
121 - wp_add_inline_style( Fns::optimized_handle( 'rtsb-frontend' ), $dynamic_css );
108 + wp_add_inline_style( 'rtsb-frontend', $dynamic_css );
122 109 }
123 110 }
124 111 }