PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.15
ShopBuilder – WooCommerce Builder For Elementor v2.1.15
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 / TableSettings.php

TableSettings.php in ShopBuilder – WooCommerce Builder For Elementor 2.1.15, at app/Elementor/Widgets/Controls/TableSettings.php

150 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * TableSettings 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 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
12
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit( 'This script cannot be accessed directly.' );
16 }
17
18 class TableSettings {
19
20 /**
21 * Widget Field
22 *
23 * @return array
24 */
25 public static function settings( $widget ) {
26 return self::table_settings( $widget ) +
27 self::button_settings( $widget );
28 }
29
30 /**
31 * Table Widget Field
32 *
33 * @return array
34 */
35 public static function table_settings( $widget ) {
36 return [
37 'table_section_start' => [
38 'mode' => 'section_start',
39 'tab' => 'style',
40 'label' => esc_html__( 'Table', 'shopbuilder' ),
41 ],
42 'table_border' => [
43 'mode' => 'group',
44 'type' => 'border',
45 'label' => esc_html__( 'Border', 'shopbuilder' ),
46 'selector' => $widget->selectors['table_border'],
47 'separator' => 'before',
48 ],
49 'table_heading_cell_padding' => [
50 'label' => esc_html__( 'Padding', 'shopbuilder' ),
51 'type' => 'dimensions',
52 'mode' => 'responsive',
53 'size_units' => [ 'px', 'em', '%' ],
54 'selectors' => [
55 $widget->selectors['table_heading_cell_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
56 ],
57 ],
58 'table_header_label' => [
59 'type' => 'html',
60 'raw' => sprintf(
61 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
62 esc_html__( 'Table Heading', 'shopbuilder' )
63 ),
64 'content_classes' => 'elementor-panel-heading-title',
65 'separator' => 'default',
66 ],
67 'table_header_typo' => [
68 'mode' => 'group',
69 'type' => 'typography',
70 'label' => esc_html__( 'Typography', 'shopbuilder' ),
71 'selector' => $widget->selectors['table_header_typo'],
72 ],
73 'table_header_align' => [
74 'mode' => 'responsive',
75 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
76 'type' => 'choose',
77 'options' => ControlHelper::alignment(),
78 'selectors' => [
79 $widget->selectors['table_header_align'] => 'text-align: {{VALUE}}!important;',
80 ],
81 ],
82 'table_header_color' => [
83 'label' => esc_html__( 'Color', 'shopbuilder' ),
84 'type' => 'color',
85 'selectors' => [
86 $widget->selectors['table_header_color'] => 'color: {{VALUE}} !important;',
87 ],
88 ],
89 'table_header_bg_color' => [
90 'label' => esc_html__( 'Background', 'shopbuilder' ),
91 'type' => 'color',
92 'selectors' => [
93 $widget->selectors['table_header_bg_color'] => 'background-color: {{VALUE}} !important;',
94 ],
95 ],
96 'table_items_label' => [
97 'type' => 'html',
98 'raw' => sprintf(
99 '<h3 class="rtsb-elementor-group-heading">%s</h3>',
100 esc_html__( 'Table Items', 'shopbuilder' )
101 ),
102 'content_classes' => 'elementor-panel-heading-title',
103 'separator' => 'default',
104 ],
105 'table_item_typo' => [
106 'mode' => 'group',
107 'type' => 'typography',
108 'label' => esc_html__( 'Typography', 'shopbuilder' ),
109 'selector' => $widget->selectors['table_item_typo'],
110 ],
111 'table_item_align' => [
112 'mode' => 'responsive',
113 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
114 'type' => 'choose',
115 'options' => ControlHelper::alignment(),
116 'selectors' => [
117 $widget->selectors['table_item_align'] => 'text-align: {{VALUE}}!important;',
118 ],
119 ],
120 'table_item_color' => [
121 'label' => esc_html__( 'Color', 'shopbuilder' ),
122 'type' => 'color',
123 'selectors' => [
124 $widget->selectors['table_item_color'] => 'color: {{VALUE}} !important;',
125 ],
126 ],
127 'table_item_bg_color' => [
128 'label' => esc_html__( 'Background', 'shopbuilder' ),
129 'type' => 'color',
130 'selectors' => [
131 $widget->selectors['table_item_bg_color'] => 'background-color: {{VALUE}} !important;',
132 ],
133 ],
134 'table_heading_end' => [
135 'mode' => 'section_end',
136 ],
137 ];
138 }
139
140 /**
141 * Button Widget Field
142 *
143 * @return array
144 */
145 public static function button_settings( $widget ) {
146 return ButtonSettings::style_settings( $widget );
147 }
148
149 }
150