PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.2.2
ShopBuilder – WooCommerce Builder For Elementor v2.2.2
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
shopbuilder / app / Elementor / Widgets / Controls / ReviewsStarSettings.php

ReviewsStarSettings.php in ShopBuilder – WooCommerce Builder For Elementor 2.2.2, at app/Elementor/Widgets/Controls/ReviewsStarSettings.php

107 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ReviewsSettings class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 use Elementor\Controls_Manager;
11 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
12
13 // Do not allow directly accessing this file.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit( 'This script cannot be accessed directly.' );
16 }
17
18 /**
19 * Product Review Settings class
20 */
21 class ReviewsStarSettings {
22 /**
23 * Widget Control Selectors
24 *
25 * @var array
26 */
27 private static $selectors = [];
28 /**
29 * Widget Field
30 *
31 * @return array
32 */
33 public static function widget_fields( $widget ) {
34 self::$selectors = $widget->selectors;
35 $fields = [
36 'review_star_icon_style_start' => [
37 'mode' => 'section_start',
38 'label' => esc_html__( 'Star Icon', 'shopbuilder' ),
39 'tab' => 'style',
40 ],
41 'review_star_icon_default_color' => [
42 'label' => esc_html__( 'Default color', 'shopbuilder' ),
43 'type' => 'color',
44 'separator' => 'default',
45 'selectors' => [
46 self::$selectors['review_star_icon_default_color'] => 'color: {{VALUE}};',
47 ],
48 ],
49 'review_star_icon_color' => [
50 'label' => esc_html__( 'Star icon Color', 'shopbuilder' ),
51 'type' => 'color',
52 'selectors' => [
53 self::$selectors['review_star_icon_color'] => 'color: {{VALUE}};',
54 ],
55 ],
56 'review_star_icon_size' => [
57 'mode' => 'responsive',
58 'label' => esc_html__( 'Star icon size (px)', 'shopbuilder' ),
59 'type' => 'slider',
60 'size_units' => [ 'px' ],
61 'range' => [
62 'px' => [
63 'min' => 10,
64 'max' => 100,
65 'step' => 1,
66 ],
67 ],
68 'selectors' => [
69 self::$selectors['review_star_icon_size'] => 'font-size: {{SIZE}}{{UNIT}}!important;',
70 ],
71 ],
72 'review_star_icon_specing' => [
73 'mode' => 'responsive',
74 'label' => esc_html__( 'Star icon specing (px)', 'shopbuilder' ),
75 'type' => 'slider',
76 'size_units' => [ 'px' ],
77 'range' => [
78 'px' => [
79 'min' => 0,
80 'max' => 100,
81 'step' => 1,
82 ],
83 ],
84
85 'selectors' => [
86 self::$selectors['review_star_icon_specing'] => 'letter-spacing: {{SIZE}}{{UNIT}};width: initial;display: inline-flex;',
87 self::$selectors['review_star_icon_specing'] . ':before' => 'position: static;',
88 ],
89 ],
90 'review_star_icon_margin' => [
91 'label' => esc_html__( 'Rating Margin (px)', 'shopbuilder' ),
92 'type' => 'dimensions',
93 'mode' => 'responsive',
94 'size_units' => [ 'px' ],
95 'selectors' => [
96 self::$selectors['review_star_icon_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; padding: 0;',
97 ],
98 ],
99 'review_star_icon_style_end' => [
100 'mode' => 'section_end',
101 ],
102 ];
103 return $fields;
104 }
105
106 }
107