Completed
Push — master ( e2a4d2...ed335c )
by
unknown
55s
created
sample/sections/color-selection/color-gradient.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -10,34 +10,34 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Color Gradient', 'your-textdomain-here' ),
16
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color-gradient.html" target="_blank">https://devs.redux.io/core-fields/color-gradient.html</a>',
17
-		'id'         => 'color-gradient',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'             => 'opt-color-header',
22
-				'type'           => 'color_gradient',
23
-				'title'          => esc_html__( 'Header Gradient Color Option', 'your-textdomain-here' ),
24
-				'subtitle'       => esc_html__( 'Only color 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
-				'output'         => '.site-header, header',
27
-				'gradient-type'  => true,
28
-				'gradient-reach' => true,
29
-				'gradient-angle' => true,
30
-				'preview'        => true,
31
-				'default'        => array(
32
-					'from'           => '#1e73be',
33
-					'to'             => '#00897e',
34
-					'gradient-reach' => array(
35
-						'to'   => 50,
36
-						'from' => 0,
37
-					),
38
-				),
39
-			),
40
-		),
41
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Color Gradient', 'your-textdomain-here' ),
16
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color-gradient.html" target="_blank">https://devs.redux.io/core-fields/color-gradient.html</a>',
17
+        'id'         => 'color-gradient',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'             => 'opt-color-header',
22
+                'type'           => 'color_gradient',
23
+                'title'          => esc_html__( 'Header Gradient Color Option', 'your-textdomain-here' ),
24
+                'subtitle'       => esc_html__( 'Only color 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
+                'output'         => '.site-header, header',
27
+                'gradient-type'  => true,
28
+                'gradient-reach' => true,
29
+                'gradient-angle' => true,
30
+                'preview'        => true,
31
+                'default'        => array(
32
+                    'from'           => '#1e73be',
33
+                    'to'             => '#00897e',
34
+                    'gradient-reach' => array(
35
+                        'to'   => 50,
36
+                        'from' => 0,
37
+                    ),
38
+                ),
39
+            ),
40
+        ),
41
+    )
42 42
 );
43 43
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/color-selection/color.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -10,40 +10,40 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Color', 'your-textdomain-here' ),
16
-		'id'         => 'opt-color',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color.html" target="_blank">https://devs.redux.io/core-fields/color.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'          => 'opt-color-title',
22
-				'type'        => 'color',
23
-				'output'      => array(
24
-					'color'     => '.site-title, .wp-block-site-title a',
25
-					'important' => true,
26
-				),
27
-				'title'       => esc_html__( 'Site Title Color', 'your-textdomain-here' ),
28
-				'subtitle'    => esc_html__( 'Pick a title color for the theme (default: #000).', 'your-textdomain-here' ),
29
-				'default'     => '#000000',
30
-				// 'color_alpha' => true,
31
-				'transparent' => false,
32
-				'validate'    => 'color',
33
-			),
34
-			array(
35
-				'id'          => 'opt-color-footer',
36
-				'type'        => 'color',
37
-				'title'       => esc_html__( 'Footer Background Color', 'your-textdomain-here' ),
38
-				'subtitle'    => esc_html__( 'Pick a background color for the footer (default: #dd9933).', 'your-textdomain-here' ),
39
-				'default'     => '#dd9933',
40
-				'transparent' => false,
41
-				'validate'    => 'color',
42
-				'output'      => array(
43
-					'background-color' => '.footer, #site-footer, .site-footer, footer',
44
-				),
45
-			),
46
-		),
47
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Color', 'your-textdomain-here' ),
16
+        'id'         => 'opt-color',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color.html" target="_blank">https://devs.redux.io/core-fields/color.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'          => 'opt-color-title',
22
+                'type'        => 'color',
23
+                'output'      => array(
24
+                    'color'     => '.site-title, .wp-block-site-title a',
25
+                    'important' => true,
26
+                ),
27
+                'title'       => esc_html__( 'Site Title Color', 'your-textdomain-here' ),
28
+                'subtitle'    => esc_html__( 'Pick a title color for the theme (default: #000).', 'your-textdomain-here' ),
29
+                'default'     => '#000000',
30
+                // 'color_alpha' => true,
31
+                'transparent' => false,
32
+                'validate'    => 'color',
33
+            ),
34
+            array(
35
+                'id'          => 'opt-color-footer',
36
+                'type'        => 'color',
37
+                'title'       => esc_html__( 'Footer Background Color', 'your-textdomain-here' ),
38
+                'subtitle'    => esc_html__( 'Pick a background color for the footer (default: #dd9933).', 'your-textdomain-here' ),
39
+                'default'     => '#dd9933',
40
+                'transparent' => false,
41
+                'validate'    => 'color',
42
+                'output'      => array(
43
+                    'background-color' => '.footer, #site-footer, .site-footer, footer',
44
+                ),
45
+            ),
46
+        ),
47
+    )
48 48
 );
49 49
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/color-selection/palette.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -10,43 +10,43 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Palette', 'your-textdomain-here' ),
16
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/palette-color.html" target="_blank">https://devs.redux.io/core-fields/palette-color.html</a>',
17
-		'id'         => 'palette',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-palette-color',
22
-				'type'     => 'palette',
23
-				'title'    => esc_html__( 'Palette Color Option', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'Only color 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
-				'default'  => 'red',
27
-				'palettes' => array(
28
-					'red'  => array(
29
-						'#ef9a9a',
30
-						'#f44336',
31
-						'#ff1744',
32
-					),
33
-					'pink' => array(
34
-						'#fce4ec',
35
-						'#f06292',
36
-						'#e91e63',
37
-						'#ad1457',
38
-						'#f50057',
39
-					),
40
-					'cyan' => array(
41
-						'#e0f7fa',
42
-						'#80deea',
43
-						'#26c6da',
44
-						'#0097a7',
45
-						'#00e5ff',
46
-					),
47
-				),
48
-			),
49
-		),
50
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Palette', 'your-textdomain-here' ),
16
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/palette-color.html" target="_blank">https://devs.redux.io/core-fields/palette-color.html</a>',
17
+        'id'         => 'palette',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-palette-color',
22
+                'type'     => 'palette',
23
+                'title'    => esc_html__( 'Palette Color Option', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'Only color 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
+                'default'  => 'red',
27
+                'palettes' => array(
28
+                    'red'  => array(
29
+                        '#ef9a9a',
30
+                        '#f44336',
31
+                        '#ff1744',
32
+                    ),
33
+                    'pink' => array(
34
+                        '#fce4ec',
35
+                        '#f06292',
36
+                        '#e91e63',
37
+                        '#ad1457',
38
+                        '#f50057',
39
+                    ),
40
+                    'cyan' => array(
41
+                        '#e0f7fa',
42
+                        '#80deea',
43
+                        '#26c6da',
44
+                        '#0097a7',
45
+                        '#00e5ff',
46
+                    ),
47
+                ),
48
+            ),
49
+        ),
50
+    )
51 51
 );
52 52
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/extensions/users.php 2 patches
Indentation   +189 added lines, -189 removed lines patch added patch discarded remove patch
@@ -10,206 +10,206 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 if ( ! class_exists( 'Redux_Users' ) ) {
13
-	return;
13
+    return;
14 14
 }
15 15
 
16 16
 // Change the priority the Redux_Users boxes appear.
17 17
 Redux_Users::set_Args(
18
-	$opt_name,
19
-	array(
20
-		'user_priority' => 50,
21
-	)
18
+    $opt_name,
19
+    array(
20
+        'user_priority' => 50,
21
+    )
22 22
 );
23 23
 
24 24
 Redux_Users::set_profile(
25
-	$opt_name,
26
-	array(
27
-		'id'       => 'demo-users',
28
-		'title'    => esc_html__( 'Cool Options', 'your-textdomain-here' ),
29
-		'style'    => 'wp',
30
-		'sections' => array(
31
-			array(
32
-				'title'  => esc_html__( 'User Settings', 'your-textdomain-here' ),
33
-				'icon'   => 'el-icon-home',
34
-				'fields' => array(
35
-					array(
36
-						'id'    => 'user-text',
37
-						'type'  => 'text',
38
-						'title' => esc_html__( 'Input 1', 'your-textdomain-here' ),
39
-					),
40
-					array(
41
-						'id'    => 'user-text-2',
42
-						'type'  => 'text',
43
-						'title' => esc_html__( 'Input 2', 'your-textdomain-here' ),
44
-					),
45
-					array(
46
-						'id'    => 'user-text-3',
47
-						'type'  => 'text',
48
-						'title' => esc_html__( 'Input 3', 'your-textdomain-here' ),
49
-					),
50
-					array(
51
-						'id'       => 'user-web-fonts',
52
-						'type'     => 'media',
53
-						'title'    => esc_html__( 'Web Fonts', 'your-textdomain-here' ),
54
-						'compiler' => 'true',
55
-						'mode'     => false,
56
-						// Can be set to false allowing for any media type, or can also be set to any mime type.
57
-						'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
58
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
59
-					),
60
-					array(
61
-						'id'       => 'user-section-media-start',
62
-						'type'     => 'section',
63
-						'title'    => esc_html__( 'Media Options', 'your-textdomain-here' ),
64
-						'subtitle' => esc_html__( 'With the "section" field you can create indent option sections.', 'your-textdomain-here' ),
65
-						'indent'   => true,
66
-					),
67
-					array(
68
-						'id'       => 'user-mediaurl',
69
-						'type'     => 'media',
70
-						'url'      => true,
71
-						'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
72
-						'compiler' => 'true',
73
-						'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
74
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
75
-						'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
76
-					),
77
-					array(
78
-						'id'     => 'user-section-media-end',
79
-						'type'   => 'section',
80
-						'indent' => false,
81
-					),
82
-					array(
83
-						'id'       => 'user-media-nourl',
84
-						'type'     => 'media',
85
-						'title'    => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
86
-						'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
87
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
88
-					),
89
-					array(
90
-						'id'       => 'user-media-nopreview',
91
-						'type'     => 'media',
92
-						'preview'  => false,
93
-						'title'    => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
94
-						'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
95
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
96
-					),
97
-					array(
98
-						'id'       => 'user-gallery',
99
-						'type'     => 'gallery',
100
-						'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
101
-						'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
102
-						'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
103
-					),
104
-					array(
105
-						'id'      => 'user-slider-one',
106
-						'type'    => 'slider',
107
-						'title'   => esc_html__( 'JQuery UI Slider Example 1', 'your-textdomain-here' ),
108
-						'desc'    => esc_html__( 'JQuery UI slider description. Min: 1, max: 500, step: 3, default value: 45', 'your-textdomain-here' ),
109
-						'default' => '46',
110
-						'min'     => '1',
111
-						'step'    => '3',
112
-						'max'     => '500',
113
-					),
114
-					array(
115
-						'id'      => 'user-slider-two',
116
-						'type'    => 'slider',
117
-						'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
118
-						'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
119
-						'default' => '0',
120
-						'min'     => '0',
121
-						'step'    => '5',
122
-						'max'     => '300',
123
-					),
124
-					array(
125
-						'id'      => 'user-spinner',
126
-						'type'    => 'spinner',
127
-						'title'   => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
128
-						'desc'    => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
129
-						'default' => '40',
130
-						'min'     => '20',
131
-						'step'    => '20',
132
-						'max'     => '100',
133
-					),
134
-					array(
135
-						'id'       => 'user-switch-parent',
136
-						'type'     => 'switch',
137
-						'title'    => esc_html__( 'Switch - Nested Children, Enable to show', 'your-textdomain-here' ),
138
-						'subtitle' => esc_html__( 'Look, it\'s on! Also hidden child elements!', 'your-textdomain-here' ),
139
-						'default'  => 0,
140
-						'on'       => 'Enabled',
141
-						'off'      => 'Disabled',
142
-					),
143
-					array(
144
-						'id'       => 'user-switch-child',
145
-						'type'     => 'switch',
146
-						'required' => array( 'user-switch-parent', '=', '1' ),
147
-						'title'    => esc_html__( 'Switch - This and the next switch required for patterns to show', 'your-textdomain-here' ),
148
-						'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
149
-						'desc'     => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
150
-						'default'  => false,
151
-					),
152
-				),
153
-			),
154
-			array(
155
-				'title'  => esc_html__( 'Home Layout', 'your-textdomain-here' ),
156
-				'icon'   => 'el-icon-home',
157
-				'fields' => array(
158
-					array(
159
-						'id'       => 'user-homepage_blocks',
160
-						'type'     => 'sorter',
161
-						'title'    => 'Homepage Layout Manager',
162
-						'desc'     => 'Organize how you want the layout to appear on the homepage',
163
-						'compiler' => 'true',
164
-						'required' => array( 'layout', '=', '1' ),
165
-						'options'  => array(
166
-							'enabled'  => array(
167
-								'highlights' => 'Highlights',
168
-								'slider'     => 'Slider',
169
-								'staticpage' => 'Static Page',
170
-								'services'   => 'Services',
171
-							),
172
-							'disabled' => array(),
173
-						),
174
-					),
25
+    $opt_name,
26
+    array(
27
+        'id'       => 'demo-users',
28
+        'title'    => esc_html__( 'Cool Options', 'your-textdomain-here' ),
29
+        'style'    => 'wp',
30
+        'sections' => array(
31
+            array(
32
+                'title'  => esc_html__( 'User Settings', 'your-textdomain-here' ),
33
+                'icon'   => 'el-icon-home',
34
+                'fields' => array(
35
+                    array(
36
+                        'id'    => 'user-text',
37
+                        'type'  => 'text',
38
+                        'title' => esc_html__( 'Input 1', 'your-textdomain-here' ),
39
+                    ),
40
+                    array(
41
+                        'id'    => 'user-text-2',
42
+                        'type'  => 'text',
43
+                        'title' => esc_html__( 'Input 2', 'your-textdomain-here' ),
44
+                    ),
45
+                    array(
46
+                        'id'    => 'user-text-3',
47
+                        'type'  => 'text',
48
+                        'title' => esc_html__( 'Input 3', 'your-textdomain-here' ),
49
+                    ),
50
+                    array(
51
+                        'id'       => 'user-web-fonts',
52
+                        'type'     => 'media',
53
+                        'title'    => esc_html__( 'Web Fonts', 'your-textdomain-here' ),
54
+                        'compiler' => 'true',
55
+                        'mode'     => false,
56
+                        // Can be set to false allowing for any media type, or can also be set to any mime type.
57
+                        'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
58
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
59
+                    ),
60
+                    array(
61
+                        'id'       => 'user-section-media-start',
62
+                        'type'     => 'section',
63
+                        'title'    => esc_html__( 'Media Options', 'your-textdomain-here' ),
64
+                        'subtitle' => esc_html__( 'With the "section" field you can create indent option sections.', 'your-textdomain-here' ),
65
+                        'indent'   => true,
66
+                    ),
67
+                    array(
68
+                        'id'       => 'user-mediaurl',
69
+                        'type'     => 'media',
70
+                        'url'      => true,
71
+                        'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
72
+                        'compiler' => 'true',
73
+                        'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
74
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
75
+                        'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
76
+                    ),
77
+                    array(
78
+                        'id'     => 'user-section-media-end',
79
+                        'type'   => 'section',
80
+                        'indent' => false,
81
+                    ),
82
+                    array(
83
+                        'id'       => 'user-media-nourl',
84
+                        'type'     => 'media',
85
+                        'title'    => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
86
+                        'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
87
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
88
+                    ),
89
+                    array(
90
+                        'id'       => 'user-media-nopreview',
91
+                        'type'     => 'media',
92
+                        'preview'  => false,
93
+                        'title'    => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
94
+                        'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
95
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
96
+                    ),
97
+                    array(
98
+                        'id'       => 'user-gallery',
99
+                        'type'     => 'gallery',
100
+                        'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
101
+                        'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
102
+                        'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
103
+                    ),
104
+                    array(
105
+                        'id'      => 'user-slider-one',
106
+                        'type'    => 'slider',
107
+                        'title'   => esc_html__( 'JQuery UI Slider Example 1', 'your-textdomain-here' ),
108
+                        'desc'    => esc_html__( 'JQuery UI slider description. Min: 1, max: 500, step: 3, default value: 45', 'your-textdomain-here' ),
109
+                        'default' => '46',
110
+                        'min'     => '1',
111
+                        'step'    => '3',
112
+                        'max'     => '500',
113
+                    ),
114
+                    array(
115
+                        'id'      => 'user-slider-two',
116
+                        'type'    => 'slider',
117
+                        'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
118
+                        'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
119
+                        'default' => '0',
120
+                        'min'     => '0',
121
+                        'step'    => '5',
122
+                        'max'     => '300',
123
+                    ),
124
+                    array(
125
+                        'id'      => 'user-spinner',
126
+                        'type'    => 'spinner',
127
+                        'title'   => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
128
+                        'desc'    => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
129
+                        'default' => '40',
130
+                        'min'     => '20',
131
+                        'step'    => '20',
132
+                        'max'     => '100',
133
+                    ),
134
+                    array(
135
+                        'id'       => 'user-switch-parent',
136
+                        'type'     => 'switch',
137
+                        'title'    => esc_html__( 'Switch - Nested Children, Enable to show', 'your-textdomain-here' ),
138
+                        'subtitle' => esc_html__( 'Look, it\'s on! Also hidden child elements!', 'your-textdomain-here' ),
139
+                        'default'  => 0,
140
+                        'on'       => 'Enabled',
141
+                        'off'      => 'Disabled',
142
+                    ),
143
+                    array(
144
+                        'id'       => 'user-switch-child',
145
+                        'type'     => 'switch',
146
+                        'required' => array( 'user-switch-parent', '=', '1' ),
147
+                        'title'    => esc_html__( 'Switch - This and the next switch required for patterns to show', 'your-textdomain-here' ),
148
+                        'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
149
+                        'desc'     => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
150
+                        'default'  => false,
151
+                    ),
152
+                ),
153
+            ),
154
+            array(
155
+                'title'  => esc_html__( 'Home Layout', 'your-textdomain-here' ),
156
+                'icon'   => 'el-icon-home',
157
+                'fields' => array(
158
+                    array(
159
+                        'id'       => 'user-homepage_blocks',
160
+                        'type'     => 'sorter',
161
+                        'title'    => 'Homepage Layout Manager',
162
+                        'desc'     => 'Organize how you want the layout to appear on the homepage',
163
+                        'compiler' => 'true',
164
+                        'required' => array( 'layout', '=', '1' ),
165
+                        'options'  => array(
166
+                            'enabled'  => array(
167
+                                'highlights' => 'Highlights',
168
+                                'slider'     => 'Slider',
169
+                                'staticpage' => 'Static Page',
170
+                                'services'   => 'Services',
171
+                            ),
172
+                            'disabled' => array(),
173
+                        ),
174
+                    ),
175 175
 
176
-					array(
177
-						'id'       => 'user-presets',
178
-						'type'     => 'image_select',
179
-						'presets'  => true,
180
-						'title'    => esc_html__( 'Preset', 'your-textdomain-here' ),
181
-						'subtitle' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
182
-						'default'  => 0,
183
-						'desc'     => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
184
-						'options'  => array(
185
-							'1' => array(
186
-								'alt'     => 'Preset 1',
187
-								'img'     => Redux_Core::$url . '../sample/presets/preset1.png',
188
-								'presets' => array(
189
-									'switch-on'     => 1,
190
-									'switch-off'    => 1,
191
-									'switch-custom' => 1,
192
-								),
193
-							),
194
-							'2' => array(
195
-								'alt'     => 'Preset 2',
196
-								'img'     => Redux_Core::$url . '../sample/presets/preset2.png',
197
-								'presets' => "{'slider1':'1', 'slider2':'0', 'switch-on':'0'}",
198
-							),
199
-						),
200
-					),
201
-				),
202
-			),
203
-		),
204
-	)
176
+                    array(
177
+                        'id'       => 'user-presets',
178
+                        'type'     => 'image_select',
179
+                        'presets'  => true,
180
+                        'title'    => esc_html__( 'Preset', 'your-textdomain-here' ),
181
+                        'subtitle' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
182
+                        'default'  => 0,
183
+                        'desc'     => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
184
+                        'options'  => array(
185
+                            '1' => array(
186
+                                'alt'     => 'Preset 1',
187
+                                'img'     => Redux_Core::$url . '../sample/presets/preset1.png',
188
+                                'presets' => array(
189
+                                    'switch-on'     => 1,
190
+                                    'switch-off'    => 1,
191
+                                    'switch-custom' => 1,
192
+                                ),
193
+                            ),
194
+                            '2' => array(
195
+                                'alt'     => 'Preset 2',
196
+                                'img'     => Redux_Core::$url . '../sample/presets/preset2.png',
197
+                                'presets' => "{'slider1':'1', 'slider2':'0', 'switch-on':'0'}",
198
+                            ),
199
+                        ),
200
+                    ),
201
+                ),
202
+            ),
203
+        ),
204
+    )
205 205
 );
206 206
 
207 207
 // Recovering user data.
208 208
 $data = Redux_Users::get_user_meta(
209
-	array(
210
-		'key'      => 'user-text', /* If you're only looking for a key within the meta, otherwise all values will be returned. */
211
-		'opt_name' => $opt_name,   // Optional, but needed to recover default values for unset values.
212
-		'user'     => '',          // User id, else current user ID is returned.
213
-	)
209
+    array(
210
+        'key'      => 'user-text', /* If you're only looking for a key within the meta, otherwise all values will be returned. */
211
+        'opt_name' => $opt_name,   // Optional, but needed to recover default values for unset values.
212
+        'user'     => '',          // User id, else current user ID is returned.
213
+    )
214 214
 );
215 215
 // phpcs:enable
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,8 +208,8 @@
 block discarded – undo
208 208
 $data = Redux_Users::get_user_meta(
209 209
 	array(
210 210
 		'key'      => 'user-text', /* If you're only looking for a key within the meta, otherwise all values will be returned. */
211
-		'opt_name' => $opt_name,   // Optional, but needed to recover default values for unset values.
212
-		'user'     => '',          // User id, else current user ID is returned.
211
+		'opt_name' => $opt_name, // Optional, but needed to recover default values for unset values.
212
+		'user'     => '', // User id, else current user ID is returned.
213 213
 	)
214 214
 );
215 215
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/extensions/taxonomy.php 1 patch
Indentation   +201 added lines, -201 removed lines patch added patch discarded remove patch
@@ -10,219 +10,219 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 if ( ! class_exists( 'Redux_Taxonomy' ) ) {
13
-	return;
13
+    return;
14 14
 }
15 15
 
16 16
 // Change the priority the Redux_Taxonomy boxes appear.
17 17
 Redux_Taxonomy::set_args(
18
-	$opt_name,
19
-	array(
20
-		'taxonomy_priority' => 55,
21
-	)
18
+    $opt_name,
19
+    array(
20
+        'taxonomy_priority' => 55,
21
+    )
22 22
 );
23 23
 
24 24
 Redux_Taxonomy::set_term(
25
-	$opt_name,
26
-	array(
27
-		'id'             => 'demo-taxonomy',
28
-		'title'          => esc_html__( 'Cool Options', 'your-textdomain-here' ),
25
+    $opt_name,
26
+    array(
27
+        'id'             => 'demo-taxonomy',
28
+        'title'          => esc_html__( 'Cool Options', 'your-textdomain-here' ),
29 29
 
30
-		// Slug for every taxonomy you want.
31
-		'taxonomy_types' => array( 'category', 'post_tag' ),
30
+        // Slug for every taxonomy you want.
31
+        'taxonomy_types' => array( 'category', 'post_tag' ),
32 32
 
33
-		'add_visibility' => true,
33
+        'add_visibility' => true,
34 34
 
35
-		// Can be set on term, section, or field level. Denote what fields to be displayed on the added {TERM} pages.
36
-		'sections'       => array(
37
-			array(
38
-				'title'  => esc_html__( 'Home Settings', 'your-textdomain-here' ),
39
-				'icon'   => 'el-icon-home',
40
-				'fields' => array(
41
-					array(
42
-						'id'             => 'tax-text',
43
-						'type'           => 'text',
44
-						'add_visibility' => true,
45
-						'title'          => esc_html__( 'Input 1', 'your-textdomain-here' ),
46
-					),
47
-					array(
48
-						'id'             => 'tax-button-set',
49
-						'type'           => 'button_set',
50
-						'title'          => esc_html__( 'Button Set Option', 'your-textdomain-here' ),
51
-						'subtitle'       => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
52
-						'desc'           => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
53
-						'add_visibility' => true,
54
-						'options'        => array(
55
-							'1' => 'Opt 1',
56
-							'2' => 'Opt 2',
57
-							'3' => 'Opt 3',
58
-						),
59
-						'default'        => '2',
60
-					),
61
-					array(
62
-						'id'             => 'tax-text-2',
63
-						'type'           => 'text',
64
-						'add_visibility' => true,
65
-						'title'          => esc_html__( 'Input 2', 'your-textdomain-here' ),
66
-					),
67
-					array(
68
-						'id'       => 'tax-web-fonts',
69
-						'type'     => 'media',
70
-						'title'    => esc_html__( 'Web Fonts', 'your-textdomain-here' ),
71
-						'compiler' => 'true',
72
-						'mode'     => false,
73
-						// Can be set to false to allow any media type, or can also be set to any mime type.
74
-						'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
75
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
76
-					),
77
-					array(
78
-						'id'       => 'tax-section-media-start',
79
-						'type'     => 'section',
80
-						'title'    => esc_html__( 'Media Options', 'your-textdomain-here' ),
81
-						'subtitle' => esc_html__( 'With the "section" field you can create indent option sections.', 'your-textdomain-here' ),
82
-						'indent'   => true,
83
-					),
84
-					array(
85
-						'id'       => 'tax-media-url',
86
-						'type'     => 'media',
87
-						'url'      => true,
88
-						'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
89
-						'compiler' => 'true',
90
-						'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
91
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
92
-						'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
93
-					),
94
-					array(
95
-						'id'     => 'tax-section-media-end',
96
-						'type'   => 'section',
97
-						'indent' => false,
98
-					),
99
-					array(
100
-						'id'       => 'tax-media-no-url',
101
-						'type'     => 'media',
102
-						'title'    => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
103
-						'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
104
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
105
-					),
106
-					array(
107
-						'id'       => 'tax-media-no-preview',
108
-						'type'     => 'media',
109
-						'preview'  => false,
110
-						'title'    => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
111
-						'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
112
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
113
-					),
114
-					array(
115
-						'id'       => 'tax-gallery',
116
-						'type'     => 'gallery',
117
-						'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
118
-						'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
119
-						'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
120
-					),
121
-					array(
122
-						'id'      => 'tax-slider',
123
-						'type'    => 'slider',
124
-						'title'   => esc_html__( 'JQuery UI Slider Example 1', 'your-textdomain-here' ),
125
-						'desc'    => esc_html__( 'JQuery UI slider description. Min: 1, max: 500, step: 3, default value: 45', 'your-textdomain-here' ),
126
-						'default' => '46',
127
-						'min'     => '1',
128
-						'step'    => '3',
129
-						'max'     => '500',
130
-					),
131
-					array(
132
-						'id'      => 'tax-slider-2',
133
-						'type'    => 'slider',
134
-						'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
135
-						'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
136
-						'default' => '0',
137
-						'min'     => '0',
138
-						'step'    => '5',
139
-						'max'     => '300',
140
-					),
141
-					array(
142
-						'id'      => 'tax-spinner',
143
-						'type'    => 'spinner',
144
-						'title'   => esc_html__( 'Spinner Example 1', 'your-textdomain-here' ),
145
-						'desc'    => esc_html__( 'Spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
146
-						'default' => '40',
147
-						'min'     => '20',
148
-						'step'    => '20',
149
-						'max'     => '100',
150
-					),
151
-					array(
152
-						'id'       => 'tax-switch-parent',
153
-						'type'     => 'switch',
154
-						'title'    => esc_html__( 'Switch - Nested Children, Enable to show', 'your-textdomain-here' ),
155
-						'subtitle' => esc_html__( 'Look, it\'s on! Also hidden child elements!', 'your-textdomain-here' ),
156
-						'default'  => 0,
157
-						'on'       => 'Enabled',
158
-						'off'      => 'Disabled',
159
-					),
160
-					array(
161
-						'id'       => 'tax-switch-child',
162
-						'type'     => 'switch',
163
-						'required' => array( 'tax-switch-parent', '=', '1' ),
164
-						'title'    => esc_html__( 'Switch - This and the next switch required for patterns to show', 'your-textdomain-here' ),
165
-						'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
166
-						'desc'     => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
167
-						'default'  => false,
168
-					),
169
-				),
170
-			),
35
+        // Can be set on term, section, or field level. Denote what fields to be displayed on the added {TERM} pages.
36
+        'sections'       => array(
37
+            array(
38
+                'title'  => esc_html__( 'Home Settings', 'your-textdomain-here' ),
39
+                'icon'   => 'el-icon-home',
40
+                'fields' => array(
41
+                    array(
42
+                        'id'             => 'tax-text',
43
+                        'type'           => 'text',
44
+                        'add_visibility' => true,
45
+                        'title'          => esc_html__( 'Input 1', 'your-textdomain-here' ),
46
+                    ),
47
+                    array(
48
+                        'id'             => 'tax-button-set',
49
+                        'type'           => 'button_set',
50
+                        'title'          => esc_html__( 'Button Set Option', 'your-textdomain-here' ),
51
+                        'subtitle'       => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
52
+                        'desc'           => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
53
+                        'add_visibility' => true,
54
+                        'options'        => array(
55
+                            '1' => 'Opt 1',
56
+                            '2' => 'Opt 2',
57
+                            '3' => 'Opt 3',
58
+                        ),
59
+                        'default'        => '2',
60
+                    ),
61
+                    array(
62
+                        'id'             => 'tax-text-2',
63
+                        'type'           => 'text',
64
+                        'add_visibility' => true,
65
+                        'title'          => esc_html__( 'Input 2', 'your-textdomain-here' ),
66
+                    ),
67
+                    array(
68
+                        'id'       => 'tax-web-fonts',
69
+                        'type'     => 'media',
70
+                        'title'    => esc_html__( 'Web Fonts', 'your-textdomain-here' ),
71
+                        'compiler' => 'true',
72
+                        'mode'     => false,
73
+                        // Can be set to false to allow any media type, or can also be set to any mime type.
74
+                        'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
75
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
76
+                    ),
77
+                    array(
78
+                        'id'       => 'tax-section-media-start',
79
+                        'type'     => 'section',
80
+                        'title'    => esc_html__( 'Media Options', 'your-textdomain-here' ),
81
+                        'subtitle' => esc_html__( 'With the "section" field you can create indent option sections.', 'your-textdomain-here' ),
82
+                        'indent'   => true,
83
+                    ),
84
+                    array(
85
+                        'id'       => 'tax-media-url',
86
+                        'type'     => 'media',
87
+                        'url'      => true,
88
+                        'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
89
+                        'compiler' => 'true',
90
+                        'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
91
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
92
+                        'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
93
+                    ),
94
+                    array(
95
+                        'id'     => 'tax-section-media-end',
96
+                        'type'   => 'section',
97
+                        'indent' => false,
98
+                    ),
99
+                    array(
100
+                        'id'       => 'tax-media-no-url',
101
+                        'type'     => 'media',
102
+                        'title'    => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
103
+                        'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
104
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
105
+                    ),
106
+                    array(
107
+                        'id'       => 'tax-media-no-preview',
108
+                        'type'     => 'media',
109
+                        'preview'  => false,
110
+                        'title'    => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
111
+                        'desc'     => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
112
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
113
+                    ),
114
+                    array(
115
+                        'id'       => 'tax-gallery',
116
+                        'type'     => 'gallery',
117
+                        'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
118
+                        'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
119
+                        'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
120
+                    ),
121
+                    array(
122
+                        'id'      => 'tax-slider',
123
+                        'type'    => 'slider',
124
+                        'title'   => esc_html__( 'JQuery UI Slider Example 1', 'your-textdomain-here' ),
125
+                        'desc'    => esc_html__( 'JQuery UI slider description. Min: 1, max: 500, step: 3, default value: 45', 'your-textdomain-here' ),
126
+                        'default' => '46',
127
+                        'min'     => '1',
128
+                        'step'    => '3',
129
+                        'max'     => '500',
130
+                    ),
131
+                    array(
132
+                        'id'      => 'tax-slider-2',
133
+                        'type'    => 'slider',
134
+                        'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
135
+                        'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
136
+                        'default' => '0',
137
+                        'min'     => '0',
138
+                        'step'    => '5',
139
+                        'max'     => '300',
140
+                    ),
141
+                    array(
142
+                        'id'      => 'tax-spinner',
143
+                        'type'    => 'spinner',
144
+                        'title'   => esc_html__( 'Spinner Example 1', 'your-textdomain-here' ),
145
+                        'desc'    => esc_html__( 'Spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
146
+                        'default' => '40',
147
+                        'min'     => '20',
148
+                        'step'    => '20',
149
+                        'max'     => '100',
150
+                    ),
151
+                    array(
152
+                        'id'       => 'tax-switch-parent',
153
+                        'type'     => 'switch',
154
+                        'title'    => esc_html__( 'Switch - Nested Children, Enable to show', 'your-textdomain-here' ),
155
+                        'subtitle' => esc_html__( 'Look, it\'s on! Also hidden child elements!', 'your-textdomain-here' ),
156
+                        'default'  => 0,
157
+                        'on'       => 'Enabled',
158
+                        'off'      => 'Disabled',
159
+                    ),
160
+                    array(
161
+                        'id'       => 'tax-switch-child',
162
+                        'type'     => 'switch',
163
+                        'required' => array( 'tax-switch-parent', '=', '1' ),
164
+                        'title'    => esc_html__( 'Switch - This and the next switch required for patterns to show', 'your-textdomain-here' ),
165
+                        'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
166
+                        'desc'     => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
167
+                        'default'  => false,
168
+                    ),
169
+                ),
170
+            ),
171 171
 
172
-			array(
173
-				'title'  => esc_html__( 'Home Layout', 'your-textdomain-here' ),
174
-				// translators: %s = Redux GitHub URL.
175
-				'desc'   => sprintf( esc_html__( 'Redux Framework was created with the developer in mind. It allows for any theme developer to have an advanced theme panel with most of the features a developer would need. For more information check out the GitHub repo at: %s', 'your-textdomain-here' ), '<a href="https://github.com/reduxframework/redux-framework">https://github.com/reduxframework/redux-framework</a>' ),
176
-				'icon'   => 'el-icon-home',
177
-				'fields' => array(
178
-					array(
179
-						'id'             => 'tax-homepage_blocks',
180
-						'type'           => 'sorter',
181
-						'title'          => 'Homepage Layout Manager',
182
-						'desc'           => 'Organize how you want the layout to appear on the homepage',
183
-						'compiler'       => 'true',
184
-						'add_visibility' => true,
172
+            array(
173
+                'title'  => esc_html__( 'Home Layout', 'your-textdomain-here' ),
174
+                // translators: %s = Redux GitHub URL.
175
+                'desc'   => sprintf( esc_html__( 'Redux Framework was created with the developer in mind. It allows for any theme developer to have an advanced theme panel with most of the features a developer would need. For more information check out the GitHub repo at: %s', 'your-textdomain-here' ), '<a href="https://github.com/reduxframework/redux-framework">https://github.com/reduxframework/redux-framework</a>' ),
176
+                'icon'   => 'el-icon-home',
177
+                'fields' => array(
178
+                    array(
179
+                        'id'             => 'tax-homepage_blocks',
180
+                        'type'           => 'sorter',
181
+                        'title'          => 'Homepage Layout Manager',
182
+                        'desc'           => 'Organize how you want the layout to appear on the homepage',
183
+                        'compiler'       => 'true',
184
+                        'add_visibility' => true,
185 185
 
186
-						'options'        => array(
187
-							'enabled'  => array(
188
-								'highlights' => 'Highlights',
189
-								'slider'     => 'Slider',
190
-								'staticpage' => 'Static Page',
191
-							),
192
-							'disabled' => array(
193
-								'services' => 'Services',
194
-							),
195
-						),
196
-					),
186
+                        'options'        => array(
187
+                            'enabled'  => array(
188
+                                'highlights' => 'Highlights',
189
+                                'slider'     => 'Slider',
190
+                                'staticpage' => 'Static Page',
191
+                            ),
192
+                            'disabled' => array(
193
+                                'services' => 'Services',
194
+                            ),
195
+                        ),
196
+                    ),
197 197
 
198
-					array(
199
-						'id'       => 'tax-presets',
200
-						'type'     => 'image_select',
201
-						'presets'  => true,
202
-						'title'    => esc_html__( 'Preset', 'your-textdomain-here' ),
203
-						'subtitle' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
204
-						'default'  => 0,
205
-						'desc'     => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
206
-						'options'  => array(
207
-							'1' => array(
208
-								'alt'     => 'Preset 1',
209
-								'img'     => ReduxFramework::$_url . '../sample/presets/preset1.png',
210
-								'presets' => array(
211
-									'switch-on'     => 1,
212
-									'switch-off'    => 1,
213
-									'switch-custom' => 1,
214
-								),
215
-							),
216
-							'2' => array(
217
-								'alt'     => 'Preset 2',
218
-								'img'     => ReduxFramework::$_url . '../sample/presets/preset2.png',
219
-								'presets' => '{"slider1":"1", "slider2":"0", "switch-on":"0"}',
220
-							),
221
-						),
222
-					),
223
-				),
224
-			),
225
-		),
226
-	)
198
+                    array(
199
+                        'id'       => 'tax-presets',
200
+                        'type'     => 'image_select',
201
+                        'presets'  => true,
202
+                        'title'    => esc_html__( 'Preset', 'your-textdomain-here' ),
203
+                        'subtitle' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
204
+                        'default'  => 0,
205
+                        'desc'     => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
206
+                        'options'  => array(
207
+                            '1' => array(
208
+                                'alt'     => 'Preset 1',
209
+                                'img'     => ReduxFramework::$_url . '../sample/presets/preset1.png',
210
+                                'presets' => array(
211
+                                    'switch-on'     => 1,
212
+                                    'switch-off'    => 1,
213
+                                    'switch-custom' => 1,
214
+                                ),
215
+                            ),
216
+                            '2' => array(
217
+                                'alt'     => 'Preset 2',
218
+                                'img'     => ReduxFramework::$_url . '../sample/presets/preset2.png',
219
+                                'presets' => '{"slider1":"1", "slider2":"0", "switch-on":"0"}',
220
+                            ),
221
+                        ),
222
+                    ),
223
+                ),
224
+            ),
225
+        ),
226
+    )
227 227
 );
228 228
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/extensions/tabbed.php 1 patch
Indentation   +170 added lines, -170 removed lines patch added patch discarded remove patch
@@ -10,178 +10,178 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Tabbed', 'your-textdomain-here' ),
16
-		'id'         => 'additional-tabbed',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/tabbed.html" target="_blank">https://devs.redux.io/core-fields/tabbed.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'    => 'opt-tabbed-1',
22
-				'type'  => 'tabbed',
23
-				'title' => 'Tabbed Layout 1',
24
-				'tabs'  => array(
25
-					array(
26
-						'title'  => 'Basic Fields',
27
-						'icon'   => 'fas fa-gear',
28
-						'fields' => array(
29
-							array(
30
-								'id'       => 'opt-tab-checkbox-1',
31
-								'type'     => 'checkbox',
32
-								'title'    => esc_html__( 'Checkbox', 'your-textdomain-here' ),
33
-								'subtitle' => esc_html__( 'Basic Checkbox field.', 'your-textdomain-here' ),
34
-								'default'  => true,
35
-							),
36
-							array(
37
-								'id'       => 'opt-tab-radio',
38
-								'type'     => 'radio',
39
-								'title'    => esc_html__( 'Radio Button', 'your-textdomain-here' ),
40
-								'subtitle' => esc_html__( 'Basic Radio Button field.', 'your-textdomain-here' ),
41
-								'options'  => array(
42
-									'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
43
-									'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
44
-									'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
45
-								),
46
-								'default'  => '2',
47
-							),
48
-							array(
49
-								'id'       => 'opt-tab-media',
50
-								'type'     => 'media',
51
-								'url'      => true,
52
-								'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
53
-								'compiler' => 'true',
54
-								'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
55
-								'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
56
-								'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
57
-							),
58
-							array(
59
-								'id'       => 'opt-tab-gallery',
60
-								'type'     => 'gallery',
61
-								'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
62
-								'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
63
-								'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
64
-							),
65
-							array(
66
-								'id'      => 'opt-tab-slider',
67
-								'type'    => 'slider',
68
-								'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
69
-								'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
70
-								'default' => '0',
71
-								'min'     => '0',
72
-								'step'    => '5',
73
-								'max'     => '300',
74
-							),
75
-							array(
76
-								'id'      => 'opt-tab-spinner',
77
-								'type'    => 'spinner',
78
-								'title'   => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
79
-								'desc'    => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
80
-								'default' => '40',
81
-								'min'     => '20',
82
-								'step'    => '20',
83
-								'max'     => '100',
84
-							),
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Tabbed', 'your-textdomain-here' ),
16
+        'id'         => 'additional-tabbed',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/tabbed.html" target="_blank">https://devs.redux.io/core-fields/tabbed.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'    => 'opt-tabbed-1',
22
+                'type'  => 'tabbed',
23
+                'title' => 'Tabbed Layout 1',
24
+                'tabs'  => array(
25
+                    array(
26
+                        'title'  => 'Basic Fields',
27
+                        'icon'   => 'fas fa-gear',
28
+                        'fields' => array(
29
+                            array(
30
+                                'id'       => 'opt-tab-checkbox-1',
31
+                                'type'     => 'checkbox',
32
+                                'title'    => esc_html__( 'Checkbox', 'your-textdomain-here' ),
33
+                                'subtitle' => esc_html__( 'Basic Checkbox field.', 'your-textdomain-here' ),
34
+                                'default'  => true,
35
+                            ),
36
+                            array(
37
+                                'id'       => 'opt-tab-radio',
38
+                                'type'     => 'radio',
39
+                                'title'    => esc_html__( 'Radio Button', 'your-textdomain-here' ),
40
+                                'subtitle' => esc_html__( 'Basic Radio Button field.', 'your-textdomain-here' ),
41
+                                'options'  => array(
42
+                                    '1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
43
+                                    '2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
44
+                                    '3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
45
+                                ),
46
+                                'default'  => '2',
47
+                            ),
48
+                            array(
49
+                                'id'       => 'opt-tab-media',
50
+                                'type'     => 'media',
51
+                                'url'      => true,
52
+                                'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
53
+                                'compiler' => 'true',
54
+                                'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
55
+                                'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
56
+                                'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
57
+                            ),
58
+                            array(
59
+                                'id'       => 'opt-tab-gallery',
60
+                                'type'     => 'gallery',
61
+                                'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
62
+                                'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
63
+                                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
64
+                            ),
65
+                            array(
66
+                                'id'      => 'opt-tab-slider',
67
+                                'type'    => 'slider',
68
+                                'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
69
+                                'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
70
+                                'default' => '0',
71
+                                'min'     => '0',
72
+                                'step'    => '5',
73
+                                'max'     => '300',
74
+                            ),
75
+                            array(
76
+                                'id'      => 'opt-tab-spinner',
77
+                                'type'    => 'spinner',
78
+                                'title'   => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
79
+                                'desc'    => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
80
+                                'default' => '40',
81
+                                'min'     => '20',
82
+                                'step'    => '20',
83
+                                'max'     => '100',
84
+                            ),
85 85
 
86
-							array(
87
-								'id'       => 'opt-tab-switch-on',
88
-								'type'     => 'switch',
89
-								'title'    => esc_html__( 'Switch On', 'your-textdomain-here' ),
90
-								'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
91
-								'default'  => 1,
92
-							),
93
-						),
94
-					),
86
+                            array(
87
+                                'id'       => 'opt-tab-switch-on',
88
+                                'type'     => 'switch',
89
+                                'title'    => esc_html__( 'Switch On', 'your-textdomain-here' ),
90
+                                'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
91
+                                'default'  => 1,
92
+                            ),
93
+                        ),
94
+                    ),
95 95
 
96
-					array(
97
-						'title'  => 'Text Fields',
98
-						'icon'   => 'fas fa-font',
99
-						'fields' => array(
100
-							array(
101
-								'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
102
-								'id'    => 'opt-tab-text',
103
-								'type'  => 'text',
104
-							),
105
-							array(
106
-								'title' => esc_html__( 'Textarea Field', 'your-textdomain-here' ),
107
-								'id'    => 'opt-tab-textarea',
108
-								'type'  => 'textarea',
109
-							),
110
-						),
111
-					),
112
-					array(
113
-						'title'  => esc_html__( 'Color Fields', 'your-textdomain-here' ),
114
-						'icon'   => 'fas fa-palette',
115
-						'fields' => array(
116
-							array(
117
-								'id'    => 'opt-tab-color-1',
118
-								'type'  => 'color',
119
-								'title' => esc_html__( 'Color 1', 'your-textdomain-here' ),
120
-							),
121
-							array(
122
-								'id'    => 'opt-tab-color-2',
123
-								'type'  => 'color',
124
-								'title' => esc_html__( 'Color 2', 'your-textdomain-here' ),
125
-							),
126
-						),
127
-					),
128
-				),
129
-			),
96
+                    array(
97
+                        'title'  => 'Text Fields',
98
+                        'icon'   => 'fas fa-font',
99
+                        'fields' => array(
100
+                            array(
101
+                                'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
102
+                                'id'    => 'opt-tab-text',
103
+                                'type'  => 'text',
104
+                            ),
105
+                            array(
106
+                                'title' => esc_html__( 'Textarea Field', 'your-textdomain-here' ),
107
+                                'id'    => 'opt-tab-textarea',
108
+                                'type'  => 'textarea',
109
+                            ),
110
+                        ),
111
+                    ),
112
+                    array(
113
+                        'title'  => esc_html__( 'Color Fields', 'your-textdomain-here' ),
114
+                        'icon'   => 'fas fa-palette',
115
+                        'fields' => array(
116
+                            array(
117
+                                'id'    => 'opt-tab-color-1',
118
+                                'type'  => 'color',
119
+                                'title' => esc_html__( 'Color 1', 'your-textdomain-here' ),
120
+                            ),
121
+                            array(
122
+                                'id'    => 'opt-tab-color-2',
123
+                                'type'  => 'color',
124
+                                'title' => esc_html__( 'Color 2', 'your-textdomain-here' ),
125
+                            ),
126
+                        ),
127
+                    ),
128
+                ),
129
+            ),
130 130
 
131
-			array(
132
-				'id'    => 'opt-tabbed-2',
133
-				'type'  => 'tabbed',
134
-				'title' => 'Tabbed Layout 2',
135
-				'tabs'  => array(
136
-					array(
137
-						'title'  => 'Layout',
138
-						'fields' => array(
139
-							array(
140
-								'id'       => 'opt-tab-homepage_blocks',
141
-								'type'     => 'sorter',
142
-								'title'    => 'Homepage Layout Manager',
143
-								'desc'     => 'Organize how you want the layout to appear on the homepage',
144
-								'compiler' => 'true',
145
-								'options'  => array(
146
-									'enabled'  => array(
147
-										'placebo'    => 'placebo',
148
-										'highlights' => 'Highlights',
149
-										'slider'     => 'Slider',
150
-										'staticpage' => 'Static Page',
151
-										'services'   => 'Services',
152
-									),
153
-									'disabled' => array(
154
-										'placebo' => 'placebo',
155
-									),
156
-								),
157
-							),
158
-							array(
159
-								'id'       => 'opt-tab-slides',
160
-								'type'     => 'slides',
161
-								'title'    => esc_html__( 'Slides Options', 'your-textdomain-here' ),
162
-								'subtitle' => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
163
-								'desc'     => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
164
-							),
165
-						),
166
-					),
167
-					array(
168
-						'title'  => 'Advanced Text',
169
-						'fields' => array(
170
-							array(
171
-								'title' => esc_html__( 'WP Editor', 'your-textdomain-here' ),
172
-								'id'    => 'opt-tab-editor',
173
-								'type'  => 'editor',
174
-							),
175
-							array(
176
-								'title' => esc_html__( 'ACE Editor', 'your-textdomain-here' ),
177
-								'id'    => 'opt-tab-ace',
178
-								'type'  => 'ace_editor',
179
-							),
180
-						),
181
-					),
182
-				),
183
-			),
184
-		),
185
-	)
131
+            array(
132
+                'id'    => 'opt-tabbed-2',
133
+                'type'  => 'tabbed',
134
+                'title' => 'Tabbed Layout 2',
135
+                'tabs'  => array(
136
+                    array(
137
+                        'title'  => 'Layout',
138
+                        'fields' => array(
139
+                            array(
140
+                                'id'       => 'opt-tab-homepage_blocks',
141
+                                'type'     => 'sorter',
142
+                                'title'    => 'Homepage Layout Manager',
143
+                                'desc'     => 'Organize how you want the layout to appear on the homepage',
144
+                                'compiler' => 'true',
145
+                                'options'  => array(
146
+                                    'enabled'  => array(
147
+                                        'placebo'    => 'placebo',
148
+                                        'highlights' => 'Highlights',
149
+                                        'slider'     => 'Slider',
150
+                                        'staticpage' => 'Static Page',
151
+                                        'services'   => 'Services',
152
+                                    ),
153
+                                    'disabled' => array(
154
+                                        'placebo' => 'placebo',
155
+                                    ),
156
+                                ),
157
+                            ),
158
+                            array(
159
+                                'id'       => 'opt-tab-slides',
160
+                                'type'     => 'slides',
161
+                                'title'    => esc_html__( 'Slides Options', 'your-textdomain-here' ),
162
+                                'subtitle' => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
163
+                                'desc'     => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
164
+                            ),
165
+                        ),
166
+                    ),
167
+                    array(
168
+                        'title'  => 'Advanced Text',
169
+                        'fields' => array(
170
+                            array(
171
+                                'title' => esc_html__( 'WP Editor', 'your-textdomain-here' ),
172
+                                'id'    => 'opt-tab-editor',
173
+                                'type'  => 'editor',
174
+                            ),
175
+                            array(
176
+                                'title' => esc_html__( 'ACE Editor', 'your-textdomain-here' ),
177
+                                'id'    => 'opt-tab-ace',
178
+                                'type'  => 'ace_editor',
179
+                            ),
180
+                        ),
181
+                    ),
182
+                ),
183
+            ),
184
+        ),
185
+    )
186 186
 );
187 187
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/extensions/widget-areas.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -12,24 +12,24 @@
 block discarded – undo
12 12
 
13 13
 // --> Below this line not needed. This is just for demonstration purposes.
14 14
 Redux::set_section(
15
-	$opt_name,
16
-	array(
17
-		'title'      => esc_html__( 'Widget Areas', 'your-textdomain-here' ),
18
-		// phpcs:ignore
19
-		// 'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/extensions/widget-areas.html" target="_blank">https://devs.redux.io/extensions/widget-areas.html</a>',
20
-		'subsection' => true,
21
-		'fields'     => array(
22
-			array(
23
-				'id'       => 'widget_areas',
24
-				'type'     => 'info',
25
-				'style'    => 'info',
26
-				'notice'   => true,
27
-				'title'    => esc_html__( 'Widget Areas is Already Running!', 'your-textdomain-here' ),
15
+    $opt_name,
16
+    array(
17
+        'title'      => esc_html__( 'Widget Areas', 'your-textdomain-here' ),
18
+        // phpcs:ignore
19
+        // 'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/extensions/widget-areas.html" target="_blank">https://devs.redux.io/extensions/widget-areas.html</a>',
20
+        'subsection' => true,
21
+        'fields'     => array(
22
+            array(
23
+                'id'       => 'widget_areas',
24
+                'type'     => 'info',
25
+                'style'    => 'info',
26
+                'notice'   => true,
27
+                'title'    => esc_html__( 'Widget Areas is Already Running!', 'your-textdomain-here' ),
28 28
 
29
-				// translators: %1$s: Widget Admin URL.
30
-				'subtitle' => sprintf( esc_html__( 'To see it in action, head over to your %1$s', 'your-textdomain-here' ), '<a href="' . admin_url( 'widgets.php' ) . '">' . esc_html__( 'Widgets page', 'your-textdomain-here' ) . '</a> (Applicable for Classic Widgets only).' ),
31
-			),
32
-		),
33
-	)
29
+                // translators: %1$s: Widget Admin URL.
30
+                'subtitle' => sprintf( esc_html__( 'To see it in action, head over to your %1$s', 'your-textdomain-here' ), '<a href="' . admin_url( 'widgets.php' ) . '">' . esc_html__( 'Widgets page', 'your-textdomain-here' ) . '</a> (Applicable for Classic Widgets only).' ),
31
+            ),
32
+        ),
33
+    )
34 34
 );
35 35
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/extensions/repeater.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -10,64 +10,64 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => __( 'Repeater', 'your-textdomain-here' ),
16
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/repeater.html" target="_blank">https://devs.redux.io/core-extensions/repeater.html</a>',
17
-		'subsection' => true,
18
-		'fields'     => array(
19
-			array(
20
-				'id'          => 'repeater-field-id',
21
-				'type'        => 'repeater',
22
-				'title'       => esc_html__( 'Repeater Demo', 'your-textdomain-here' ),
23
-				'full_width'  => true,
24
-				'subtitle'    => esc_html__( 'Repeater', 'your-textdomain-here' ),
25
-				'item_name'   => '',
26
-				'sortable'    => true,
27
-				'active'      => false,
28
-				'collapsible' => false,
29
-				'fields'      => array(
30
-					array(
31
-						'id'          => 'title_field',
32
-						'type'        => 'text',
33
-						'placeholder' => esc_html__( 'Title', 'your-textdomain-here' ),
34
-					),
35
-					array(
36
-						'id'          => 'textarea_field',
37
-						'type'        => 'textarea',
38
-						'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
39
-						'default'     => 'Text Field here',
40
-						'title'       => esc_html__( 'Title', 'your-domain-here' ),
41
-					),
42
-					array(
43
-						'id'          => 'select_field',
44
-						'type'        => 'select',
45
-						'multi'       => true,
46
-						'title'       => esc_html__( 'Select Field', 'your-textdomain-here' ),
47
-						'options'     => array(
48
-							'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
49
-							'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
50
-							'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
51
-						),
52
-						'placeholder' => esc_html__( 'Listing Field', 'your-textdomain-here' ),
53
-					),
54
-					array(
55
-						'id'          => 'switch_field',
56
-						'type'        => 'switch',
57
-						'placeholder' => esc_html__( 'Switch Field', 'your-textdomain-here' ),
58
-						'default'     => true,
59
-					),
60
-					array(
61
-						'id'          => 'text_field',
62
-						'title'       => esc_html__( 'Text Field', 'your-textdomain-here' ),
63
-						'type'        => 'text',
64
-						'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
65
-						'required'    => array( 'switch_field', '=', false ),
66
-						'default'     => 'Text Field here',
67
-					),
68
-				),
69
-			),
70
-		),
71
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => __( 'Repeater', 'your-textdomain-here' ),
16
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/repeater.html" target="_blank">https://devs.redux.io/core-extensions/repeater.html</a>',
17
+        'subsection' => true,
18
+        'fields'     => array(
19
+            array(
20
+                'id'          => 'repeater-field-id',
21
+                'type'        => 'repeater',
22
+                'title'       => esc_html__( 'Repeater Demo', 'your-textdomain-here' ),
23
+                'full_width'  => true,
24
+                'subtitle'    => esc_html__( 'Repeater', 'your-textdomain-here' ),
25
+                'item_name'   => '',
26
+                'sortable'    => true,
27
+                'active'      => false,
28
+                'collapsible' => false,
29
+                'fields'      => array(
30
+                    array(
31
+                        'id'          => 'title_field',
32
+                        'type'        => 'text',
33
+                        'placeholder' => esc_html__( 'Title', 'your-textdomain-here' ),
34
+                    ),
35
+                    array(
36
+                        'id'          => 'textarea_field',
37
+                        'type'        => 'textarea',
38
+                        'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
39
+                        'default'     => 'Text Field here',
40
+                        'title'       => esc_html__( 'Title', 'your-domain-here' ),
41
+                    ),
42
+                    array(
43
+                        'id'          => 'select_field',
44
+                        'type'        => 'select',
45
+                        'multi'       => true,
46
+                        'title'       => esc_html__( 'Select Field', 'your-textdomain-here' ),
47
+                        'options'     => array(
48
+                            '1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
49
+                            '2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
50
+                            '3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
51
+                        ),
52
+                        'placeholder' => esc_html__( 'Listing Field', 'your-textdomain-here' ),
53
+                    ),
54
+                    array(
55
+                        'id'          => 'switch_field',
56
+                        'type'        => 'switch',
57
+                        'placeholder' => esc_html__( 'Switch Field', 'your-textdomain-here' ),
58
+                        'default'     => true,
59
+                    ),
60
+                    array(
61
+                        'id'          => 'text_field',
62
+                        'title'       => esc_html__( 'Text Field', 'your-textdomain-here' ),
63
+                        'type'        => 'text',
64
+                        'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
65
+                        'required'    => array( 'switch_field', '=', false ),
66
+                        'default'     => 'Text Field here',
67
+                    ),
68
+                ),
69
+            ),
70
+        ),
71
+    )
72 72
 );
73 73
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/extensions/accordion.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -11,61 +11,61 @@
 block discarded – undo
11 11
 defined( 'ABSPATH' ) || exit;
12 12
 
13 13
 Redux::set_section(
14
-	$opt_name,
15
-	array(
16
-		'title'      => esc_html__( 'Accordion', 'your-textdomain-here' ),
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/accordion.html" target="_blank">https://devs.redux.io/core-extensions/accordion.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'accordion-section-1',
22
-				'type'     => 'accordion',
23
-				'title'    => esc_html__( 'Accordion Section One', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'Section one with subtitle', 'your-textdomain-here' ),
25
-				'position' => 'start',
26
-			),
27
-			array(
28
-				'id'       => 'opt-blank-text-1',
29
-				'type'     => 'text',
30
-				'title'    => esc_html__( 'Text box for some noble purpose.', 'your-textdomain-here' ),
31
-				'subtitle' => esc_html__( 'Frailty, thy name is woman!', 'your-textdomain-here' ),
32
-			),
33
-			array(
34
-				'id'       => 'opt-switch-1',
35
-				'type'     => 'switch',
36
-				'title'    => esc_html__( 'Switch, for some other important task!', 'your-textdomain-here' ),
37
-				'subtitle' => esc_html__( 'Physician, heal thyself!', 'your-textdomain-here' ),
38
-			),
39
-			array(
40
-				'id'       => 'accordion-section-end-1',
41
-				'type'     => 'accordion',
42
-				'position' => 'end',
43
-			),
44
-			array(
45
-				'id'       => 'accordion-section-2',
46
-				'type'     => 'accordion',
47
-				'title'    => esc_html__( 'Accordion Section Two (no subtitle)', 'your-textdomain-here' ),
48
-				'position' => 'start',
49
-				'open'     => true,
50
-			),
51
-			array(
52
-				'id'       => 'opt-blank-text-3',
53
-				'type'     => 'text',
54
-				'title'    => esc_html__( 'Look, another sample text box.', 'your-textdomain-here' ),
55
-				'subtitle' => esc_html__( 'The tartness of his face sours ripe grapes.', 'your-textdomain-here' ),
56
-			),
57
-			array(
58
-				'id'       => 'opt-switch-2',
59
-				'type'     => 'switch',
60
-				'title'    => esc_html__( 'Yes, another switch, but you\'re free to use any field you like.', 'your-textdomain-here' ),
61
-				'subtitle' => esc_html__( 'I scorn you, scurvy companion!', 'your-textdomain-here' ),
62
-			),
63
-			array(
64
-				'id'       => 'accordion-section-end-2',
65
-				'type'     => 'accordion',
66
-				'position' => 'end',
67
-			),
68
-		),
69
-	)
14
+    $opt_name,
15
+    array(
16
+        'title'      => esc_html__( 'Accordion', 'your-textdomain-here' ),
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/accordion.html" target="_blank">https://devs.redux.io/core-extensions/accordion.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'accordion-section-1',
22
+                'type'     => 'accordion',
23
+                'title'    => esc_html__( 'Accordion Section One', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'Section one with subtitle', 'your-textdomain-here' ),
25
+                'position' => 'start',
26
+            ),
27
+            array(
28
+                'id'       => 'opt-blank-text-1',
29
+                'type'     => 'text',
30
+                'title'    => esc_html__( 'Text box for some noble purpose.', 'your-textdomain-here' ),
31
+                'subtitle' => esc_html__( 'Frailty, thy name is woman!', 'your-textdomain-here' ),
32
+            ),
33
+            array(
34
+                'id'       => 'opt-switch-1',
35
+                'type'     => 'switch',
36
+                'title'    => esc_html__( 'Switch, for some other important task!', 'your-textdomain-here' ),
37
+                'subtitle' => esc_html__( 'Physician, heal thyself!', 'your-textdomain-here' ),
38
+            ),
39
+            array(
40
+                'id'       => 'accordion-section-end-1',
41
+                'type'     => 'accordion',
42
+                'position' => 'end',
43
+            ),
44
+            array(
45
+                'id'       => 'accordion-section-2',
46
+                'type'     => 'accordion',
47
+                'title'    => esc_html__( 'Accordion Section Two (no subtitle)', 'your-textdomain-here' ),
48
+                'position' => 'start',
49
+                'open'     => true,
50
+            ),
51
+            array(
52
+                'id'       => 'opt-blank-text-3',
53
+                'type'     => 'text',
54
+                'title'    => esc_html__( 'Look, another sample text box.', 'your-textdomain-here' ),
55
+                'subtitle' => esc_html__( 'The tartness of his face sours ripe grapes.', 'your-textdomain-here' ),
56
+            ),
57
+            array(
58
+                'id'       => 'opt-switch-2',
59
+                'type'     => 'switch',
60
+                'title'    => esc_html__( 'Yes, another switch, but you\'re free to use any field you like.', 'your-textdomain-here' ),
61
+                'subtitle' => esc_html__( 'I scorn you, scurvy companion!', 'your-textdomain-here' ),
62
+            ),
63
+            array(
64
+                'id'       => 'accordion-section-end-2',
65
+                'type'     => 'accordion',
66
+                'position' => 'end',
67
+            ),
68
+        ),
69
+    )
70 70
 );
71 71
 // phpcs:enable
Please login to merge, or discard this patch.