Completed
Push — master ( 7388a0...c197b7 )
by
unknown
45s
created
sample/metaboxes.php 1 patch
Indentation   +200 added lines, -200 removed lines patch added patch discarded remove patch
@@ -12,218 +12,218 @@
 block discarded – undo
12 12
 defined( 'ABSPATH' ) || exit;
13 13
 
14 14
 if ( ! class_exists( 'Redux_Metaboxes' ) ) {
15
-	return;
15
+    return;
16 16
 }
17 17
 
18 18
 Redux_Metaboxes::set_box(
19
-	$opt_name,
20
-	array(
21
-		'id'         => 'opt-metaboxes',
22
-		'title'      => esc_html__( 'Metabox Options', 'your-textdomain-here' ),
23
-		'post_types' => array( 'page', 'post' ),
24
-		'position'   => 'normal', // normal, advanced, side.
25
-		'priority'   => 'high', // high, core, default, low.
26
-		'sections'   => array(
27
-			array(
28
-				'title'  => esc_html__( 'Basic Fields', 'your-textdomain-here' ),
29
-				'id'     => 'opt-basic-fields',
30
-				'desc'   => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
31
-				'icon'   => 'el-icon-cogs',
32
-				'fields' => array(
33
-					array(
34
-						'id'       => 'opt-checkbox',
35
-						'type'     => 'checkbox',
36
-						'title'    => esc_html__( 'Checkbox', 'your-textdomain-here' ),
37
-						'subtitle' => esc_html__( 'Basic Checkbox field.', 'your-textdomain-here' ),
38
-						'default'  => true,
39
-					),
40
-					array(
41
-						'id'       => 'opt-radio',
42
-						'type'     => 'radio',
43
-						'title'    => esc_html__( 'Radio Button', 'your-textdomain-here' ),
44
-						'subtitle' => esc_html__( 'Basic Radio Button field.', 'your-textdomain-here' ),
45
-						'options'  => array(
46
-							'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
47
-							'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
48
-							'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
49
-						),
50
-						'default'  => '2',
51
-					),
52
-					array(
53
-						'id'       => 'opt-media',
54
-						'type'     => 'media',
55
-						'url'      => true,
56
-						'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
57
-						'compiler' => 'true',
58
-						'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
59
-						'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
60
-						'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
61
-					),
62
-					array(
63
-						'id'       => 'gallery',
64
-						'type'     => 'gallery',
65
-						'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
66
-						'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
67
-						'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
68
-					),
69
-					array(
70
-						'id'      => 'opt-slider',
71
-						'type'    => 'slider',
72
-						'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
73
-						'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
74
-						'default' => '0',
75
-						'min'     => '0',
76
-						'step'    => '5',
77
-						'max'     => '300',
78
-					),
79
-					array(
80
-						'id'      => 'opt-spinner',
81
-						'type'    => 'spinner',
82
-						'title'   => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
83
-						'desc'    => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
84
-						'default' => '40',
85
-						'min'     => '20',
86
-						'step'    => '20',
87
-						'max'     => '100',
88
-					),
19
+    $opt_name,
20
+    array(
21
+        'id'         => 'opt-metaboxes',
22
+        'title'      => esc_html__( 'Metabox Options', 'your-textdomain-here' ),
23
+        'post_types' => array( 'page', 'post' ),
24
+        'position'   => 'normal', // normal, advanced, side.
25
+        'priority'   => 'high', // high, core, default, low.
26
+        'sections'   => array(
27
+            array(
28
+                'title'  => esc_html__( 'Basic Fields', 'your-textdomain-here' ),
29
+                'id'     => 'opt-basic-fields',
30
+                'desc'   => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
31
+                'icon'   => 'el-icon-cogs',
32
+                'fields' => array(
33
+                    array(
34
+                        'id'       => 'opt-checkbox',
35
+                        'type'     => 'checkbox',
36
+                        'title'    => esc_html__( 'Checkbox', 'your-textdomain-here' ),
37
+                        'subtitle' => esc_html__( 'Basic Checkbox field.', 'your-textdomain-here' ),
38
+                        'default'  => true,
39
+                    ),
40
+                    array(
41
+                        'id'       => 'opt-radio',
42
+                        'type'     => 'radio',
43
+                        'title'    => esc_html__( 'Radio Button', 'your-textdomain-here' ),
44
+                        'subtitle' => esc_html__( 'Basic Radio Button field.', 'your-textdomain-here' ),
45
+                        'options'  => array(
46
+                            '1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
47
+                            '2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
48
+                            '3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
49
+                        ),
50
+                        'default'  => '2',
51
+                    ),
52
+                    array(
53
+                        'id'       => 'opt-media',
54
+                        'type'     => 'media',
55
+                        'url'      => true,
56
+                        'title'    => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
57
+                        'compiler' => 'true',
58
+                        'desc'     => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
59
+                        'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
60
+                        'default'  => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
61
+                    ),
62
+                    array(
63
+                        'id'       => 'gallery',
64
+                        'type'     => 'gallery',
65
+                        'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
66
+                        'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
67
+                        'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
68
+                    ),
69
+                    array(
70
+                        'id'      => 'opt-slider',
71
+                        'type'    => 'slider',
72
+                        'title'   => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
73
+                        'desc'    => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
74
+                        'default' => '0',
75
+                        'min'     => '0',
76
+                        'step'    => '5',
77
+                        'max'     => '300',
78
+                    ),
79
+                    array(
80
+                        'id'      => 'opt-spinner',
81
+                        'type'    => 'spinner',
82
+                        'title'   => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
83
+                        'desc'    => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
84
+                        'default' => '40',
85
+                        'min'     => '20',
86
+                        'step'    => '20',
87
+                        'max'     => '100',
88
+                    ),
89 89
 
90
-					array(
91
-						'id'       => 'switch-on',
92
-						'type'     => 'switch',
93
-						'title'    => esc_html__( 'Switch On', 'your-textdomain-here' ),
94
-						'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
95
-						'default'  => 1,
96
-					),
97
-				),
98
-			),
90
+                    array(
91
+                        'id'       => 'switch-on',
92
+                        'type'     => 'switch',
93
+                        'title'    => esc_html__( 'Switch On', 'your-textdomain-here' ),
94
+                        'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
95
+                        'default'  => 1,
96
+                    ),
97
+                ),
98
+            ),
99 99
 
100
-			array(
101
-				'title'      => esc_html__( 'Text Fields', 'your-textdomain-here' ),
102
-				'desc'       => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
103
-				'icon'       => 'el-icon-cog',
104
-				'id'         => 'opt-text-fields',
105
-				'subsection' => true,
106
-				'fields'     => array(
107
-					array(
108
-						'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
109
-						'id'    => 'opt-text',
110
-						'type'  => 'text',
111
-					),
112
-					array(
113
-						'title' => esc_html__( 'Textarea Field', 'your-textdomain-here' ),
114
-						'id'    => 'opt-textarea',
115
-						'type'  => 'textarea',
116
-					),
117
-				),
118
-			),
100
+            array(
101
+                'title'      => esc_html__( 'Text Fields', 'your-textdomain-here' ),
102
+                'desc'       => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
103
+                'icon'       => 'el-icon-cog',
104
+                'id'         => 'opt-text-fields',
105
+                'subsection' => true,
106
+                'fields'     => array(
107
+                    array(
108
+                        'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
109
+                        'id'    => 'opt-text',
110
+                        'type'  => 'text',
111
+                    ),
112
+                    array(
113
+                        'title' => esc_html__( 'Textarea Field', 'your-textdomain-here' ),
114
+                        'id'    => 'opt-textarea',
115
+                        'type'  => 'textarea',
116
+                    ),
117
+                ),
118
+            ),
119 119
 
120
-			array(
121
-				'title'  => esc_html__( 'Color Field', 'your-textdomain-here' ),
122
-				'desc'   => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
123
-				'icon'   => 'el-icon-pencil',
124
-				'id'     => 'color-section',
125
-				'fields' => array(
126
-					array(
127
-						'id'       => 'opt-color',
128
-						'type'     => 'color',
129
-						'title'    => esc_html__( 'Color Field', 'your-textdomain-here' ),
130
-						'default'  => '#333333',
131
-						'required' => array( 'opt-layout', '=', 'on' ),
132
-					),
133
-				),
134
-			),
135
-			array(
136
-				'title'  => esc_html__( 'Layout', 'your-textdomain-here' ),
137
-				'desc'   => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
138
-				'icon'   => 'el-icon-pencil',
139
-				'id'     => 'home-layout',
140
-				'fields' => array(
141
-					array(
142
-						'id'       => 'homepage_blocks',
143
-						'type'     => 'sorter',
144
-						'title'    => 'Homepage Layout Manager',
145
-						'desc'     => 'Organize how you want the layout to appear on the homepage',
146
-						'compiler' => 'true',
147
-						'required' => array( 'layout', '=', '1' ),
148
-						'options'  => array(
149
-							'enabled'  => array(
150
-								'placebo'    => 'placebo',
151
-								'highlights' => 'Highlights',
152
-								'slider'     => 'Slider',
153
-								'staticpage' => 'Static Page',
154
-								'services'   => 'Services',
155
-							),
156
-							'disabled' => array(
157
-								'placebo' => 'placebo',
158
-							),
159
-						),
160
-					),
161
-					array(
162
-						'id'       => 'slides',
163
-						'type'     => 'slides',
164
-						'title'    => esc_html__( 'Slides Options', 'your-textdomain-here' ),
165
-						'subtitle' => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
166
-						'desc'     => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
167
-					),
168
-				),
169
-			),
170
-		),
171
-	)
120
+            array(
121
+                'title'  => esc_html__( 'Color Field', 'your-textdomain-here' ),
122
+                'desc'   => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
123
+                'icon'   => 'el-icon-pencil',
124
+                'id'     => 'color-section',
125
+                'fields' => array(
126
+                    array(
127
+                        'id'       => 'opt-color',
128
+                        'type'     => 'color',
129
+                        'title'    => esc_html__( 'Color Field', 'your-textdomain-here' ),
130
+                        'default'  => '#333333',
131
+                        'required' => array( 'opt-layout', '=', 'on' ),
132
+                    ),
133
+                ),
134
+            ),
135
+            array(
136
+                'title'  => esc_html__( 'Layout', 'your-textdomain-here' ),
137
+                'desc'   => 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:', 'your-textdomain-here' ) . '  <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
138
+                'icon'   => 'el-icon-pencil',
139
+                'id'     => 'home-layout',
140
+                'fields' => array(
141
+                    array(
142
+                        'id'       => 'homepage_blocks',
143
+                        'type'     => 'sorter',
144
+                        'title'    => 'Homepage Layout Manager',
145
+                        'desc'     => 'Organize how you want the layout to appear on the homepage',
146
+                        'compiler' => 'true',
147
+                        'required' => array( 'layout', '=', '1' ),
148
+                        'options'  => array(
149
+                            'enabled'  => array(
150
+                                'placebo'    => 'placebo',
151
+                                'highlights' => 'Highlights',
152
+                                'slider'     => 'Slider',
153
+                                'staticpage' => 'Static Page',
154
+                                'services'   => 'Services',
155
+                            ),
156
+                            'disabled' => array(
157
+                                'placebo' => 'placebo',
158
+                            ),
159
+                        ),
160
+                    ),
161
+                    array(
162
+                        'id'       => 'slides',
163
+                        'type'     => 'slides',
164
+                        'title'    => esc_html__( 'Slides Options', 'your-textdomain-here' ),
165
+                        'subtitle' => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
166
+                        'desc'     => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
167
+                    ),
168
+                ),
169
+            ),
170
+        ),
171
+    )
172 172
 );
173 173
 
174 174
 
175 175
 Redux_Metaboxes::set_box(
176
-	$opt_name,
177
-	array(
178
-		'id'         => 'opt-metaboxes-2',
179
-		'post_types' => array( 'page', 'post' ),
180
-		'position'   => 'side', // normal, advanced, side.
181
-		'priority'   => 'high', // high, core, default, low.
182
-		'sections'   => array(
183
-			array(
184
-				'icon_class' => 'icon-large',
185
-				'icon'       => 'el-icon-home',
186
-				'fields'     => array(
187
-					array(
188
-						'title'   => esc_html__( 'Cross Box Required', 'your-textdomain-here' ),
189
-						'desc'    => esc_html__( 'Required arguments work across metaboxes! Click on Color Field under Metabox Options then adjust this field to see the fields within show or hide.', 'your-textdomain-here' ),
190
-						'id'      => 'opt-layout',
191
-						'type'    => 'radio',
192
-						'options' => array(
193
-							'on'  => esc_html__( 'On', 'your-textdomain-here' ),
194
-							'off' => esc_html__( 'Off', 'your-textdomain-here' ),
195
-						),
196
-						'default' => 'on',
197
-					),
198
-				),
199
-			),
200
-		),
201
-	)
176
+    $opt_name,
177
+    array(
178
+        'id'         => 'opt-metaboxes-2',
179
+        'post_types' => array( 'page', 'post' ),
180
+        'position'   => 'side', // normal, advanced, side.
181
+        'priority'   => 'high', // high, core, default, low.
182
+        'sections'   => array(
183
+            array(
184
+                'icon_class' => 'icon-large',
185
+                'icon'       => 'el-icon-home',
186
+                'fields'     => array(
187
+                    array(
188
+                        'title'   => esc_html__( 'Cross Box Required', 'your-textdomain-here' ),
189
+                        'desc'    => esc_html__( 'Required arguments work across metaboxes! Click on Color Field under Metabox Options then adjust this field to see the fields within show or hide.', 'your-textdomain-here' ),
190
+                        'id'      => 'opt-layout',
191
+                        'type'    => 'radio',
192
+                        'options' => array(
193
+                            'on'  => esc_html__( 'On', 'your-textdomain-here' ),
194
+                            'off' => esc_html__( 'Off', 'your-textdomain-here' ),
195
+                        ),
196
+                        'default' => 'on',
197
+                    ),
198
+                ),
199
+            ),
200
+        ),
201
+    )
202 202
 );
203 203
 
204 204
 Redux_Metaboxes::set_box(
205
-	$opt_name,
206
-	array(
207
-		'id'         => 'opt-metaboxes-3',
208
-		'post_types' => array( 'page', 'post' ),
209
-		'position'   => 'side', // normal, advanced, side.
210
-		'priority'   => 'high', // high, core, default, low.
211
-		'sections'   => array(
212
-			array(
213
-				'icon_class' => 'icon-large',
214
-				'icon'       => 'el-icon-home',
215
-				'fields'     => array(
216
-					array(
217
-						'id'      => 'sidebar',
218
-						'title'   => esc_html__( 'Sidebar', 'your-textdomain-here' ),
219
-						'desc'    => esc_html__( 'Please select the sidebar you would like to display on this page. Note: You must first create the sidebar under Appearance > Widgets.', 'your-textdomain-here' ),
220
-						'type'    => 'select',
221
-						'data'    => 'sidebars',
222
-						'default' => 'None',
223
-					),
224
-				),
225
-			),
226
-		),
227
-	)
205
+    $opt_name,
206
+    array(
207
+        'id'         => 'opt-metaboxes-3',
208
+        'post_types' => array( 'page', 'post' ),
209
+        'position'   => 'side', // normal, advanced, side.
210
+        'priority'   => 'high', // high, core, default, low.
211
+        'sections'   => array(
212
+            array(
213
+                'icon_class' => 'icon-large',
214
+                'icon'       => 'el-icon-home',
215
+                'fields'     => array(
216
+                    array(
217
+                        'id'      => 'sidebar',
218
+                        'title'   => esc_html__( 'Sidebar', 'your-textdomain-here' ),
219
+                        'desc'    => esc_html__( 'Please select the sidebar you would like to display on this page. Note: You must first create the sidebar under Appearance > Widgets.', 'your-textdomain-here' ),
220
+                        'type'    => 'select',
221
+                        'data'    => 'sidebars',
222
+                        'default' => 'None',
223
+                    ),
224
+                ),
225
+            ),
226
+        ),
227
+    )
228 228
 );
229 229
 // phpcs:enable
Please login to merge, or discard this patch.
extension/sample_extension/class-redux-extension-sample-extension.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -21,47 +21,47 @@
 block discarded – undo
21 21
 // Don't duplicate me!
22 22
 if ( ! class_exists( 'Redux_Extension_My_Extension', false ) ) {
23 23
 
24
-	/**
25
-	 * Class Redux_Extension_My_Extension
26
-	 */
27
-	class Redux_Extension_My_Extension extends Redux_Extension_Abstract {
28
-		/**
29
-		 * Set extension version.
30
-		 *
31
-		 * @var string
32
-		 */
33
-		public static string $version = '1.0.0';
24
+    /**
25
+     * Class Redux_Extension_My_Extension
26
+     */
27
+    class Redux_Extension_My_Extension extends Redux_Extension_Abstract {
28
+        /**
29
+         * Set extension version.
30
+         *
31
+         * @var string
32
+         */
33
+        public static string $version = '1.0.0';
34 34
 
35
-		/**
36
-		 * Set the friendly name of the extension.  This is for display purposes.  No underscores or dashes are required.
37
-		 *
38
-		 * @var string
39
-		 */
40
-		private $extension_name = 'My Extension';
35
+        /**
36
+         * Set the friendly name of the extension.  This is for display purposes.  No underscores or dashes are required.
37
+         *
38
+         * @var string
39
+         */
40
+        private $extension_name = 'My Extension';
41 41
 
42
-		/**
43
-		 * Set the minimum required version of Redux here (optional).
44
-		 *
45
-		 * Leave blank to require no minimum version.  This allows you to specify a minimum required version of
46
-		 * Redux in the event you do not want to support older versions.
47
-		 *
48
-		 * @var string
49
-		 */
50
-		private $minimum_redux_version = '4.0.0';
42
+        /**
43
+         * Set the minimum required version of Redux here (optional).
44
+         *
45
+         * Leave blank to require no minimum version.  This allows you to specify a minimum required version of
46
+         * Redux in the event you do not want to support older versions.
47
+         *
48
+         * @var string
49
+         */
50
+        private $minimum_redux_version = '4.0.0';
51 51
 
52
-		/**
53
-		 * Redux_Extension_my_extension constructor.
54
-		 *
55
-		 * @param ReduxFramework $redux ReduxFramework pointer.
56
-		 */
57
-		public function __construct( $redux ) {
58
-			parent::__construct( $redux, __FILE__ );
52
+        /**
53
+         * Redux_Extension_my_extension constructor.
54
+         *
55
+         * @param ReduxFramework $redux ReduxFramework pointer.
56
+         */
57
+        public function __construct( $redux ) {
58
+            parent::__construct( $redux, __FILE__ );
59 59
 
60
-			if ( is_admin() && ! $this->is_minimum_version( $this->minimum_redux_version, self::$version, $this->extension_name ) ) {
61
-				return;
62
-			}
60
+            if ( is_admin() && ! $this->is_minimum_version( $this->minimum_redux_version, self::$version, $this->extension_name ) ) {
61
+                return;
62
+            }
63 63
 
64
-			$this->add_field( 'my_field' );
65
-		}
66
-	}
64
+            $this->add_field( 'my_field' );
65
+        }
66
+    }
67 67
 }
Please login to merge, or discard this patch.
sample_extension/sample_extension/class-redux-sample-extension.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -22,68 +22,68 @@
 block discarded – undo
22 22
 // Don't duplicate me!
23 23
 if ( ! class_exists( 'Redux_My_Extension', false ) ) {
24 24
 
25
-	/**
26
-	 * Main Redux_My_Extension class
27
-	 *
28
-	 * @since       1.0.0
29
-	 */
30
-	class Redux_My_Extension extends Redux_Field {
31
-		/**
32
-		 * Field Constructor.
33
-		 * Required - must call the parent constructor, then assign field and value to vars
34
-		 *
35
-		 * @param array          $field  Field array.
36
-		 * @param mixed          $value  Field values.
37
-		 * @param ReduxFramework $redux ReduxFramework pointer.
38
-		 *
39
-		 * @throws ReflectionException Construct Exception.
40
-		 */
41
-		public function __construct( array $field, $value, $redux ) {
42
-			parent::__construct( $field, $value, $redux );
25
+    /**
26
+     * Main Redux_My_Extension class
27
+     *
28
+     * @since       1.0.0
29
+     */
30
+    class Redux_My_Extension extends Redux_Field {
31
+        /**
32
+         * Field Constructor.
33
+         * Required - must call the parent constructor, then assign field and value to vars
34
+         *
35
+         * @param array          $field  Field array.
36
+         * @param mixed          $value  Field values.
37
+         * @param ReduxFramework $redux ReduxFramework pointer.
38
+         *
39
+         * @throws ReflectionException Construct Exception.
40
+         */
41
+        public function __construct( array $field, $value, $redux ) {
42
+            parent::__construct( $field, $value, $redux );
43 43
 
44
-			// Set default args for this field to avoid bad indexes. Change this to anything you use.
45
-			$defaults = array(
46
-				'options'          => array(),
47
-				'stylesheet'       => '',
48
-				'output'           => true,
49
-				'enqueue'          => true,
50
-				'enqueue_frontend' => true,
51
-			);
44
+            // Set default args for this field to avoid bad indexes. Change this to anything you use.
45
+            $defaults = array(
46
+                'options'          => array(),
47
+                'stylesheet'       => '',
48
+                'output'           => true,
49
+                'enqueue'          => true,
50
+                'enqueue_frontend' => true,
51
+            );
52 52
 
53
-			$this->field = wp_parse_args( $this->field, $defaults );
54
-		}
53
+            $this->field = wp_parse_args( $this->field, $defaults );
54
+        }
55 55
 
56
-		/**
57
-		 * Field Render Function.
58
-		 * Takes the vars and outputs the HTML for the field in the settings
59
-		 *
60
-		 * @return      void
61
-		 */
62
-		public function render() {
63
-			// Render the field.
64
-		}
56
+        /**
57
+         * Field Render Function.
58
+         * Takes the vars and outputs the HTML for the field in the settings
59
+         *
60
+         * @return      void
61
+         */
62
+        public function render() {
63
+            // Render the field.
64
+        }
65 65
 
66
-		/**
67
-		 * Enqueue Function.
68
-		 * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
69
-		 *
70
-		 * @return      void
71
-		 */
72
-		public function enqueue() {
73
-			wp_enqueue_script(
74
-				'redux-my-field',
75
-				$this->url . 'redux-my-extension.js',
76
-				array( 'jquery', 'redux-js' ),
77
-				Redux_Extension_My_Extension::$version,
78
-				true
79
-			);
66
+        /**
67
+         * Enqueue Function.
68
+         * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
69
+         *
70
+         * @return      void
71
+         */
72
+        public function enqueue() {
73
+            wp_enqueue_script(
74
+                'redux-my-field',
75
+                $this->url . 'redux-my-extension.js',
76
+                array( 'jquery', 'redux-js' ),
77
+                Redux_Extension_My_Extension::$version,
78
+                true
79
+            );
80 80
 
81
-			wp_enqueue_style(
82
-				'redux-my-field',
83
-				$this->url . 'redux-my-extension.css',
84
-				array(),
85
-				Redux_Extension_my_extension::$version
86
-			);
87
-		}
88
-	}
81
+            wp_enqueue_style(
82
+                'redux-my-field',
83
+                $this->url . 'redux-my-extension.css',
84
+                array(),
85
+                Redux_Extension_my_extension::$version
86
+            );
87
+        }
88
+    }
89 89
 }
Please login to merge, or discard this patch.
sample/sections/media-uploads/media.php 1 patch
Indentation   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -10,102 +10,102 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Media', 'your-textdomain-here' ),
16
-		'id'         => 'media-media',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/media.html" target="_blank">https://devs.redux.io/core-fields/media.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'           => 'opt-media',
22
-				'type'         => 'media',
23
-				'url'          => true,
24
-				'title'        => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
25
-				'compiler'     => 'true',
26
-				'desc'         => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
27
-				'subtitle'     => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
28
-				'preview_size' => 'full',
29
-			),
30
-			array(
31
-				'id'       => 'media-no-url',
32
-				'type'     => 'media',
33
-				'title'    => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
34
-				'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' ),
35
-				'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
36
-				'url'      => false,
37
-				'preview'  => true,
38
-			),
39
-			array(
40
-				'id'       => 'media-no-preview',
41
-				'type'     => 'media',
42
-				'preview'  => false,
43
-				'title'    => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
44
-				'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' ),
45
-				'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
46
-				'hint'     => array(
47
-					'title'   => esc_html__( 'Test Hint', 'your-textdomain-here' ),
48
-					'content' => wp_kses_post( 'This is a <b>hint</b> tool-tip for the webFonts field.<br/><br/>Add any HTML-based text you like here.' ),
49
-				),
50
-			),
51
-			array(
52
-				'id'         => 'opt-random-upload',
53
-				'type'       => 'media',
54
-				'title'      => esc_html__( 'Upload Anything - Disabled Mode', 'your-textdomain-here' ),
55
-				'full_width' => true,
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Media', 'your-textdomain-here' ),
16
+        'id'         => 'media-media',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/media.html" target="_blank">https://devs.redux.io/core-fields/media.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'           => 'opt-media',
22
+                'type'         => 'media',
23
+                'url'          => true,
24
+                'title'        => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
25
+                'compiler'     => 'true',
26
+                'desc'         => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
27
+                'subtitle'     => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
28
+                'preview_size' => 'full',
29
+            ),
30
+            array(
31
+                'id'       => 'media-no-url',
32
+                'type'     => 'media',
33
+                'title'    => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
34
+                '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' ),
35
+                'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
36
+                'url'      => false,
37
+                'preview'  => true,
38
+            ),
39
+            array(
40
+                'id'       => 'media-no-preview',
41
+                'type'     => 'media',
42
+                'preview'  => false,
43
+                'title'    => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
44
+                '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' ),
45
+                'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
46
+                'hint'     => array(
47
+                    'title'   => esc_html__( 'Test Hint', 'your-textdomain-here' ),
48
+                    'content' => wp_kses_post( 'This is a <b>hint</b> tool-tip for the webFonts field.<br/><br/>Add any HTML-based text you like here.' ),
49
+                ),
50
+            ),
51
+            array(
52
+                'id'         => 'opt-random-upload',
53
+                'type'       => 'media',
54
+                'title'      => esc_html__( 'Upload Anything - Disabled Mode', 'your-textdomain-here' ),
55
+                'full_width' => true,
56 56
 
57
-				// Can be set to false to allow any media type, or can also be set to any mime type.
58
-				'mode'       => false,
57
+                // Can be set to false to allow any media type, or can also be set to any mime type.
58
+                'mode'       => false,
59 59
 
60
-				'desc'       => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
61
-				'subtitle'   => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
62
-			),
63
-			array(
64
-				'id'           => 'opt-media-filter',
65
-				'type'         => 'media',
66
-				'url'          => true,
67
-				'title'        => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
68
-				'compiler'     => true,
69
-				'desc'         => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
70
-				'subtitle'     => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
71
-				'preview_size' => 'full',
72
-				'default'      => array(
73
-					'url'    => 'https://s.wordpress.org/style/images/codeispoetry.png',
74
-					'filter' => array(
75
-						'grayscale' => array(
76
-							'checked' => true,
77
-							'value'   => 50,
78
-						),
79
-					),
80
-				),
81
-				'filter'       => array(
82
-					'grayscale'  => true,
83
-					'blur'       => true,
84
-					'sepia'      => true,
85
-					'saturate'   => true,
86
-					'opacity'    => true,
87
-					'brightness' => true,
88
-					'contrast'   => true,
89
-					'hue-rotate' => true,
90
-					'invert'     => true,
91
-				),
92
-				'output'       => array( '.header-image img, .site-logo, .wp-block-site-logo' ),
93
-			),
94
-			array(
95
-				'id'           => 'media-no-url-filter',
96
-				'type'         => 'media',
97
-				'title'        => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
98
-				'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' ),
99
-				'subtitle'     => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
100
-				'url'          => false,
101
-				'filter'       => array(
102
-					'grayscale' => true,
103
-					'blur'      => true,
104
-				),
105
-				'preview'      => true,
106
-				'preview_size' => 'full',
107
-			),
108
-		),
109
-	)
60
+                'desc'       => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
61
+                'subtitle'   => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
62
+            ),
63
+            array(
64
+                'id'           => 'opt-media-filter',
65
+                'type'         => 'media',
66
+                'url'          => true,
67
+                'title'        => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
68
+                'compiler'     => true,
69
+                'desc'         => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
70
+                'subtitle'     => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
71
+                'preview_size' => 'full',
72
+                'default'      => array(
73
+                    'url'    => 'https://s.wordpress.org/style/images/codeispoetry.png',
74
+                    'filter' => array(
75
+                        'grayscale' => array(
76
+                            'checked' => true,
77
+                            'value'   => 50,
78
+                        ),
79
+                    ),
80
+                ),
81
+                'filter'       => array(
82
+                    'grayscale'  => true,
83
+                    'blur'       => true,
84
+                    'sepia'      => true,
85
+                    'saturate'   => true,
86
+                    'opacity'    => true,
87
+                    'brightness' => true,
88
+                    'contrast'   => true,
89
+                    'hue-rotate' => true,
90
+                    'invert'     => true,
91
+                ),
92
+                'output'       => array( '.header-image img, .site-logo, .wp-block-site-logo' ),
93
+            ),
94
+            array(
95
+                'id'           => 'media-no-url-filter',
96
+                'type'         => 'media',
97
+                'title'        => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
98
+                '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' ),
99
+                'subtitle'     => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
100
+                'url'          => false,
101
+                'filter'       => array(
102
+                    'grayscale' => true,
103
+                    'blur'      => true,
104
+                ),
105
+                'preview'      => true,
106
+                'preview_size' => 'full',
107
+            ),
108
+        ),
109
+    )
110 110
 );
111 111
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/media-uploads/slides.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,26 +10,26 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Slides', 'your-textdomain-here' ),
16
-		'id'         => 'additional-slides',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/slides.html" target="_blank">https://devs.redux.io/core-fields/slides.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'          => 'opt-slides',
22
-				'type'        => 'slides',
23
-				'title'       => esc_html__( 'Slides Options', 'your-textdomain-here' ),
24
-				'subtitle'    => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
25
-				'desc'        => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
26
-				'placeholder' => array(
27
-					'title'       => esc_html__( 'This is a title', 'your-textdomain-here' ),
28
-					'description' => esc_html__( 'Description Here', 'your-textdomain-here' ),
29
-					'url'         => esc_html__( 'Give us a link!', 'your-textdomain-here' ),
30
-				),
31
-			),
32
-		),
33
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Slides', 'your-textdomain-here' ),
16
+        'id'         => 'additional-slides',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/slides.html" target="_blank">https://devs.redux.io/core-fields/slides.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'          => 'opt-slides',
22
+                'type'        => 'slides',
23
+                'title'       => esc_html__( 'Slides Options', 'your-textdomain-here' ),
24
+                'subtitle'    => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
25
+                'desc'        => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
26
+                'placeholder' => array(
27
+                    'title'       => esc_html__( 'This is a title', 'your-textdomain-here' ),
28
+                    'description' => esc_html__( 'Description Here', 'your-textdomain-here' ),
29
+                    'url'         => esc_html__( 'Give us a link!', 'your-textdomain-here' ),
30
+                ),
31
+            ),
32
+        ),
33
+    )
34 34
 );
35 35
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/media-uploads/gallery.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'Gallery', 'your-textdomain-here' ),
16
-		'id'         => 'media-gallery',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/gallery.html" target="_blank">https://devs.redux.io/core-fields/gallery.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-gallery',
22
-				'type'     => 'gallery',
23
-				'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
25
-				'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
26
-			),
27
-		),
28
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'Gallery', 'your-textdomain-here' ),
16
+        'id'         => 'media-gallery',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/gallery.html" target="_blank">https://devs.redux.io/core-fields/gallery.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-gallery',
22
+                'type'     => 'gallery',
23
+                'title'    => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
25
+                'desc'     => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
26
+            ),
27
+        ),
28
+    )
29 29
 );
30 30
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/media-uploads/multi-media.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@
 block discarded – undo
11 11
 defined( 'ABSPATH' ) || exit;
12 12
 
13 13
 Redux::set_section(
14
-	$opt_name,
15
-	array(
16
-		'title'      => esc_html__( 'Multi Media', '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/multi-media.html" target="_blank">https://devs.redux.io/core-extensions/multi-media.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'              => 'opt-multi-media',
22
-				'type'            => 'multi_media',
23
-				'title'           => esc_html__( 'Multi Media Selector', 'your-textdomain-here' ),
24
-				'subtitle'        => esc_html__( 'Alternative media field which allows for multi selections', 'your-textdomain-here' ),
25
-				'desc'            => esc_html__( 'max_file_limit has been set to 5.', 'your-textdomain-here' ),
26
-				'max_file_upload' => 5,
27
-			),
28
-		),
29
-	)
14
+    $opt_name,
15
+    array(
16
+        'title'      => esc_html__( 'Multi Media', '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/multi-media.html" target="_blank">https://devs.redux.io/core-extensions/multi-media.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'              => 'opt-multi-media',
22
+                'type'            => 'multi_media',
23
+                'title'           => esc_html__( 'Multi Media Selector', 'your-textdomain-here' ),
24
+                'subtitle'        => esc_html__( 'Alternative media field which allows for multi selections', 'your-textdomain-here' ),
25
+                'desc'            => esc_html__( 'max_file_limit has been set to 5.', 'your-textdomain-here' ),
26
+                'max_file_upload' => 5,
27
+            ),
28
+        ),
29
+    )
30 30
 );
31 31
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/editors/wordpress-editor.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__( 'WordPress Editor', 'your-textdomain-here' ),
16
-		'id'         => 'editor-wordpress',
17
-		'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/editor.html" target="_blank">https://devs.redux.io/core-fields/editor.html</a>',
18
-		'subsection' => true,
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-editor',
22
-				'type'     => 'editor',
23
-				'title'    => esc_html__( 'Editor', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'Use any of the features of WordPress editor inside your panel!', 'your-textdomain-here' ),
25
-				'default'  => 'Powered by Redux Framework.',
26
-			),
27
-			array(
28
-				'id'      => 'opt-editor-tiny',
29
-				'type'    => 'editor',
30
-				'title'   => esc_html__( 'Editor w/o Media Button', 'your-textdomain-here' ),
31
-				'default' => 'Powered by Redux Framework.',
32
-				'args'    => array(
33
-					'wpautop'       => false,
34
-					'media_buttons' => false,
35
-					'textarea_rows' => 5,
36
-					'teeny'         => false,
37
-					'quicktags'     => false,
38
-				),
39
-			),
40
-			array(
41
-				'id'         => 'opt-editor-full',
42
-				'type'       => 'editor',
43
-				'title'      => esc_html__( 'Editor - Full Width', 'your-textdomain-here' ),
44
-				'full_width' => true,
45
-			),
46
-		),
47
-	)
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'WordPress Editor', 'your-textdomain-here' ),
16
+        'id'         => 'editor-wordpress',
17
+        'desc'       => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/editor.html" target="_blank">https://devs.redux.io/core-fields/editor.html</a>',
18
+        'subsection' => true,
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-editor',
22
+                'type'     => 'editor',
23
+                'title'    => esc_html__( 'Editor', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'Use any of the features of WordPress editor inside your panel!', 'your-textdomain-here' ),
25
+                'default'  => 'Powered by Redux Framework.',
26
+            ),
27
+            array(
28
+                'id'      => 'opt-editor-tiny',
29
+                'type'    => 'editor',
30
+                'title'   => esc_html__( 'Editor w/o Media Button', 'your-textdomain-here' ),
31
+                'default' => 'Powered by Redux Framework.',
32
+                'args'    => array(
33
+                    'wpautop'       => false,
34
+                    'media_buttons' => false,
35
+                    'textarea_rows' => 5,
36
+                    'teeny'         => false,
37
+                    'quicktags'     => false,
38
+                ),
39
+            ),
40
+            array(
41
+                'id'         => 'opt-editor-full',
42
+                'type'       => 'editor',
43
+                'title'      => esc_html__( 'Editor - Full Width', 'your-textdomain-here' ),
44
+                'full_width' => true,
45
+            ),
46
+        ),
47
+    )
48 48
 );
49 49
 // phpcs:enable
Please login to merge, or discard this patch.
sample/sections/editors/ace-editor.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -10,48 +10,48 @@
 block discarded – undo
10 10
 defined( 'ABSPATH' ) || exit;
11 11
 
12 12
 Redux::set_section(
13
-	$opt_name,
14
-	array(
15
-		'title'      => esc_html__( 'ACE Editor', 'your-textdomain-here' ),
16
-		'id'         => 'editor-ace',
17
-		'subsection' => true,
18
-		'desc'       => esc_html__( 'For full documentation on the this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/ace-editor.html" target="_blank">https://devs.redux.io/core-fields/ace-editor.html</a>',
19
-		'fields'     => array(
20
-			array(
21
-				'id'       => 'opt-ace-editor-css',
22
-				'type'     => 'ace_editor',
23
-				'title'    => esc_html__( 'CSS Code', 'your-textdomain-here' ),
24
-				'subtitle' => esc_html__( 'Paste your CSS code here.', 'your-textdomain-here' ),
25
-				'mode'     => 'css',
26
-				'theme'    => 'monokai',
27
-				'desc'     => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
28
-				'default'  => '#header{
13
+    $opt_name,
14
+    array(
15
+        'title'      => esc_html__( 'ACE Editor', 'your-textdomain-here' ),
16
+        'id'         => 'editor-ace',
17
+        'subsection' => true,
18
+        'desc'       => esc_html__( 'For full documentation on the this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/ace-editor.html" target="_blank">https://devs.redux.io/core-fields/ace-editor.html</a>',
19
+        'fields'     => array(
20
+            array(
21
+                'id'       => 'opt-ace-editor-css',
22
+                'type'     => 'ace_editor',
23
+                'title'    => esc_html__( 'CSS Code', 'your-textdomain-here' ),
24
+                'subtitle' => esc_html__( 'Paste your CSS code here.', 'your-textdomain-here' ),
25
+                'mode'     => 'css',
26
+                'theme'    => 'monokai',
27
+                'desc'     => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
28
+                'default'  => '#header{
29 29
 	margin: 0 auto;
30 30
 }',
31
-			),
32
-			array(
33
-				'id'       => 'opt-ace-editor-js',
34
-				'type'     => 'ace_editor',
35
-				'title'    => esc_html__( 'JS Code', 'your-textdomain-here' ),
36
-				'subtitle' => esc_html__( 'Paste your JS code here.', 'your-textdomain-here' ),
37
-				'mode'     => 'javascript',
38
-				'theme'    => 'chrome',
39
-				'desc'     => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
40
-				'default'  => 'jQuery(document).ready(function(){\n\n});',
41
-			),
42
-			array(
43
-				'id'         => 'opt-ace-editor-php',
44
-				'type'       => 'ace_editor',
45
-				'full_width' => true,
46
-				'title'      => esc_html__( 'PHP Code', 'your-textdomain-here' ),
47
-				'subtitle'   => esc_html__( 'Paste your PHP code here.', 'your-textdomain-here' ),
48
-				'mode'       => 'php',
49
-				'theme'      => 'chrome',
50
-				'desc'       => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
51
-				'default'    => '<?php
31
+            ),
32
+            array(
33
+                'id'       => 'opt-ace-editor-js',
34
+                'type'     => 'ace_editor',
35
+                'title'    => esc_html__( 'JS Code', 'your-textdomain-here' ),
36
+                'subtitle' => esc_html__( 'Paste your JS code here.', 'your-textdomain-here' ),
37
+                'mode'     => 'javascript',
38
+                'theme'    => 'chrome',
39
+                'desc'     => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
40
+                'default'  => 'jQuery(document).ready(function(){\n\n});',
41
+            ),
42
+            array(
43
+                'id'         => 'opt-ace-editor-php',
44
+                'type'       => 'ace_editor',
45
+                'full_width' => true,
46
+                'title'      => esc_html__( 'PHP Code', 'your-textdomain-here' ),
47
+                'subtitle'   => esc_html__( 'Paste your PHP code here.', 'your-textdomain-here' ),
48
+                'mode'       => 'php',
49
+                'theme'      => 'chrome',
50
+                'desc'       => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
51
+                'default'    => '<?php
52 52
     echo "PHP String";',
53
-			),
54
-		),
55
-	)
53
+            ),
54
+        ),
55
+    )
56 56
 );
57 57
 // phpcs:enable
Please login to merge, or discard this patch.