PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.4
ShopBuilder – WooCommerce Builder For Elementor v1.1.4
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 / NoticeSettings.php

NoticeSettings.php in ShopBuilder – WooCommerce Builder For Elementor 1.1.4, at app/Elementor/Widgets/Controls/NoticeSettings.php

148 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 use Elementor\Controls_Manager;
11
12 // Do not allow directly accessing this file.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit( 'This script cannot be accessed directly.' );
15 }
16
17 /**
18 * Product Description class
19 */
20 class NoticeSettings {
21 /**
22 * Widget Control Selectors
23 *
24 * @var array
25 */
26 private static $selectors = [];
27 /**
28 * Widget
29 *
30 * @var array
31 */
32 private static $widget;
33 /**
34 * Widget Field
35 *
36 * @return array
37 */
38 public static function widget_fields( $widget ) {
39 self::$widget = $widget;
40 self::$selectors = $widget->selectors;
41 return self::notice_style() + self::button_style();
42 }
43 /**
44 * Widget Field
45 *
46 * @return array
47 */
48 public static function notice_style() {
49 return [
50 'notice_section' => [
51 'mode' => 'section_start',
52 'label' => esc_html__( 'Notice', 'shopbuilder' ),
53 ],
54 'notice_typography' => [
55 'mode' => 'group',
56 'type' => 'typography',
57 'label' => esc_html__( 'Typography', 'shopbuilder' ),
58 'selector' => self::$selectors['notice_typography'],
59 ],
60 'notice_bg_color' => [
61 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
62 'type' => 'color',
63
64 'selectors' => [
65 self::$selectors['notice_bg_color'] => 'background-color: {{VALUE}};',
66 ],
67 ],
68 'notice_text_color' => [
69 'label' => esc_html__( 'Color', 'shopbuilder' ),
70 'type' => 'color',
71
72 'selectors' => [
73 self::$selectors['notice_text_color'] => 'color: {{VALUE}};',
74 ],
75 ],
76 'notice_border_color' => [
77 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
78 'type' => 'color',
79
80 'selectors' => [
81 self::$selectors['notice_border_color'] => 'border-color: {{VALUE}};',
82 ],
83 ],
84 'notice_icon_size' => [
85 'label' => esc_html__( 'Icon Size', 'shopbuilder' ),
86 'type' => 'slider',
87 'range' => [
88 'px' => [
89 'min' => 10,
90 'max' => 100,
91 ],
92 ],
93 'selectors' => [
94 self::$selectors['notice_icon_size'] => 'font-size: {{SIZE}}{{UNIT}};',
95 ],
96 ],
97 'notice_icon_color' => [
98 'label' => esc_html__( 'Icon Color', 'shopbuilder' ),
99 'type' => 'color',
100
101 'selectors' => [
102 self::$selectors['notice_icon_color'] => 'color: {{VALUE}};',
103 ],
104 ],
105 'notice_padding' => [
106 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
107 'type' => 'dimensions',
108 'size_units' => [ 'px' ],
109 'selectors' => [
110 self::$selectors['notice_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
111 ],
112 'separator' => 'before',
113 ],
114 'notice_gap_multiple' => [
115 'label' => esc_html__( ' Gap for Multiple Notice', 'shopbuilder' ),
116 'description' => esc_html__( 'This gap will apply between two notices.', 'shopbuilder' ),
117 'type' => 'slider',
118 'range' => [
119 'px' => [
120 'min' => 0,
121 'max' => 100,
122 ],
123 ],
124
125 'selectors' => [
126 self::$selectors['notice_gap_multiple'] => 'gap: {{SIZE}}{{UNIT}};',
127 ],
128 ],
129 'notice_section_end' => [
130 'mode' => 'section_end',
131 ],
132 ];
133
134 }
135 /**
136 * Widget Field
137 *
138 * @return array
139 */
140 public static function button_style() {
141 $fields = ButtonSettings::style_settings( self::$widget );
142 unset( $fields['button_section_start']['tab'] );
143 return $fields;
144 }
145
146
147 }
148