Completed
Push — master ( 7388a0...c197b7 )
by
unknown
45s
created
sample/sections/advanced-features/callback.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -10,36 +10,36 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Callback', 'your-textdomain-here' ),
16
-		'id'         => 'additional-callback',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/data.html#using-a-custom-callback" target="_blank">https://devs.redux.io/configuration/fields/data.html#using-a-custom-callback</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-custom-callback',
22
-				'type'     => 'callback',
23
-				'title'    => esc_html__( 'Custom Field Callback', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'This is a completely unique field type', 'your-textdomain-here' ),
25
-				'desc'     => esc_html__( 'This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'your-textdomain-here' ),
26
-				'callback' => 'redux_my_custom_field',
27
-			),
28
-		),
29
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Callback', 'your-textdomain-here' ),
16
+        'id'         => 'additional-callback',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/data.html#using-a-custom-callback" target="_blank">https://devs.redux.io/configuration/fields/data.html#using-a-custom-callback</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-custom-callback',
22
+                'type'     => 'callback',
23
+                'title'    => esc_html__( 'Custom Field Callback', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'This is a completely unique field type', 'your-textdomain-here' ),
25
+                'desc'     => esc_html__( 'This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'your-textdomain-here' ),
26
+                'callback' => 'redux_my_custom_field',
27
+            ),
28
+        ),
29
+    )
30 30
 );
31 31
 
32 32
 if ( ! function_exists( 'redux_my_custom_field' ) ) {
33
-	/**
34
-	 * Custom function for the callback referenced above.
35
-	 *
36
-	 * @param array $field Field array.
37
-	 * @param mixed $value Set value.
38
-	 */
39
-	function redux_my_custom_field( array $field, $value ) {
40
-		print_r( $field ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
41
-		echo '<br/>';
42
-		print_r( $value ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
43
-	}
33
+    /**
34
+     * Custom function for the callback referenced above.
35
+     *
36
+     * @param array $field Field array.
37
+     * @param mixed $value Set value.
38
+     */
39
+    function redux_my_custom_field( array $field, $value ) {
40
+        print_r( $field ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
41
+        echo '<br/>';
42
+        print_r( $value ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
43
+    }
44 44
 }
45 45
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/select-fields/select.php 1 patch
Indentation   +259 added lines, -259 removed lines patch added patch discarded remove patch
@@ -10,262 +10,262 @@  discard block
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Select', 'your-textdomain-here' ),
16
-		'id'         => 'select-select',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select.html" target="_blank">https://devs.redux.io/core-fields/select.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-select',
22
-				'type'     => 'select',
23
-				'title'    => esc_html__( 'Select Option', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
25
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Select', 'your-textdomain-here' ),
16
+        'id'         => 'select-select',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select.html" target="_blank">https://devs.redux.io/core-fields/select.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-select',
22
+                'type'     => 'select',
23
+                'title'    => esc_html__( 'Select Option', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
25
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
26 26
 
27
-				// Must provide key => value pairs for select options.
28
-				'options'  => array(
29
-					'1' => 'Opt 1',
30
-					'2' => 'Opt 2',
31
-					'3' => 'Opt 3',
32
-				),
33
-				'default'  => '2',
34
-			),
35
-			array(
36
-				'id'       => 'opt-select-stylesheet',
37
-				'type'     => 'select',
38
-				'title'    => esc_html__( 'Theme Stylesheet', 'your-textdomain-here' ),
39
-				'subtitle' => esc_html__( 'Select your themes alternative color scheme.', 'your-textdomain-here' ),
40
-				'options'  => array(
41
-					'default.css' => 'default.css',
42
-					'color1.css'  => 'color1.css',
43
-				),
44
-				'default'  => 'default.css',
45
-			),
46
-			array(
47
-				'id'       => 'opt-select-optgroup',
48
-				'type'     => 'select',
49
-				'title'    => esc_html__( 'Select Option with optgroup', 'your-textdomain-here' ),
50
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
51
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
27
+                // Must provide key => value pairs for select options.
28
+                'options'  => array(
29
+                    '1' => 'Opt 1',
30
+                    '2' => 'Opt 2',
31
+                    '3' => 'Opt 3',
32
+                ),
33
+                'default'  => '2',
34
+            ),
35
+            array(
36
+                'id'       => 'opt-select-stylesheet',
37
+                'type'     => 'select',
38
+                'title'    => esc_html__( 'Theme Stylesheet', 'your-textdomain-here' ),
39
+                'subtitle' => esc_html__( 'Select your themes alternative color scheme.', 'your-textdomain-here' ),
40
+                'options'  => array(
41
+                    'default.css' => 'default.css',
42
+                    'color1.css'  => 'color1.css',
43
+                ),
44
+                'default'  => 'default.css',
45
+            ),
46
+            array(
47
+                'id'       => 'opt-select-optgroup',
48
+                'type'     => 'select',
49
+                'title'    => esc_html__( 'Select Option with optgroup', 'your-textdomain-here' ),
50
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
51
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
52 52
 
53
-				// Must provide key => value pairs for select options.
54
-				'options'  => array(
55
-					'Group 1' => array(
56
-						'1' => 'Opt 1',
57
-						'2' => 'Opt 2',
58
-						'3' => 'Opt 3',
59
-					),
60
-					'Group 2' => array(
61
-						'4' => 'Opt 4',
62
-						'5' => 'Opt 5',
63
-						'6' => 'Opt 6',
64
-					),
65
-					'7'       => 'Opt 7',
66
-					'8'       => 'Opt 8',
67
-					'9'       => 'Opt 9',
68
-				),
69
-				'default'  => '2',
70
-			),
71
-			array(
72
-				'id'       => 'opt-multi-select',
73
-				'type'     => 'select',
74
-				'multi'    => true,
75
-				'title'    => esc_html__( 'Multi Select Option', 'your-textdomain-here' ),
76
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
77
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
53
+                // Must provide key => value pairs for select options.
54
+                'options'  => array(
55
+                    'Group 1' => array(
56
+                        '1' => 'Opt 1',
57
+                        '2' => 'Opt 2',
58
+                        '3' => 'Opt 3',
59
+                    ),
60
+                    'Group 2' => array(
61
+                        '4' => 'Opt 4',
62
+                        '5' => 'Opt 5',
63
+                        '6' => 'Opt 6',
64
+                    ),
65
+                    '7'       => 'Opt 7',
66
+                    '8'       => 'Opt 8',
67
+                    '9'       => 'Opt 9',
68
+                ),
69
+                'default'  => '2',
70
+            ),
71
+            array(
72
+                'id'       => 'opt-multi-select',
73
+                'type'     => 'select',
74
+                'multi'    => true,
75
+                'title'    => esc_html__( 'Multi Select Option', 'your-textdomain-here' ),
76
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
77
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
78 78
 
79
-				// Must provide key => value pairs for radio options.
80
-				'options'  => array(
81
-					'1' => 'Opt 1',
82
-					'2' => 'Opt 2',
83
-					'3' => 'Opt 3',
84
-				),
85
-				'default'  => array( '2', '3' ),
86
-			),
87
-			array(
88
-				'id'   => 'opt-info',
89
-				'type' => 'info',
90
-				'desc' => esc_html__( 'You can easily add a variety of data from WordPress.', 'your-textdomain-here' ),
91
-			),
92
-			array(
93
-				'id'       => 'opt-select-categories',
94
-				'type'     => 'select',
95
-				'data'     => 'roles',
96
-				'title'    => esc_html__( 'Categories Select Option', 'your-textdomain-here' ),
97
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
98
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
99
-			),
100
-			array(
101
-				'id'       => 'opt-select-categories-multi',
102
-				'type'     => 'select',
103
-				'data'     => 'categories',
104
-				'multi'    => true,
105
-				'title'    => esc_html__( 'Categories Multi Select Option', 'your-textdomain-here' ),
106
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
107
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
108
-			),
109
-			array(
110
-				'id'       => 'opt-select-pages',
111
-				'type'     => 'select',
112
-				'data'     => 'pages',
113
-				'title'    => esc_html__( 'Pages Select Option', 'your-textdomain-here' ),
114
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
115
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
116
-			),
117
-			array(
118
-				'id'       => 'opt-multi-select-pages',
119
-				'type'     => 'select',
120
-				'data'     => 'pages',
121
-				'multi'    => true,
122
-				'title'    => esc_html__( 'Pages Multi Select Option', 'your-textdomain-here' ),
123
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
124
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
125
-			),
126
-			array(
127
-				'id'       => 'opt-select-tags',
128
-				'type'     => 'select',
129
-				'data'     => 'tags',
130
-				'title'    => esc_html__( 'Tags Select Option', 'your-textdomain-here' ),
131
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
132
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
133
-			),
134
-			array(
135
-				'id'       => 'opt-multi-select-tags',
136
-				'type'     => 'select',
137
-				'data'     => 'terms',
138
-				'multi'    => true,
139
-				'title'    => esc_html__( 'Tags Multi Select Option', 'your-textdomain-here' ),
140
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
141
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
142
-			),
143
-			array(
144
-				'id'       => 'opt-select-terms',
145
-				'type'     => 'select',
146
-				'data'     => 'terms',
147
-				'title'    => esc_html__( 'Terms Select Option', 'your-textdomain-here' ),
148
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
149
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
150
-			),
151
-			array(
152
-				'id'       => 'opt-multi-select-terms',
153
-				'type'     => 'select',
154
-				'data'     => 'terms',
155
-				'multi'    => true,
156
-				'title'    => esc_html__( 'Terms Multi Select Option', 'your-textdomain-here' ),
157
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
158
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
159
-			),
160
-			array(
161
-				'id'       => 'opt-select-menus',
162
-				'type'     => 'select',
163
-				'data'     => 'menus',
164
-				'title'    => esc_html__( 'Menus Select Option', 'your-textdomain-here' ),
165
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
166
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
167
-			),
168
-			array(
169
-				'id'       => 'opt-multi-select-menus',
170
-				'type'     => 'select',
171
-				'data'     => 'menu',
172
-				'multi'    => true,
173
-				'title'    => esc_html__( 'Menus Multi Select Option', 'your-textdomain-here' ),
174
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
175
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
176
-			),
177
-			array(
178
-				'id'       => 'opt-select-post-type',
179
-				'type'     => 'select',
180
-				'data'     => 'post_type',
181
-				'title'    => esc_html__( 'Post Type Select Option', 'your-textdomain-here' ),
182
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
183
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
184
-			),
185
-			array(
186
-				'id'       => 'opt-multi-select-post-type',
187
-				'type'     => 'select',
188
-				'data'     => 'post_type',
189
-				'multi'    => true,
190
-				'title'    => esc_html__( 'Post Type Multi Select Option', 'your-textdomain-here' ),
191
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
192
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
193
-			),
194
-			array(
195
-				'id'       => 'opt-multi-select-sortable',
196
-				'type'     => 'select',
197
-				'data'     => 'post_type',
198
-				'multi'    => true,
199
-				'sortable' => true,
200
-				'title'    => esc_html__( 'Post Type Multi Select Option + Sortable', 'your-textdomain-here' ),
201
-				'subtitle' => esc_html__( 'This field also has sortable enabled!', 'your-textdomain-here' ),
202
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
203
-			),
204
-			array(
205
-				'id'       => 'opt-select-posts',
206
-				'type'     => 'select',
207
-				'data'     => 'post',
208
-				'title'    => esc_html__( 'Posts Select Option2', 'your-textdomain-here' ),
209
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
210
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
211
-			),
212
-			array(
213
-				'id'       => 'opt-multi-select-posts',
214
-				'type'     => 'select',
215
-				'data'     => 'post',
216
-				'multi'    => true,
217
-				'title'    => esc_html__( 'Posts Multi Select Option', 'your-textdomain-here' ),
218
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
219
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
220
-			),
221
-			array(
222
-				'id'       => 'opt-select-roles',
223
-				'type'     => 'select',
224
-				'data'     => 'roles',
225
-				'title'    => esc_html__( 'User Role Select Option', 'your-textdomain-here' ),
226
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
227
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
228
-			),
229
-			array(
230
-				'id'               => 'opt-select-capabilities',
231
-				'type'             => 'select',
232
-				'data'             => 'capabilities',
233
-				'multi'            => false,
234
-				'ajax'             => true,
235
-				'min_input_length' => 3,
236
-				'title'            => esc_html__( 'Capabilities Select Option w/ AJAX Loading', 'your-textdomain-here' ),
237
-				'subtitle'         => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
238
-				'desc'             => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
239
-			),
240
-			array(
241
-				'id'       => 'opt-select-elusive',
242
-				'type'     => 'select',
243
-				'data'     => 'elusive-icons',
244
-				'title'    => esc_html__( 'Elusive Icons Select Option', 'your-textdomain-here' ),
245
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
246
-				'desc'     => esc_html__( 'Here\'s a list of all the elusive icons by name and icon.', 'your-textdomain-here' ),
247
-			),
248
-			array(
249
-				'id'               => 'opt-select-users',
250
-				'type'             => 'select',
251
-				'data'             => 'users',
252
-				'ajax'             => true,
253
-				'min_input_length' => 3,
254
-				'title'            => esc_html__( 'Users Select Option', 'your-textdomain-here' ),
255
-				'subtitle'         => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
256
-				'desc'             => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
257
-			),
258
-			array(
259
-				'id'       => 'opt-select-callback',
260
-				'type'     => 'select',
261
-				'data'     => 'callback',
262
-				'args'     => 'redux_select_callback',
263
-				'title'    => esc_html__( 'Select Option using a Callback', 'your-textdomain-here' ),
264
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
265
-				'desc'     => esc_html__( 'The items in this select were added via a callback function.', 'your-textdomain-here' ),
266
-			),
267
-		),
268
-	)
79
+                // Must provide key => value pairs for radio options.
80
+                'options'  => array(
81
+                    '1' => 'Opt 1',
82
+                    '2' => 'Opt 2',
83
+                    '3' => 'Opt 3',
84
+                ),
85
+                'default'  => array( '2', '3' ),
86
+            ),
87
+            array(
88
+                'id'   => 'opt-info',
89
+                'type' => 'info',
90
+                'desc' => esc_html__( 'You can easily add a variety of data from WordPress.', 'your-textdomain-here' ),
91
+            ),
92
+            array(
93
+                'id'       => 'opt-select-categories',
94
+                'type'     => 'select',
95
+                'data'     => 'roles',
96
+                'title'    => esc_html__( 'Categories Select Option', 'your-textdomain-here' ),
97
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
98
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
99
+            ),
100
+            array(
101
+                'id'       => 'opt-select-categories-multi',
102
+                'type'     => 'select',
103
+                'data'     => 'categories',
104
+                'multi'    => true,
105
+                'title'    => esc_html__( 'Categories Multi Select Option', 'your-textdomain-here' ),
106
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
107
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
108
+            ),
109
+            array(
110
+                'id'       => 'opt-select-pages',
111
+                'type'     => 'select',
112
+                'data'     => 'pages',
113
+                'title'    => esc_html__( 'Pages Select Option', 'your-textdomain-here' ),
114
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
115
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
116
+            ),
117
+            array(
118
+                'id'       => 'opt-multi-select-pages',
119
+                'type'     => 'select',
120
+                'data'     => 'pages',
121
+                'multi'    => true,
122
+                'title'    => esc_html__( 'Pages Multi Select Option', 'your-textdomain-here' ),
123
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
124
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
125
+            ),
126
+            array(
127
+                'id'       => 'opt-select-tags',
128
+                'type'     => 'select',
129
+                'data'     => 'tags',
130
+                'title'    => esc_html__( 'Tags Select Option', 'your-textdomain-here' ),
131
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
132
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
133
+            ),
134
+            array(
135
+                'id'       => 'opt-multi-select-tags',
136
+                'type'     => 'select',
137
+                'data'     => 'terms',
138
+                'multi'    => true,
139
+                'title'    => esc_html__( 'Tags Multi Select Option', 'your-textdomain-here' ),
140
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
141
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
142
+            ),
143
+            array(
144
+                'id'       => 'opt-select-terms',
145
+                'type'     => 'select',
146
+                'data'     => 'terms',
147
+                'title'    => esc_html__( 'Terms Select Option', 'your-textdomain-here' ),
148
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
149
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
150
+            ),
151
+            array(
152
+                'id'       => 'opt-multi-select-terms',
153
+                'type'     => 'select',
154
+                'data'     => 'terms',
155
+                'multi'    => true,
156
+                'title'    => esc_html__( 'Terms Multi Select Option', 'your-textdomain-here' ),
157
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
158
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
159
+            ),
160
+            array(
161
+                'id'       => 'opt-select-menus',
162
+                'type'     => 'select',
163
+                'data'     => 'menus',
164
+                'title'    => esc_html__( 'Menus Select Option', 'your-textdomain-here' ),
165
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
166
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
167
+            ),
168
+            array(
169
+                'id'       => 'opt-multi-select-menus',
170
+                'type'     => 'select',
171
+                'data'     => 'menu',
172
+                'multi'    => true,
173
+                'title'    => esc_html__( 'Menus Multi Select Option', 'your-textdomain-here' ),
174
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
175
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
176
+            ),
177
+            array(
178
+                'id'       => 'opt-select-post-type',
179
+                'type'     => 'select',
180
+                'data'     => 'post_type',
181
+                'title'    => esc_html__( 'Post Type Select Option', 'your-textdomain-here' ),
182
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
183
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
184
+            ),
185
+            array(
186
+                'id'       => 'opt-multi-select-post-type',
187
+                'type'     => 'select',
188
+                'data'     => 'post_type',
189
+                'multi'    => true,
190
+                'title'    => esc_html__( 'Post Type Multi Select Option', 'your-textdomain-here' ),
191
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
192
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
193
+            ),
194
+            array(
195
+                'id'       => 'opt-multi-select-sortable',
196
+                'type'     => 'select',
197
+                'data'     => 'post_type',
198
+                'multi'    => true,
199
+                'sortable' => true,
200
+                'title'    => esc_html__( 'Post Type Multi Select Option + Sortable', 'your-textdomain-here' ),
201
+                'subtitle' => esc_html__( 'This field also has sortable enabled!', 'your-textdomain-here' ),
202
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
203
+            ),
204
+            array(
205
+                'id'       => 'opt-select-posts',
206
+                'type'     => 'select',
207
+                'data'     => 'post',
208
+                'title'    => esc_html__( 'Posts Select Option2', 'your-textdomain-here' ),
209
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
210
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
211
+            ),
212
+            array(
213
+                'id'       => 'opt-multi-select-posts',
214
+                'type'     => 'select',
215
+                'data'     => 'post',
216
+                'multi'    => true,
217
+                'title'    => esc_html__( 'Posts Multi Select Option', 'your-textdomain-here' ),
218
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
219
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
220
+            ),
221
+            array(
222
+                'id'       => 'opt-select-roles',
223
+                'type'     => 'select',
224
+                'data'     => 'roles',
225
+                'title'    => esc_html__( 'User Role Select Option', 'your-textdomain-here' ),
226
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
227
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
228
+            ),
229
+            array(
230
+                'id'               => 'opt-select-capabilities',
231
+                'type'             => 'select',
232
+                'data'             => 'capabilities',
233
+                'multi'            => false,
234
+                'ajax'             => true,
235
+                'min_input_length' => 3,
236
+                'title'            => esc_html__( 'Capabilities Select Option w/ AJAX Loading', 'your-textdomain-here' ),
237
+                'subtitle'         => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
238
+                'desc'             => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
239
+            ),
240
+            array(
241
+                'id'       => 'opt-select-elusive',
242
+                'type'     => 'select',
243
+                'data'     => 'elusive-icons',
244
+                'title'    => esc_html__( 'Elusive Icons Select Option', 'your-textdomain-here' ),
245
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
246
+                'desc'     => esc_html__( 'Here\'s a list of all the elusive icons by name and icon.', 'your-textdomain-here' ),
247
+            ),
248
+            array(
249
+                'id'               => 'opt-select-users',
250
+                'type'             => 'select',
251
+                'data'             => 'users',
252
+                'ajax'             => true,
253
+                'min_input_length' => 3,
254
+                'title'            => esc_html__( 'Users Select Option', 'your-textdomain-here' ),
255
+                'subtitle'         => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
256
+                'desc'             => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
257
+            ),
258
+            array(
259
+                'id'       => 'opt-select-callback',
260
+                'type'     => 'select',
261
+                'data'     => 'callback',
262
+                'args'     => 'redux_select_callback',
263
+                'title'    => esc_html__( 'Select Option using a Callback', 'your-textdomain-here' ),
264
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
265
+                'desc'     => esc_html__( 'The items in this select were added via a callback function.', 'your-textdomain-here' ),
266
+            ),
267
+        ),
268
+    )
269 269
 );
270 270
 
271 271
 /**
@@ -274,13 +274,13 @@  discard block
 block discarded – undo
274 274
  * @return array
275 275
  */
276 276
 function redux_select_callback(): array {
277
-	$options = array();
277
+    $options = array();
278 278
 
279
-	$options[0] = esc_html__( 'Zero', 'your-textdomain-here' );
280
-	$options[1] = esc_html__( 'One', 'your-textdomain-here' );
281
-	$options[2] = esc_html__( 'Two', 'your-textdomain-here' );
282
-	$options[3] = esc_html__( 'Three', 'your-textdomain-here' );
279
+    $options[0] = esc_html__( 'Zero', 'your-textdomain-here' );
280
+    $options[1] = esc_html__( 'One', 'your-textdomain-here' );
281
+    $options[2] = esc_html__( 'Two', 'your-textdomain-here' );
282
+    $options[3] = esc_html__( 'Three', 'your-textdomain-here' );
283 283
 
284
-	return $options;
284
+    return $options;
285 285
 }
286 286
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/select-fields/image-select.php 1 patch
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -10,113 +10,113 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Image Select', 'your-textdomain-here' ),
16
-		'id'         => 'select-image_select',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/image-select.html" target="_blank">https://devs.redux.io/core-fields/image-select.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-image-select-layout',
22
-				'type'     => 'image_select',
23
-				'title'    => esc_html__( 'Images Option for Layout', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
25
-				'desc'     => esc_html__( 'This uses some of the built in images, you can use them for layout options.', 'your-textdomain-here' ),
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Image Select', 'your-textdomain-here' ),
16
+        'id'         => 'select-image_select',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/image-select.html" target="_blank">https://devs.redux.io/core-fields/image-select.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-image-select-layout',
22
+                'type'     => 'image_select',
23
+                'title'    => esc_html__( 'Images Option for Layout', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
25
+                'desc'     => esc_html__( 'This uses some of the built in images, you can use them for layout options.', 'your-textdomain-here' ),
26 26
 
27
-				// Must provide key => value(array:title|img) pairs for radio options.
28
-				'options'  => array(
29
-					'1' => array(
30
-						'alt' => '1 Column',
31
-						'img' => Redux_Core::$url . 'assets/img/1col.png',
32
-					),
33
-					'2' => array(
34
-						'alt' => '2 Column Left',
35
-						'img' => Redux_Core::$url . 'assets/img/2cl.png',
36
-					),
37
-					'3' => array(
38
-						'alt' => '2 Column Right',
39
-						'img' => Redux_Core::$url . 'assets/img/2cr.png',
40
-					),
41
-					'4' => array(
42
-						'alt' => '3 Column Middle',
43
-						'img' => Redux_Core::$url . 'assets/img/3cm.png',
44
-					),
45
-					'5' => array(
46
-						'alt' => '3 Column Left',
47
-						'img' => Redux_Core::$url . 'assets/img/3cl.png',
48
-					),
49
-					'6' => array(
50
-						'alt' => '3 Column Right',
51
-						'img' => Redux_Core::$url . 'assets/img/3cr.png',
52
-					),
53
-				),
54
-				'default'  => '2',
55
-			),
56
-			array(
57
-				'id'       => 'opt-patterns',
58
-				'type'     => 'image_select',
59
-				'tiles'    => true,
60
-				'title'    => esc_html__( 'Images Option (with tiles => true)', 'your-textdomain-here' ),
61
-				'subtitle' => esc_html__( 'Select a background pattern.', 'your-textdomain-here' ),
62
-				'default'  => 0,
63
-				'options'  => $sample_patterns,
64
-			),
65
-			array(
66
-				'id'       => 'opt-image-select',
67
-				'type'     => 'image_select',
68
-				'title'    => esc_html__( 'Images Option', 'your-textdomain-here' ),
69
-				'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
70
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
27
+                // Must provide key => value(array:title|img) pairs for radio options.
28
+                'options'  => array(
29
+                    '1' => array(
30
+                        'alt' => '1 Column',
31
+                        'img' => Redux_Core::$url . 'assets/img/1col.png',
32
+                    ),
33
+                    '2' => array(
34
+                        'alt' => '2 Column Left',
35
+                        'img' => Redux_Core::$url . 'assets/img/2cl.png',
36
+                    ),
37
+                    '3' => array(
38
+                        'alt' => '2 Column Right',
39
+                        'img' => Redux_Core::$url . 'assets/img/2cr.png',
40
+                    ),
41
+                    '4' => array(
42
+                        'alt' => '3 Column Middle',
43
+                        'img' => Redux_Core::$url . 'assets/img/3cm.png',
44
+                    ),
45
+                    '5' => array(
46
+                        'alt' => '3 Column Left',
47
+                        'img' => Redux_Core::$url . 'assets/img/3cl.png',
48
+                    ),
49
+                    '6' => array(
50
+                        'alt' => '3 Column Right',
51
+                        'img' => Redux_Core::$url . 'assets/img/3cr.png',
52
+                    ),
53
+                ),
54
+                'default'  => '2',
55
+            ),
56
+            array(
57
+                'id'       => 'opt-patterns',
58
+                'type'     => 'image_select',
59
+                'tiles'    => true,
60
+                'title'    => esc_html__( 'Images Option (with tiles => true)', 'your-textdomain-here' ),
61
+                'subtitle' => esc_html__( 'Select a background pattern.', 'your-textdomain-here' ),
62
+                'default'  => 0,
63
+                'options'  => $sample_patterns,
64
+            ),
65
+            array(
66
+                'id'       => 'opt-image-select',
67
+                'type'     => 'image_select',
68
+                'title'    => esc_html__( 'Images Option', 'your-textdomain-here' ),
69
+                'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
70
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
71 71
 
72
-				// Must provide key => value(array:title|img) pairs for radio options.
73
-				'options'  => array(
74
-					'1' => array(
75
-						'title' => 'Opt 1',
76
-						'img'   => admin_url() . 'images/align-none.png',
77
-					),
78
-					'2' => array(
79
-						'title' => 'Opt 2',
80
-						'img'   => admin_url() . 'images/align-left.png',
81
-					),
82
-					'3' => array(
83
-						'title' => 'Opt 3',
84
-						'img'   => admin_url() . 'images/align-center.png',
85
-					),
86
-					'4' => array(
87
-						'title' => 'Opt 4',
88
-						'img'   => admin_url() . 'images/align-right.png',
89
-					),
90
-				),
91
-				'default'  => '2',
92
-			),
93
-			array(
94
-				'id'         => 'opt-presets',
95
-				'type'       => 'image_select',
96
-				'presets'    => true,
97
-				'full_width' => true,
98
-				'title'      => esc_html__( 'Preset', 'your-textdomain-here' ),
99
-				'subtitle'   => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
100
-				'default'    => 0,
101
-				'desc'       => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
102
-				'options'    => array(
103
-					'1' => array(
104
-						'alt'     => 'Preset 1',
105
-						'img'     => Redux_Core::$url . '../sample/presets/preset1.png',
106
-						'presets' => array(
107
-							'switch-on'     => 1,
108
-							'switch-off'    => 1,
109
-							'switch-parent' => 1,
110
-						),
111
-					),
112
-					'2' => array(
113
-						'alt'     => 'Preset 2',
114
-						'img'     => Redux_Core::$url . '../sample/presets/preset2.png',
115
-						'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}',
116
-					),
117
-				),
118
-			),
119
-		),
120
-	)
72
+                // Must provide key => value(array:title|img) pairs for radio options.
73
+                'options'  => array(
74
+                    '1' => array(
75
+                        'title' => 'Opt 1',
76
+                        'img'   => admin_url() . 'images/align-none.png',
77
+                    ),
78
+                    '2' => array(
79
+                        'title' => 'Opt 2',
80
+                        'img'   => admin_url() . 'images/align-left.png',
81
+                    ),
82
+                    '3' => array(
83
+                        'title' => 'Opt 3',
84
+                        'img'   => admin_url() . 'images/align-center.png',
85
+                    ),
86
+                    '4' => array(
87
+                        'title' => 'Opt 4',
88
+                        'img'   => admin_url() . 'images/align-right.png',
89
+                    ),
90
+                ),
91
+                'default'  => '2',
92
+            ),
93
+            array(
94
+                'id'         => 'opt-presets',
95
+                'type'       => 'image_select',
96
+                'presets'    => true,
97
+                'full_width' => true,
98
+                'title'      => esc_html__( 'Preset', 'your-textdomain-here' ),
99
+                'subtitle'   => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
100
+                'default'    => 0,
101
+                'desc'       => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
102
+                'options'    => array(
103
+                    '1' => array(
104
+                        'alt'     => 'Preset 1',
105
+                        'img'     => Redux_Core::$url . '../sample/presets/preset1.png',
106
+                        'presets' => array(
107
+                            'switch-on'     => 1,
108
+                            'switch-off'    => 1,
109
+                            'switch-parent' => 1,
110
+                        ),
111
+                    ),
112
+                    '2' => array(
113
+                        'alt'     => 'Preset 2',
114
+                        'img'     => Redux_Core::$url . '../sample/presets/preset2.png',
115
+                        'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}',
116
+                    ),
117
+                ),
118
+            ),
119
+        ),
120
+    )
121 121
 );
122 122
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/select-fields/select-image.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -10,45 +10,45 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Select Image', 'your-textdomain-here' ),
16
-		'id'         => 'select-select_image',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select-image.html" target="_blank">https://devs.redux.io/core-fields/select-image.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'      => 'opt-select_image',
22
-				'type'    => 'select_image',
23
-				'presets' => true,
24
-				'title'   => esc_html__( 'Select Image', 'your-textdomain-here' ),
25
-				'options' => array(
26
-					array(
27
-						'alt'     => 'Preset 1',
28
-						'img'     => Redux_Core::$url . '../sample/presets/preset1.png',
29
-						'presets' => array(
30
-							'switch-on'     => 1,
31
-							'switch-off'    => 1,
32
-							'switch-parent' => 1,
33
-						),
34
-					),
35
-					array(
36
-						'alt'     => 'Preset 2',
37
-						'img'     => Redux_Core::$url . '../sample/presets/preset2.png',
38
-						'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}',
39
-					),
40
-				),
41
-				'default' => Redux_Core::$url . '../sample/presets/preset2.png',
42
-			),
43
-			array(
44
-				'id'       => 'opt-select-image',
45
-				'type'     => 'select_image',
46
-				'title'    => esc_html__( 'Select Image', 'your-textdomain-here' ),
47
-				'subtitle' => esc_html__( 'A preview of the selected image will appear underneath the select box.', 'your-textdomain-here' ),
48
-				'options'  => $sample_patterns,
49
-				'default'  => Redux_Core::$url . '../sample/patterns/triangular.png',
50
-			),
51
-		),
52
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Select Image', 'your-textdomain-here' ),
16
+        'id'         => 'select-select_image',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select-image.html" target="_blank">https://devs.redux.io/core-fields/select-image.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'      => 'opt-select_image',
22
+                'type'    => 'select_image',
23
+                'presets' => true,
24
+                'title'   => esc_html__( 'Select Image', 'your-textdomain-here' ),
25
+                'options' => array(
26
+                    array(
27
+                        'alt'     => 'Preset 1',
28
+                        'img'     => Redux_Core::$url . '../sample/presets/preset1.png',
29
+                        'presets' => array(
30
+                            'switch-on'     => 1,
31
+                            'switch-off'    => 1,
32
+                            'switch-parent' => 1,
33
+                        ),
34
+                    ),
35
+                    array(
36
+                        'alt'     => 'Preset 2',
37
+                        'img'     => Redux_Core::$url . '../sample/presets/preset2.png',
38
+                        'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}',
39
+                    ),
40
+                ),
41
+                'default' => Redux_Core::$url . '../sample/presets/preset2.png',
42
+            ),
43
+            array(
44
+                'id'       => 'opt-select-image',
45
+                'type'     => 'select_image',
46
+                'title'    => esc_html__( 'Select Image', 'your-textdomain-here' ),
47
+                'subtitle' => esc_html__( 'A preview of the selected image will appear underneath the select box.', 'your-textdomain-here' ),
48
+                'options'  => $sample_patterns,
49
+                'default'  => Redux_Core::$url . '../sample/patterns/triangular.png',
50
+            ),
51
+        ),
52
+    )
53 53
 );
54 54
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/design-fields/box-shadow.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -10,36 +10,36 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
16
-		'id'         => 'design-box-shadow',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/box-shadow.html" target="_blank">https://devs.redux.io/core-fields/box_shadow.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'          => 'opt-box_shadow',
22
-				'type'        => 'box_shadow',
23
-				'output'      => array( '.site-header, header' ),
24
-				'media_query' => array(
25
-					'output'   => true,
26
-					'compiler' => true,
27
-					'queries'  => array(
28
-						array(
29
-							'rule'      => 'screen and (max-width: 360px)',
30
-							'selectors' => array( '.box-shadow' ),
31
-						),
32
-						array(
33
-							'rule'      => 'screen and (max-width: 1120px)',
34
-							'selectors' => array( '.box-shadow-wide' ),
35
-						),
36
-					),
37
-				),
38
-				'title'       => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
39
-				'subtitle'    => esc_html__( 'Site Header Box Shadow with inset and drop shadows.', 'your-textdomain-here' ),
40
-				'desc'        => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
41
-			),
42
-		),
43
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
16
+        'id'         => 'design-box-shadow',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/box-shadow.html" target="_blank">https://devs.redux.io/core-fields/box_shadow.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'          => 'opt-box_shadow',
22
+                'type'        => 'box_shadow',
23
+                'output'      => array( '.site-header, header' ),
24
+                'media_query' => array(
25
+                    'output'   => true,
26
+                    'compiler' => true,
27
+                    'queries'  => array(
28
+                        array(
29
+                            'rule'      => 'screen and (max-width: 360px)',
30
+                            'selectors' => array( '.box-shadow' ),
31
+                        ),
32
+                        array(
33
+                            'rule'      => 'screen and (max-width: 1120px)',
34
+                            'selectors' => array( '.box-shadow-wide' ),
35
+                        ),
36
+                    ),
37
+                ),
38
+                'title'       => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
39
+                'subtitle'    => esc_html__( 'Site Header Box Shadow with inset and drop shadows.', 'your-textdomain-here' ),
40
+                'desc'        => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
41
+            ),
42
+        ),
43
+    )
44 44
 );
45 45
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/design-fields/background.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,27 +10,27 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Background', 'your-textdomain-here' ),
16
-		'id'         => 'design-background',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/background.html" target="_blank">https://devs.redux.io/core-fields/background.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-background',
22
-				'type'     => 'background',
23
-				'output'   => array(
24
-					'background-color' => 'body',
25
-					'important'        => true,
26
-				),
27
-				'default'  => array(
28
-					'background-color' => '#d1b7e2',
29
-				),
30
-				'title'    => __( 'Body Background', 'your-textdomain-here' ),
31
-				'subtitle' => __( 'Body background with image, color, etc.', 'your-textdomain-here' ),
32
-			),
33
-		),
34
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Background', 'your-textdomain-here' ),
16
+        'id'         => 'design-background',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/background.html" target="_blank">https://devs.redux.io/core-fields/background.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-background',
22
+                'type'     => 'background',
23
+                'output'   => array(
24
+                    'background-color' => 'body',
25
+                    'important'        => true,
26
+                ),
27
+                'default'  => array(
28
+                    'background-color' => '#d1b7e2',
29
+                ),
30
+                'title'    => __( 'Body Background', 'your-textdomain-here' ),
31
+                'subtitle' => __( 'Body background with image, color, etc.', 'your-textdomain-here' ),
32
+            ),
33
+        ),
34
+    )
35 35
 );
36 36
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/design-fields/dimensions.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -10,41 +10,41 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Dimensions', 'your-textdomain-here' ),
16
-		'id'         => 'design-dimensions',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/dimensions.html" target="_blank">https://devs.redux.io/core-fields/dimensions.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'             => 'opt-dimensions',
22
-				'type'           => 'dimensions',
23
-				'units'          => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %.
24
-				'units_extended' => 'true', // Allow users to select any type of unit.
25
-				'title'          => esc_html__( 'Dimensions (Width/Height) Option', 'your-textdomain-here' ),
26
-				'subtitle'       => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ),
27
-				'desc'           => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ),
28
-				'default'        => array(
29
-					'width'  => 200,
30
-					'height' => 100,
31
-				),
32
-			),
33
-			array(
34
-				'id'             => 'opt-dimensions-width',
35
-				'type'           => 'dimensions',
36
-				'units'          => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %.
37
-				'units_extended' => 'true', // Allow users to select any type of unit.
38
-				'title'          => esc_html__( 'Dimensions (Width) Option', 'your-textdomain-here' ),
39
-				'subtitle'       => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ),
40
-				'desc'           => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ),
41
-				'height'         => false,
42
-				'default'        => array(
43
-					'width'  => 200,
44
-					'height' => 100,
45
-				),
46
-			),
47
-		),
48
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Dimensions', 'your-textdomain-here' ),
16
+        'id'         => 'design-dimensions',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/dimensions.html" target="_blank">https://devs.redux.io/core-fields/dimensions.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'             => 'opt-dimensions',
22
+                'type'           => 'dimensions',
23
+                'units'          => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %.
24
+                'units_extended' => 'true', // Allow users to select any type of unit.
25
+                'title'          => esc_html__( 'Dimensions (Width/Height) Option', 'your-textdomain-here' ),
26
+                'subtitle'       => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ),
27
+                'desc'           => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ),
28
+                'default'        => array(
29
+                    'width'  => 200,
30
+                    'height' => 100,
31
+                ),
32
+            ),
33
+            array(
34
+                'id'             => 'opt-dimensions-width',
35
+                'type'           => 'dimensions',
36
+                'units'          => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %.
37
+                'units_extended' => 'true', // Allow users to select any type of unit.
38
+                'title'          => esc_html__( 'Dimensions (Width) Option', 'your-textdomain-here' ),
39
+                'subtitle'       => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ),
40
+                'desc'           => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ),
41
+                'height'         => false,
42
+                'default'        => array(
43
+                    'width'  => 200,
44
+                    'height' => 100,
45
+                ),
46
+            ),
47
+        ),
48
+    )
49 49
 );
50 50
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/design-fields/spacing.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -10,67 +10,67 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Spacing', 'your-textdomain-here' ),
16
-		'id'         => 'design-spacing',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/spacing.html" target="_blank">https://devs.redux.io/core-fields/spacing.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'            => 'opt-spacing',
22
-				'type'          => 'spacing',
23
-				'output'        => array( '.site-header, header' ),
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Spacing', 'your-textdomain-here' ),
16
+        'id'         => 'design-spacing',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/spacing.html" target="_blank">https://devs.redux.io/core-fields/spacing.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'            => 'opt-spacing',
22
+                'type'          => 'spacing',
23
+                'output'        => array( '.site-header, header' ),
24 24
 
25
-				// absolute, padding, margin, defaults to padding.
26
-				'mode'          => 'margin',
25
+                // absolute, padding, margin, defaults to padding.
26
+                'mode'          => 'margin',
27 27
 
28
-				// Have one field that applies to all.
29
-				'all'           => true,
28
+                // Have one field that applies to all.
29
+                'all'           => true,
30 30
 
31
-				// You can specify a unit value. Possible: px, em, %.
32
-				'units'         => 'em',
31
+                // You can specify a unit value. Possible: px, em, %.
32
+                'units'         => 'em',
33 33
 
34
-				// Set to false to hide the units if the units are specified.
35
-				'display_units' => false,
36
-				'title'         => esc_html__( 'Padding/Margin Option', 'your-textdomain-here' ),
37
-				'subtitle'      => esc_html__( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ),
38
-				'desc'          => esc_html__( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ),
39
-				'default'       => array(
40
-					'margin-top'    => '1',
41
-					'margin-right'  => '2',
42
-					'margin-bottom' => '3',
43
-					'margin-left'   => '4',
44
-					'units'         => 'em',
45
-				),
34
+                // Set to false to hide the units if the units are specified.
35
+                'display_units' => false,
36
+                'title'         => esc_html__( 'Padding/Margin Option', 'your-textdomain-here' ),
37
+                'subtitle'      => esc_html__( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ),
38
+                'desc'          => esc_html__( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ),
39
+                'default'       => array(
40
+                    'margin-top'    => '1',
41
+                    'margin-right'  => '2',
42
+                    'margin-bottom' => '3',
43
+                    'margin-left'   => '4',
44
+                    'units'         => 'em',
45
+                ),
46 46
 
47
-				// phpcs:ignore Squiz.PHP.CommentedOutCode
48
-				// Allow users to select any type of unit.
49
-				// 'units_extended'=> 'true',    // Enable extended units.
50
-				// 'top'           => false,     // Disable the top.
51
-				// 'right'         => false,     // Disable the right.
52
-				// 'bottom'        => false,     // Disable the bottom.
53
-				// 'left'          => false,     // Disable the left.
54
-			),
55
-			array(
56
-				'id'             => 'opt-spacing-expanded',
57
-				'type'           => 'spacing',
58
-				'mode'           => 'margin',
59
-				'all'            => false,
60
-				'units'          => array( 'em', 'px', '%' ),
61
-				'units_extended' => true,
62
-				'title'          => __( 'Padding/Margin Option', 'your-textdomain-here' ),
63
-				'subtitle'       => __( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ),
64
-				'desc'           => __( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ),
65
-				'default'        => array(
66
-					'margin-top'    => '1',
67
-					'margin-right'  => '2',
68
-					'margin-bottom' => '3',
69
-					'margin-left'   => '5',
70
-					'units'         => 'em',
71
-				),
72
-			),
73
-		),
74
-	)
47
+                // phpcs:ignore Squiz.PHP.CommentedOutCode
48
+                // Allow users to select any type of unit.
49
+                // 'units_extended'=> 'true',    // Enable extended units.
50
+                // 'top'           => false,     // Disable the top.
51
+                // 'right'         => false,     // Disable the right.
52
+                // 'bottom'        => false,     // Disable the bottom.
53
+                // 'left'          => false,     // Disable the left.
54
+            ),
55
+            array(
56
+                'id'             => 'opt-spacing-expanded',
57
+                'type'           => 'spacing',
58
+                'mode'           => 'margin',
59
+                'all'            => false,
60
+                'units'          => array( 'em', 'px', '%' ),
61
+                'units_extended' => true,
62
+                'title'          => __( 'Padding/Margin Option', 'your-textdomain-here' ),
63
+                'subtitle'       => __( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ),
64
+                'desc'           => __( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ),
65
+                'default'        => array(
66
+                    'margin-top'    => '1',
67
+                    'margin-right'  => '2',
68
+                    'margin-bottom' => '3',
69
+                    'margin-left'   => '5',
70
+                    'units'         => 'em',
71
+                ),
72
+            ),
73
+        ),
74
+    )
75 75
 );
76 76
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/design-fields/border.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -10,47 +10,47 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Border', 'your-textdomain-here' ),
16
-		'id'         => 'design-border',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/border.html" target="_blank">https://devs.redux.io/core-fields/border.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-header-border',
22
-				'type'     => 'border',
23
-				'title'    => esc_html__( 'Header Border Option', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
25
-				'output'   => array( '.site-header, header' ),
26
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
27
-				'default'  => array(
28
-					'border-color'  => '#1e73be',
29
-					'border-style'  => 'solid',
30
-					'border-top'    => '3px',
31
-					'border-right'  => '3px',
32
-					'border-bottom' => '3px',
33
-					'border-left'   => '3px',
34
-				),
35
-			),
36
-			array(
37
-				'id'       => 'opt-header-border-expanded',
38
-				'type'     => 'border',
39
-				'title'    => esc_html__( 'Body Border Option', 'your-textdomain-here' ),
40
-				'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
41
-				'output'   => array( 'body' ),
42
-				'all'      => false,
43
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
44
-				'default'  => array(
45
-					'border-color'  => '#1e73be',
46
-					'border-style'  => 'solid',
47
-					'border-top'    => '3px',
48
-					'border-right'  => '3px',
49
-					'border-bottom' => '3px',
50
-					'border-left'   => '3px',
51
-				),
52
-			),
53
-		),
54
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Border', 'your-textdomain-here' ),
16
+        'id'         => 'design-border',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/border.html" target="_blank">https://devs.redux.io/core-fields/border.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-header-border',
22
+                'type'     => 'border',
23
+                'title'    => esc_html__( 'Header Border Option', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
25
+                'output'   => array( '.site-header, header' ),
26
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
27
+                'default'  => array(
28
+                    'border-color'  => '#1e73be',
29
+                    'border-style'  => 'solid',
30
+                    'border-top'    => '3px',
31
+                    'border-right'  => '3px',
32
+                    'border-bottom' => '3px',
33
+                    'border-left'   => '3px',
34
+                ),
35
+            ),
36
+            array(
37
+                'id'       => 'opt-header-border-expanded',
38
+                'type'     => 'border',
39
+                'title'    => esc_html__( 'Body Border Option', 'your-textdomain-here' ),
40
+                'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
41
+                'output'   => array( 'body' ),
42
+                'all'      => false,
43
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
44
+                'default'  => array(
45
+                    'border-color'  => '#1e73be',
46
+                    'border-style'  => 'solid',
47
+                    'border-top'    => '3px',
48
+                    'border-right'  => '3px',
49
+                    'border-bottom' => '3px',
50
+                    'border-left'   => '3px',
51
+                ),
52
+            ),
53
+        ),
54
+    )
55 55
 );
56 56
 // phpcs:enable
Please login to merge, or discard this patch.