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 / ButtonSettings.php

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

163 lines 6.0 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 // Do not allow directly accessing this file.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit( 'This script cannot be accessed directly.' );
13 }
14
15 /**
16 * Product Description class
17 */
18 class ButtonSettings {
19
20 /**
21 * Widget Field
22 *
23 * @return array
24 */
25 public static function style_settings( $widget ) {
26 $fields = [
27 'button_section_start' => [
28 'mode' => 'section_start',
29 'label' => esc_html__( 'Button', 'shopbuilder' ),
30 'tab' => 'style',
31 ],
32 'button_typography' => [
33 'mode' => 'group',
34 'type' => 'typography',
35 'label' => esc_html__( 'Typography', 'shopbuilder' ),
36 'selector' => $widget->selectors['button_typography'],
37 ],
38 'button_height' => [
39 'label' => esc_html__( 'Height', 'shopbuilder' ),
40 'type' => 'slider',
41 'range' => [
42 'px' => [
43 'min' => 10,
44 'max' => 200,
45 ],
46 ],
47 'selectors' => [
48 $widget->selectors['button_height'] => 'height: {{SIZE}}{{UNIT}};',
49 ],
50 ],
51 'button_tabs_start' => [
52 'mode' => 'tabs_start',
53 ],
54 'button_normal' => [
55 'mode' => 'tab_start',
56 'label' => esc_html__( 'Normal', 'shopbuilder' ),
57 ],
58 'button_text_color_normal' => [
59 'label' => esc_html__( 'Color', 'shopbuilder' ),
60 'type' => 'color',
61
62 'separator' => 'default',
63 'selectors' => [
64 $widget->selectors['button_text_color_normal'] => 'color: {{VALUE}};',
65 ],
66 ],
67 'button_bg_color_normal' => [
68 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
69 'type' => 'color',
70
71 'selectors' => [
72 $widget->selectors['button_bg_color_normal'] => 'background-color: {{VALUE}};',
73 ],
74 ],
75
76 'button_border' => [
77 'mode' => 'group',
78 'type' => 'border',
79 'selector' => $widget->selectors['button_border'],
80 'size_units' => [ 'px' ],
81 ],
82 'button_normal_end' => [
83 'mode' => 'tab_end',
84 ],
85 'button_hover' => [
86 'mode' => 'tab_start',
87 'label' => esc_html__( 'Hover', 'shopbuilder' ),
88 ],
89 'button_text_color_hover' => [
90 'label' => esc_html__( 'Color', 'shopbuilder' ),
91 'type' => 'color',
92
93 'separator' => 'default',
94 'selectors' => [
95 $widget->selectors['button_text_color_hover'] => 'color: {{VALUE}};',
96 ],
97 ],
98 'button_bg_color_hover' => [
99 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
100 'type' => 'color',
101
102 'selectors' => [
103 $widget->selectors['button_bg_color_hover'] => 'background-color: {{VALUE}};',
104 ],
105 ],
106 'button_border_hover_color' => [
107 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
108 'type' => 'color',
109
110 'selectors' => [
111 $widget->selectors['button_border_hover_color'] => 'border-color: {{VALUE}};',
112 ],
113 ],
114 'button_hover_end' => [
115 'mode' => 'tab_end',
116 ],
117 'button_tabs_end' => [
118 'mode' => 'tabs_end',
119 ],
120 'button_border_radius' => [
121 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
122 'type' => 'dimensions',
123 'default' => [
124 'top' => '5',
125 'right' => '5',
126 'bottom' => '5',
127 'left' => '5',
128 'unit' => 'px',
129 'isLinked' => true,
130 ],
131 'size_units' => [ 'px' ],
132 'separator' => 'before',
133 'selectors' => [
134 $widget->selectors['button_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
135 ],
136 ],
137 'button_padding' => [
138 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
139 'type' => 'dimensions',
140 'size_units' => [ 'px' ],
141 'selectors' => [
142 $widget->selectors['button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
143 ],
144 'separator' => 'before',
145 ],
146
147 'button_margin' => [
148 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
149 'type' => 'dimensions',
150 'size_units' => [ 'px' ],
151 'selectors' => [
152 $widget->selectors['button_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
153 ],
154 ],
155 'button_section_end' => [
156 'mode' => 'section_end',
157 ],
158 ];
159 return $fields;
160 }
161
162 }
163