1 <?php |
1 <?php |
2 /** |
2 /** |
3 * Initialize the options before anything else. |
3 * Initialize the custom Theme Options. |
4 */ |
4 */ |
5 add_action( 'admin_init', '_custom_theme_options', 1 ); |
5 add_action( 'init', 'custom_theme_options' ); |
6 |
6 |
7 /** |
7 /** |
8 * Theme Mode demo code of all the available option types. |
8 * Build the custom settings & update OptionTree. |
9 * |
9 * |
10 * @return void |
10 * @return void |
11 * |
|
12 * @access private |
|
13 * @since 2.0 |
11 * @since 2.0 |
14 */ |
12 */ |
15 function _custom_theme_options() { |
13 function custom_theme_options() { |
16 |
14 |
|
15 /* OptionTree is not loaded yet, or this is not an admin request */ |
|
16 if ( ! function_exists( 'ot_settings_id' ) || ! is_admin() ) |
|
17 return false; |
|
18 |
17 /** |
19 /** |
18 * Get a copy of the saved settings array. |
20 * Get a copy of the saved settings array. |
19 */ |
21 */ |
20 $saved_settings = get_option( 'option_tree_settings', array() ); |
22 $saved_settings = get_option( ot_settings_id(), array() ); |
21 |
23 |
22 /** |
24 /** |
23 * Create a custom settings array that we pass to |
25 * Custom settings array that will eventually be |
24 * the OptionTree Settings API Class. |
26 * passes to the OptionTree Settings API Class. |
25 */ |
27 */ |
26 $custom_settings = array( |
28 $custom_settings = array( |
27 'contextual_help' => array( |
29 'contextual_help' => array( |
28 'content' => array( |
30 'content' => array( |
29 array( |
31 array( |
30 'id' => 'general_help', |
32 'id' => 'option_types_help', |
31 'title' => 'General', |
33 'title' => __( 'Option Types', 'theme-text-domain' ), |
32 'content' => '<p>Help content goes here!</p>' |
34 'content' => '<p>' . __( 'Help content goes here!', 'theme-text-domain' ) . '</p>' |
33 ) |
35 ) |
34 ), |
36 ), |
35 'sidebar' => '<p>Sidebar content goes here!</p>' |
37 'sidebar' => '<p>' . __( 'Sidebar content goes here!', 'theme-text-domain' ) . '</p>' |
36 ), |
38 ), |
37 'sections' => array( |
39 'sections' => array( |
38 array( |
40 array( |
39 'title' => 'General', |
41 'id' => 'option_types', |
40 'id' => 'general_default' |
42 'title' => __( 'Option Types', 'theme-text-domain' ) |
41 ), |
|
42 array( |
|
43 'title' => 'Miscellaneous ', |
|
44 'id' => 'miscellaneous' |
|
45 ) |
43 ) |
46 ), |
44 ), |
47 'settings' => array( |
45 'settings' => array( |
48 array( |
46 array( |
49 'label' => 'Background', |
47 'id' => 'demo_background', |
50 'id' => 'my_background', |
48 'label' => __( 'Background', 'theme-text-domain' ), |
|
49 'desc' => sprintf( __( 'The Background option type is for adding background styles to your theme either dynamically via the CSS option type below or manually with %s. The Background option type has filters that allow you to remove fields or change the defaults. For example, you can filter %s to remove unwanted fields from all Background options or an individual one. You can also filter %s. These filters allow you to fine tune the select lists for your specific needs.', 'theme-text-domain' ), '<code>ot_get_option()</code>', '<code>ot_recognized_background_fields</code>', '<code>ot_recognized_background_repeat</code>, <code>ot_recognized_background_attachment</code>, <code>ot_recognized_background_position</code>, ' . __( 'and', 'theme-text-domain' ) . ' <code>ot_type_background_size_choices</code>' ), |
|
50 'std' => '', |
51 'type' => 'background', |
51 'type' => 'background', |
52 'desc' => 'BlahLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
52 'section' => 'option_types', |
53 'std' => '', |
53 'rows' => '', |
54 'rows' => '', |
54 'post_type' => '', |
55 'post_type' => '', |
55 'taxonomy' => '', |
56 'taxonomy' => '', |
56 'min_max_step'=> '', |
57 'class' => '', |
57 'class' => '', |
58 'section' => 'general_default' |
58 'condition' => '', |
59 ), |
59 'operator' => 'and' |
60 array( |
60 ), |
61 'label' => 'Category Checkbox', |
61 array( |
62 'id' => 'my_category_checkbox', |
62 'id' => 'demo_border', |
|
63 'label' => __( 'Border', 'theme-text-domain' ), |
|
64 'desc' => __( 'The Border option type is used to set width, unit, style, and color values.', 'theme-text-domain' ), |
|
65 'std' => '', |
|
66 'type' => 'border', |
|
67 'section' => 'option_types', |
|
68 'rows' => '', |
|
69 'post_type' => '', |
|
70 'taxonomy' => '', |
|
71 'min_max_step'=> '', |
|
72 'class' => '', |
|
73 'condition' => '', |
|
74 'operator' => 'and' |
|
75 ), |
|
76 array( |
|
77 'id' => 'demo_box_shadow', |
|
78 'label' => __( 'Box Shadow', 'theme-text-domain' ), |
|
79 'desc' => sprintf( __( 'The Box Shadow option type is used to set %s, %s, %s, %s, %s, and %s values.', 'theme-text-domain' ), '<code>inset</code>', '<code>offset-x</code>', '<code>offset-y</code>', '<code>blur-radius</code>', '<code>spread-radius</code>', '<code>color</code>' ), |
|
80 'std' => '', |
|
81 'type' => 'box-shadow', |
|
82 'section' => 'option_types', |
|
83 'rows' => '', |
|
84 'post_type' => '', |
|
85 'taxonomy' => '', |
|
86 'min_max_step'=> '', |
|
87 'class' => '', |
|
88 'condition' => '', |
|
89 'operator' => 'and' |
|
90 ), |
|
91 array( |
|
92 'id' => 'demo_category_checkbox', |
|
93 'label' => __( 'Category Checkbox', 'theme-text-domain' ), |
|
94 'desc' => __( 'The Category Checkbox option type displays a list of category IDs. It allows the user to check multiple category IDs and will return that value as an array for use in a custom function or loop.', 'theme-text-domain' ), |
|
95 'std' => '', |
63 'type' => 'category-checkbox', |
96 'type' => 'category-checkbox', |
64 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
97 'section' => 'option_types', |
65 'std' => '', |
98 'rows' => '', |
66 'rows' => '', |
99 'post_type' => '', |
67 'post_type' => '', |
100 'taxonomy' => '', |
68 'taxonomy' => '', |
101 'min_max_step'=> '', |
69 'class' => '', |
102 'class' => '', |
70 'section' => 'general_default' |
103 'condition' => '', |
71 ), |
104 'operator' => 'and' |
72 array( |
105 ), |
73 'label' => 'Category Select', |
106 array( |
74 'id' => 'my_category_select', |
107 'id' => 'demo_category_select', |
|
108 'label' => __( 'Category Select', 'theme-text-domain' ), |
|
109 'desc' => __( 'The Category Select option type displays a list of category IDs. It allows the user to select only one category ID and will return that value for use in a custom function or loop.', 'theme-text-domain' ), |
|
110 'std' => '', |
75 'type' => 'category-select', |
111 'type' => 'category-select', |
76 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
112 'section' => 'option_types', |
77 'std' => '', |
113 'rows' => '', |
78 'rows' => '', |
114 'post_type' => '', |
79 'post_type' => '', |
115 'taxonomy' => '', |
80 'taxonomy' => '', |
116 'min_max_step'=> '', |
81 'class' => '', |
117 'class' => '', |
82 'section' => 'general_default' |
118 'condition' => '', |
83 ), |
119 'operator' => 'and' |
84 array( |
120 ), |
85 'label' => 'Checkbox', |
121 array( |
86 'id' => 'my_checkbox', |
122 'id' => 'demo_checkbox', |
|
123 'label' => __( 'Checkbox', 'theme-text-domain' ), |
|
124 'desc' => __( 'The Checkbox option type displays a group of choices. It allows the user to check multiple choices and will return that value as an array for use in a custom function or loop.', 'theme-text-domain' ), |
|
125 'std' => '', |
87 'type' => 'checkbox', |
126 'type' => 'checkbox', |
88 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
127 'section' => 'option_types', |
89 'choices' => array( |
128 'rows' => '', |
90 array ( |
129 'post_type' => '', |
91 'label' => 'Yes', |
130 'taxonomy' => '', |
92 'value' => 'Yes' |
131 'min_max_step'=> '', |
|
132 'class' => '', |
|
133 'condition' => '', |
|
134 'operator' => 'and', |
|
135 'choices' => array( |
|
136 array( |
|
137 'value' => 'no', |
|
138 'label' => __( 'No', 'theme-text-domain' ), |
|
139 'src' => '' |
|
140 ), |
|
141 array( |
|
142 'value' => 'Yes', |
|
143 'label' => __( 'Yes', 'theme-text-domain' ), |
|
144 'src' => '' |
|
145 ) |
|
146 ) |
|
147 ), |
|
148 array( |
|
149 'id' => 'demo_colorpicker', |
|
150 'label' => __( 'Colorpicker', 'theme-text-domain' ), |
|
151 'desc' => __( 'The Colorpicker option type saves a hexadecimal color code for use in CSS. Use it to modify the color of something in your theme.', 'theme-text-domain' ), |
|
152 'std' => '', |
|
153 'type' => 'colorpicker', |
|
154 'section' => 'option_types', |
|
155 'rows' => '', |
|
156 'post_type' => '', |
|
157 'taxonomy' => '', |
|
158 'min_max_step'=> '', |
|
159 'class' => '', |
|
160 'condition' => '', |
|
161 'operator' => 'and' |
|
162 ), |
|
163 array( |
|
164 'id' => 'demo_colorpicker_opacity', |
|
165 'label' => __( 'Colorpicker Opacity', 'theme-text-domain' ), |
|
166 'desc' => __( 'Colorpicker Opacity', 'option-tree-theme' ), |
|
167 'desc' => sprintf( __( 'The Colorpicker Opacity option type saves an rgba color value for use in CSS. To add opacity to other colorpickers add the %s class to the %s array.', 'option-tree' ), '<code>ot-colorpicker-opacity</code>', '<code>$args</code>' ), |
|
168 'std' => '', |
|
169 'type' => 'colorpicker-opacity', |
|
170 'section' => 'option_types', |
|
171 'rows' => '', |
|
172 'post_type' => '', |
|
173 'taxonomy' => '', |
|
174 'min_max_step'=> '', |
|
175 'class' => '', |
|
176 'condition' => '', |
|
177 'operator' => 'and' |
|
178 ), |
|
179 array( |
|
180 'id' => 'demo_css', |
|
181 'label' => __( 'CSS', 'theme-text-domain' ), |
|
182 'desc' => '<p>' . sprintf( __( 'The CSS option type is a textarea that when used properly can add dynamic CSS to your theme from within OptionTree. Unfortunately, due server limitations you will need to create a file named %s at the root level of your theme and change permissions using %s so the server can write to the file. I have had the most success setting this single file to %s but feel free to play around with permissions until everything is working. A good starting point is %s. When the server can save to the file, CSS will automatically be updated when you save your Theme Options.', 'theme-text-domain' ), '<code>dynamic.css</code>', '<code>chmod</code>', '<code>0777</code>', '<code>0666</code>' ) . '</p><p>' . sprintf( __( 'This example assumes you have an option with the ID of %1$s. Which means this option will automatically insert the value of %1$s into the %2$s when the Theme Options are saved.', 'theme-text-domain' ), '<code>demo_background</code>', '<code>dynamic.css</code>' ) . '</p>', |
|
183 'std' => '#custom { |
|
184 {{demo_background}} |
|
185 }', |
|
186 'type' => 'css', |
|
187 'section' => 'option_types', |
|
188 'rows' => '20', |
|
189 'post_type' => '', |
|
190 'taxonomy' => '', |
|
191 'min_max_step'=> '', |
|
192 'class' => '', |
|
193 'condition' => '', |
|
194 'operator' => 'and' |
|
195 ), |
|
196 array( |
|
197 'id' => 'demo_custom_post_type_checkbox', |
|
198 'label' => __( 'Custom Post Type Checkbox', 'theme-text-domain' ), |
|
199 'desc' => sprintf( __( 'The Custom Post Type Select option type displays a list of IDs from any available WordPress post type or custom post type. It allows the user to check multiple post IDs for use in a custom function or loop. Requires at least one valid %1$s in the %1$s field.', 'theme-text-domain' ), '<code>post_type</code>' ), |
|
200 'std' => '', |
|
201 'type' => 'custom-post-type-checkbox', |
|
202 'section' => 'option_types', |
|
203 'rows' => '', |
|
204 'post_type' => 'post', |
|
205 'taxonomy' => '', |
|
206 'min_max_step'=> '', |
|
207 'class' => '', |
|
208 'condition' => '', |
|
209 'operator' => 'and' |
|
210 ), |
|
211 array( |
|
212 'id' => 'demo_custom_post_type_select', |
|
213 'label' => __( 'Custom Post Type Select', 'theme-text-domain' ), |
|
214 'desc' => sprintf( __( 'The Custom Post Type Select option type displays a list of IDs from any available WordPress post type or custom post type. It will return a single post ID for use in a custom function or loop. Requires at least one valid %1$s in the %1$s field.', 'theme-text-domain' ), '<code>post_type</code>' ), |
|
215 'std' => '', |
|
216 'type' => 'custom-post-type-select', |
|
217 'section' => 'option_types', |
|
218 'rows' => '', |
|
219 'post_type' => 'post', |
|
220 'taxonomy' => '', |
|
221 'min_max_step'=> '', |
|
222 'class' => '', |
|
223 'condition' => '', |
|
224 'operator' => 'and' |
|
225 ), |
|
226 array( |
|
227 'id' => 'demo_date_picker', |
|
228 'label' => __( 'Date Picker', 'theme-text-domain' ), |
|
229 'desc' => __( 'The Date Picker option type is tied to a standard form input field which displays a calendar pop-up that allow the user to pick any date when focus is given to the input field. The returned value is a date formatted string.', 'theme-text-domain' ), |
|
230 'std' => '', |
|
231 'type' => 'date-picker', |
|
232 'section' => 'option_types', |
|
233 'rows' => '', |
|
234 'post_type' => '', |
|
235 'taxonomy' => '', |
|
236 'min_max_step'=> '', |
|
237 'class' => '', |
|
238 'condition' => '', |
|
239 'operator' => 'and' |
|
240 ), |
|
241 array( |
|
242 'id' => 'demo_date_time_picker', |
|
243 'label' => __( 'Date Time Picker', 'theme-text-domain' ), |
|
244 'desc' => __( 'The Date Time Picker option type is tied to a standard form input field which displays a calendar pop-up that allow the user to pick any date and time when focus is given to the input field. The returned value is a date and time formatted string.', 'theme-text-domain' ), |
|
245 'std' => '', |
|
246 'type' => 'date-time-picker', |
|
247 'section' => 'option_types', |
|
248 'rows' => '', |
|
249 'post_type' => '', |
|
250 'taxonomy' => '', |
|
251 'min_max_step'=> '', |
|
252 'class' => '', |
|
253 'condition' => '', |
|
254 'operator' => 'and' |
|
255 ), |
|
256 array( |
|
257 'id' => 'demo_dimension', |
|
258 'label' => __( 'Dimension', 'theme-text-domain' ), |
|
259 'desc' => __( 'The Dimension option type is used to set width and height values.', 'theme-text-domain' ), |
|
260 'std' => '', |
|
261 'type' => 'dimension', |
|
262 'section' => 'option_types', |
|
263 'rows' => '', |
|
264 'post_type' => '', |
|
265 'taxonomy' => '', |
|
266 'min_max_step'=> '', |
|
267 'class' => '', |
|
268 'condition' => '', |
|
269 'operator' => 'and' |
|
270 ), |
|
271 array( |
|
272 'id' => 'demo_gallery', |
|
273 'label' => __( 'Gallery', 'theme-text-domain' ), |
|
274 'desc' => __( 'The Gallery option type saves a comma separated list of image attachment IDs. You will need to create a front-end function to display the images in your theme.', 'theme-text-domain' ), |
|
275 'std' => '', |
|
276 'type' => 'gallery', |
|
277 'section' => 'option_types', |
|
278 'rows' => '', |
|
279 'post_type' => '', |
|
280 'taxonomy' => '', |
|
281 'min_max_step'=> '', |
|
282 'class' => '', |
|
283 'condition' => '', |
|
284 'operator' => 'and' |
|
285 ), |
|
286 array( |
|
287 'id' => 'demo_gallery_shortcode', |
|
288 'label' => __( 'Gallery Shortcode', 'theme-text-domain' ), |
|
289 'desc' => sprintf( __( 'The Gallery option type can also be saved as a shortcode by adding %s to the class attribute. Using the Gallery option type in this manner will result in a better user experience as you\'re able to save the link, column, and order settings.', 'theme-text-domain' ), '<code>ot-gallery-shortcode</code>' ), |
|
290 'std' => '', |
|
291 'type' => 'gallery', |
|
292 'section' => 'option_types', |
|
293 'rows' => '', |
|
294 'post_type' => '', |
|
295 'taxonomy' => '', |
|
296 'min_max_step'=> '', |
|
297 'class' => 'ot-gallery-shortcode', |
|
298 'condition' => '', |
|
299 'operator' => 'and' |
|
300 ), |
|
301 array( |
|
302 'id' => 'demo_google_fonts', |
|
303 'label' => __( 'Google Fonts', 'theme-text-domain' ), |
|
304 'desc' => sprintf( __( 'The Google Fonts option type will dynamically enqueue any number of Google Web Fonts into the document %1$s. As well, once the option has been saved each font family will automatically be inserted into the %2$s array for the Typography option type. You can further modify the font stack by using the %3$s filter, which is passed the %4$s, %5$s, and %6$s parameters. The %6$s parameter is being passed from %7$s, so it will be the ID of a Typography option type. This will allow you to add additional web safe fonts to individual font families on an as-need basis.', 'theme-text-domain' ), '<code>HEAD</code>', '<code>font-family</code>', '<code>ot_google_font_stack</code>', '<code>$font_stack</code>', '<code>$family</code>', '<code>$field_id</code>', '<code>ot_recognized_font_families</code>' ), |
|
305 'std' => array( |
|
306 array( |
|
307 'family' => 'opensans', |
|
308 'variants' => array( '300', '300italic', 'regular', 'italic', '600', '600italic' ), |
|
309 'subsets' => array( 'latin' ) |
93 ) |
310 ) |
94 ), |
311 ), |
95 'std' => '', |
312 'type' => 'google-fonts', |
96 'rows' => '', |
313 'section' => 'option_types', |
97 'post_type' => '', |
314 'rows' => '', |
98 'taxonomy' => '', |
315 'post_type' => '', |
99 'class' => '', |
316 'taxonomy' => '', |
100 'section' => 'general_default' |
317 'min_max_step'=> '', |
101 ), |
318 'class' => '', |
102 array( |
319 'condition' => '', |
103 'label' => 'Colorpicker', |
320 'operator' => 'and' |
104 'id' => 'my_colorpicker', |
321 ), |
105 'type' => 'colorpicker', |
322 array( |
106 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
323 'id' => 'demo_javascript', |
107 'std' => '', |
324 'label' => __( 'JavaScript', 'theme-text-domain' ), |
108 'rows' => '', |
325 'desc' => '<p>' . sprintf( __( 'The JavaScript option type is a textarea that uses the %s code editor to highlight your JavaScript and display errors as you type.', 'theme-text-domain' ), '<code>ace.js</code>' ) . '</p>', |
109 'post_type' => '', |
326 'std' => '', |
110 'taxonomy' => '', |
327 'type' => 'javascript', |
111 'class' => '', |
328 'section' => 'option_types', |
112 'section' => 'general_default' |
|
113 ), |
|
114 array( |
|
115 'label' => 'CSS', |
|
116 'id' => 'my_css', |
|
117 'type' => 'css', |
|
118 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
|
119 'std' => '', |
|
120 'rows' => '20', |
329 'rows' => '20', |
121 'post_type' => '', |
330 'post_type' => '', |
122 'taxonomy' => '', |
331 'taxonomy' => '', |
123 'class' => '', |
332 'min_max_step'=> '', |
124 'section' => 'general_default' |
333 'class' => '', |
125 ), |
334 'condition' => '', |
126 array( |
335 'operator' => 'and' |
127 'label' => 'Custom Post Type Checkbox', |
336 ), |
128 'id' => 'my_custom_post_type_checkbox', |
337 array( |
129 'type' => 'custom-post-type-checkbox', |
338 'id' => 'demo_link_color', |
130 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
339 'label' => __( 'Link Color', 'theme-text-domain' ), |
131 'std' => '', |
340 'desc' => __( 'The Link Color option type is used to set all link color states.', 'theme-text-domain' ), |
132 'rows' => '', |
341 'std' => '', |
133 'post_type' => 'post', |
342 'type' => 'link-color', |
134 'taxonomy' => '', |
343 'section' => 'option_types', |
135 'class' => '', |
344 'rows' => '', |
136 'section' => 'general_default' |
345 'post_type' => '', |
137 ), |
346 'taxonomy' => '', |
138 array( |
347 'min_max_step'=> '', |
139 'label' => 'Custom Post Type Select', |
348 'class' => '', |
140 'id' => 'my_custom_post_type_select', |
349 'condition' => '', |
141 'type' => 'custom-post-type-select', |
350 'operator' => 'and' |
142 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
351 ), |
143 'std' => '', |
352 array( |
144 'rows' => '', |
353 'id' => 'demo_list_item', |
145 'post_type' => 'post', |
354 'label' => __( 'List Item', 'theme-text-domain' ), |
146 'taxonomy' => '', |
355 'desc' => __( 'The List Item option type allows for a great deal of customization. You can add settings to the List Item and those settings will be displayed to the user when they add a new List Item. Typical use is for creating sliding content or blocks of code for custom layouts.', 'theme-text-domain' ), |
147 'class' => '', |
356 'std' => '', |
148 'section' => 'general_default' |
|
149 ), |
|
150 array( |
|
151 'label' => 'List Item', |
|
152 'id' => 'my_list_item', |
|
153 'type' => 'list-item', |
357 'type' => 'list-item', |
154 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
358 'section' => 'option_types', |
155 'settings' => array( |
359 'rows' => '', |
156 array( |
360 'post_type' => '', |
157 'label' => 'Upload', |
361 'taxonomy' => '', |
158 'id' => 'my_list_item_upload', |
362 'min_max_step'=> '', |
159 'type' => 'upload', |
363 'class' => '', |
160 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
364 'condition' => '', |
|
365 'operator' => 'and', |
|
366 'settings' => array( |
|
367 array( |
|
368 'id' => 'demo_list_item_content', |
|
369 'label' => __( 'Content', 'theme-text-domain' ), |
|
370 'desc' => '', |
161 'std' => '', |
371 'std' => '', |
162 'rows' => '', |
|
163 'post_type' => '', |
|
164 'taxonomy' => '', |
|
165 'class' => '' |
|
166 ), |
|
167 array( |
|
168 'label' => 'Text', |
|
169 'id' => 'my_list_item_text', |
|
170 'type' => 'text', |
|
171 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
|
172 'std' => '', |
|
173 'rows' => '', |
|
174 'post_type' => '', |
|
175 'taxonomy' => '', |
|
176 'class' => '' |
|
177 ), |
|
178 array( |
|
179 'label' => 'Textarea Simple', |
|
180 'id' => 'my_list_item_textarea_simple', |
|
181 'type' => 'textarea-simple', |
372 'type' => 'textarea-simple', |
182 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
|
183 'std' => '', |
|
184 'rows' => '10', |
373 'rows' => '10', |
185 'post_type' => '', |
374 'post_type' => '', |
186 'taxonomy' => '', |
375 'taxonomy' => '', |
187 'class' => '' |
376 'min_max_step'=> '', |
|
377 'class' => '', |
|
378 'condition' => '', |
|
379 'operator' => 'and' |
188 ) |
380 ) |
189 ), |
381 ) |
190 'std' => '', |
382 ), |
191 'rows' => '', |
383 array( |
192 'post_type' => '', |
384 'id' => 'demo_measurement', |
193 'taxonomy' => '', |
385 'label' => __( 'Measurement', 'theme-text-domain' ), |
194 'class' => '', |
386 'desc' => sprintf( __( 'The Measurement option type is a mix of input and select fields. The text input excepts a value and the select lets you choose the unit of measurement to add to that value. Currently the default units are %s, %s, %s, and %s. However, you can change them with the %s filter.', 'theme-text-domain' ), '<code>px</code>', '<code>%</code>', '<code>em</code>', '<code>pt</code>', '<code>ot_measurement_unit_types</code>' ), |
195 'section' => 'general_default' |
387 'std' => '', |
196 ), |
|
197 array( |
|
198 'label' => 'Measurement', |
|
199 'id' => 'my_measurement', |
|
200 'type' => 'measurement', |
388 'type' => 'measurement', |
201 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
389 'section' => 'option_types', |
202 'std' => '', |
390 'rows' => '', |
203 'rows' => '', |
391 'post_type' => '', |
204 'post_type' => '', |
392 'taxonomy' => '', |
205 'taxonomy' => '', |
393 'min_max_step'=> '', |
206 'class' => '', |
394 'class' => '', |
207 'section' => 'general_default' |
395 'condition' => '', |
208 ), |
396 'operator' => 'and' |
209 array( |
397 ), |
210 'label' => 'Page Checkbox', |
398 array( |
211 'id' => 'my_page_checkbox', |
399 'id' => 'demo_numeric_slider', |
|
400 'label' => __( 'Numeric Slider', 'theme-text-domain' ), |
|
401 'desc' => __( 'The Numeric Slider option type displays a jQuery UI slider. It will return a single numerical value for use in a custom function or loop.', 'theme-text-domain' ), |
|
402 'std' => '', |
|
403 'type' => 'numeric-slider', |
|
404 'section' => 'option_types', |
|
405 'rows' => '', |
|
406 'post_type' => '', |
|
407 'taxonomy' => '', |
|
408 'min_max_step'=> '-500,5000,100', |
|
409 'class' => '', |
|
410 'condition' => '', |
|
411 'operator' => 'and' |
|
412 ), |
|
413 array( |
|
414 'id' => 'demo_on_off', |
|
415 'label' => __( 'On/Off', 'theme-text-domain' ), |
|
416 'desc' => sprintf( __( 'The On/Off option type displays a simple switch that can be used to turn things on or off. The saved return value is either %s or %s.', 'theme-text-domain' ), '<code>on</code>', '<code>off</code>' ), |
|
417 'std' => '', |
|
418 'type' => 'on-off', |
|
419 'section' => 'option_types', |
|
420 'rows' => '', |
|
421 'post_type' => '', |
|
422 'taxonomy' => '', |
|
423 'min_max_step'=> '', |
|
424 'class' => '', |
|
425 'condition' => '', |
|
426 'operator' => 'and' |
|
427 ), |
|
428 array( |
|
429 'id' => 'demo_page_checkbox', |
|
430 'label' => __( 'Page Checkbox', 'theme-text-domain' ), |
|
431 'desc' => __( 'The Page Checkbox option type displays a list of page IDs. It allows the user to check multiple page IDs for use in a custom function or loop.', 'theme-text-domain' ), |
|
432 'std' => '', |
212 'type' => 'page-checkbox', |
433 'type' => 'page-checkbox', |
213 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
434 'section' => 'option_types', |
214 'std' => '', |
435 'rows' => '', |
215 'rows' => '', |
436 'post_type' => '', |
216 'post_type' => '', |
437 'taxonomy' => '', |
217 'taxonomy' => '', |
438 'min_max_step'=> '', |
218 'class' => '', |
439 'class' => '', |
219 'section' => 'general_default' |
440 'condition' => '', |
220 ), |
441 'operator' => 'and' |
221 array( |
442 ), |
222 'label' => 'Page Select', |
443 array( |
223 'id' => 'my_page_select', |
444 'id' => 'demo_page_select', |
|
445 'label' => __( 'Page Select', 'theme-text-domain' ), |
|
446 'desc' => __( 'The Page Select option type displays a list of page IDs. It will return a single page ID for use in a custom function or loop.', 'theme-text-domain' ), |
|
447 'std' => '', |
224 'type' => 'page-select', |
448 'type' => 'page-select', |
225 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
449 'section' => 'option_types', |
226 'std' => '', |
450 'rows' => '', |
227 'rows' => '', |
451 'post_type' => '', |
228 'post_type' => '', |
452 'taxonomy' => '', |
229 'taxonomy' => '', |
453 'min_max_step'=> '', |
230 'class' => '', |
454 'class' => '', |
231 'section' => 'general_default' |
455 'condition' => '', |
232 ), |
456 'operator' => 'and' |
233 array( |
457 ), |
234 'label' => 'Post Checkbox', |
458 array( |
235 'id' => 'my_post_checkbox', |
459 'id' => 'demo_post_checkbox', |
|
460 'label' => __( 'Post Checkbox', 'theme-text-domain' ), |
|
461 'desc' => __( 'The Post Checkbox option type displays a list of post IDs. It allows the user to check multiple post IDs for use in a custom function or loop.', 'theme-text-domain' ), |
|
462 'std' => '', |
236 'type' => 'post-checkbox', |
463 'type' => 'post-checkbox', |
237 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
464 'section' => 'option_types', |
238 'std' => '', |
465 'rows' => '', |
239 'rows' => '', |
466 'post_type' => '', |
240 'post_type' => '', |
467 'taxonomy' => '', |
241 'taxonomy' => '', |
468 'min_max_step'=> '', |
242 'class' => '', |
469 'class' => '', |
243 'section' => 'general_default' |
470 'condition' => '', |
244 ), |
471 'operator' => 'and' |
245 array( |
472 ), |
246 'label' => 'Post Select', |
473 array( |
247 'id' => 'my_post_select', |
474 'id' => 'demo_post_select', |
|
475 'label' => __( 'Post Select', 'theme-text-domain' ), |
|
476 'desc' => __( 'The Post Select option type displays a list of post IDs. It will return a single post ID for use in a custom function or loop.', 'theme-text-domain' ), |
|
477 'std' => '', |
248 'type' => 'post-select', |
478 'type' => 'post-select', |
249 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
479 'section' => 'option_types', |
250 'std' => '', |
480 'rows' => '', |
251 'rows' => '', |
481 'post_type' => '', |
252 'post_type' => '', |
482 'taxonomy' => '', |
253 'taxonomy' => '', |
483 'min_max_step'=> '', |
254 'class' => '', |
484 'class' => '', |
255 'section' => 'general_default' |
485 'condition' => '', |
256 ), |
486 'operator' => 'and' |
257 array( |
487 ), |
258 'label' => 'Radio', |
488 array( |
259 'id' => 'my_radio', |
489 'id' => 'demo_radio', |
|
490 'label' => __( 'Radio', 'theme-text-domain' ), |
|
491 'desc' => __( 'The Radio option type displays a group of choices. It allows the user to choose one and will return that value as a string for use in a custom function or loop.', 'theme-text-domain' ), |
|
492 'std' => '', |
260 'type' => 'radio', |
493 'type' => 'radio', |
261 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
494 'section' => 'option_types', |
262 'choices' => array( |
495 'rows' => '', |
263 array( |
496 'post_type' => '', |
264 'label' => 'Yes', |
497 'taxonomy' => '', |
265 'value' => 'yes' |
498 'min_max_step'=> '', |
|
499 'class' => '', |
|
500 'condition' => '', |
|
501 'operator' => 'and', |
|
502 'choices' => array( |
|
503 array( |
|
504 'value' => 'yes', |
|
505 'label' => __( 'Yes', 'theme-text-domain' ), |
|
506 'src' => '' |
266 ), |
507 ), |
267 array( |
508 array( |
268 'label' => 'No', |
509 'value' => 'no', |
269 'value' => 'no' |
510 'label' => __( 'No', 'theme-text-domain' ), |
270 ), |
511 'src' => '' |
271 array( |
512 ), |
272 'label' => 'Maybe', |
513 array( |
273 'value' => 'maybe' |
514 'value' => 'maybe', |
|
515 'label' => __( 'Maybe', 'theme-text-domain' ), |
|
516 'src' => '' |
274 ) |
517 ) |
275 ), |
518 ) |
276 'std' => 'yes', |
519 ), |
277 'rows' => '', |
520 array( |
278 'post_type' => '', |
521 'id' => 'demo_radio_image', |
279 'taxonomy' => '', |
522 'label' => __( 'Radio Image', 'theme-text-domain' ), |
280 'class' => '', |
523 'desc' => sprintf( __( 'the Radio Images option type is primarily used for layouts. However, you can filter the image list using %s. As well, you can add your own custom images using the choices array.', 'theme-text-domain' ), '<code>ot_radio_images</code>' ), |
281 'section' => 'miscellaneous' |
524 'std' => 'right-sidebar', |
282 ), |
|
283 array( |
|
284 'label' => 'Radio Image', |
|
285 'id' => 'my_radio_image', |
|
286 'type' => 'radio-image', |
525 'type' => 'radio-image', |
287 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
526 'section' => 'option_types', |
288 'std' => 'right-sidebar', |
527 'rows' => '', |
289 'rows' => '', |
528 'post_type' => '', |
290 'post_type' => '', |
529 'taxonomy' => '', |
291 'taxonomy' => '', |
530 'min_max_step'=> '', |
292 'class' => '', |
531 'class' => '', |
293 'section' => 'miscellaneous' |
532 'condition' => '', |
294 ), |
533 'operator' => 'and' |
295 array( |
534 ), |
296 'label' => 'Select', |
535 array( |
297 'id' => 'my_select', |
536 'id' => 'demo_select', |
|
537 'label' => __( 'Select', 'theme-text-domain' ), |
|
538 'desc' => __( 'The Select option type is used to list anything you want that would be chosen from a select list.', 'theme-text-domain' ), |
|
539 'std' => '', |
298 'type' => 'select', |
540 'type' => 'select', |
299 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
541 'section' => 'option_types', |
300 'choices' => array( |
542 'rows' => '', |
301 array( |
543 'post_type' => '', |
302 'label' => 'Yes', |
544 'taxonomy' => '', |
303 'value' => 'yes' |
545 'min_max_step'=> '', |
|
546 'class' => '', |
|
547 'condition' => '', |
|
548 'operator' => 'and', |
|
549 'choices' => array( |
|
550 array( |
|
551 'value' => '', |
|
552 'label' => __( '-- Choose One --', 'theme-text-domain' ), |
|
553 'src' => '' |
304 ), |
554 ), |
305 array( |
555 array( |
306 'label' => 'No', |
556 'value' => 'yes', |
307 'value' => 'no' |
557 'label' => __( 'Yes', 'theme-text-domain' ), |
|
558 'src' => '' |
308 ), |
559 ), |
309 array( |
560 array( |
310 'label' => 'Maybe', |
561 'value' => 'no', |
311 'value' => 'maybe' |
562 'label' => __( 'No', 'theme-text-domain' ), |
|
563 'src' => '' |
|
564 ), |
|
565 array( |
|
566 'value' => 'maybe', |
|
567 'label' => __( 'Maybe', 'theme-text-domain' ), |
|
568 'src' => '' |
312 ) |
569 ) |
313 ), |
570 ) |
314 'std' => 'maybe', |
571 ), |
315 'rows' => '', |
572 array( |
316 'post_type' => '', |
573 'id' => 'demo_sidebar_select', |
317 'taxonomy' => '', |
574 'label' => __( 'Sidebar Select', 'theme-text-domain' ), |
318 'class' => '', |
575 'desc' => '<p>' . sprintf( __( 'This option type makes it possible for users to select a WordPress registered sidebar to use on a specific area. By using the two provided filters, %s, and %s we can be selective about which sidebars are available on a specific content area.', 'theme-text-domain' ), '<code>ot_recognized_sidebars</code>', '<code>ot_recognized_sidebars_{$field_id}</code>' ) . '</p><p>' . sprintf( __( 'For example, if we create a WordPress theme that provides the ability to change the Blog Sidebar and we don\'t want to have the footer sidebars available on this area, we can unset those sidebars either manually or by using a regular expression if we have a common name like %s.', 'theme-text-domain' ), '<code>footer-sidebar-$i</code>' ) . '</p>', |
319 'section' => 'miscellaneous' |
576 'std' => '', |
320 ), |
577 'type' => 'sidebar-select', |
321 array( |
578 'section' => 'option_types', |
322 'label' => 'Slider', |
579 'rows' => '', |
323 'id' => 'my_slider', |
580 'post_type' => '', |
324 'type' => 'slider', |
581 'taxonomy' => '', |
325 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
582 'min_max_step'=> '', |
326 'std' => '', |
583 'class' => '', |
327 'rows' => '', |
584 'condition' => '', |
328 'post_type' => '', |
585 'operator' => 'and' |
329 'taxonomy' => '', |
586 ), |
330 'class' => '', |
587 array( |
331 'section' => 'miscellaneous' |
588 'id' => 'demo_social_links', |
332 ), |
589 'label' => __( 'Social Links', 'theme-text-domain' ), |
333 array( |
590 'desc' => '<p>' . sprintf( __( 'The Social Links option type utilizes a drag & drop interface to create a list of social links. There are a few filters that make extending this option type easy. You can set the %s filter to %s and turn off loading default values. Use the %s filter to change the default values that are loaded. To filter the settings array use the %s filter.', 'theme-text-domain' ), '<code>ot_type_social_links_load_defaults</code>', '<code>false</code>', '<code>ot_type_social_links_defaults</code>', '<code>ot_social_links_settings</code>' ) . '</p>', |
334 'label' => 'Tag Checkbox', |
591 'std' => '', |
335 'id' => 'my_tag_checkbox', |
592 'type' => 'social-links', |
|
593 'section' => 'option_types', |
|
594 'rows' => '', |
|
595 'post_type' => '', |
|
596 'taxonomy' => '', |
|
597 'min_max_step'=> '', |
|
598 'class' => '', |
|
599 'condition' => '', |
|
600 'operator' => 'and' |
|
601 ), |
|
602 array( |
|
603 'id' => 'demo_spacing', |
|
604 'label' => __( 'Spacing', 'theme-text-domain' ), |
|
605 'desc' => __( 'The Spacing option type is used to set spacing values such as padding or margin in the form of top, right, bottom, and left.', 'theme-text-domain' ), |
|
606 'std' => '', |
|
607 'type' => 'spacing', |
|
608 'section' => 'option_types', |
|
609 'rows' => '', |
|
610 'post_type' => '', |
|
611 'taxonomy' => '', |
|
612 'min_max_step'=> '', |
|
613 'class' => '', |
|
614 'condition' => '', |
|
615 'operator' => 'and' |
|
616 ), |
|
617 array( |
|
618 'id' => 'demo_tag_checkbox', |
|
619 'label' => __( 'Tag Checkbox', 'theme-text-domain' ), |
|
620 'desc' => __( 'The Tag Checkbox option type displays a list of tag IDs. It allows the user to check multiple tag IDs and will return that value as an array for use in a custom function or loop.', 'theme-text-domain' ), |
|
621 'std' => '', |
336 'type' => 'tag-checkbox', |
622 'type' => 'tag-checkbox', |
337 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
623 'section' => 'option_types', |
338 'std' => '', |
624 'rows' => '', |
339 'rows' => '', |
625 'post_type' => '', |
340 'post_type' => '', |
626 'taxonomy' => '', |
341 'taxonomy' => '', |
627 'min_max_step'=> '', |
342 'class' => '', |
628 'class' => '', |
343 'section' => 'miscellaneous' |
629 'condition' => '', |
344 ), |
630 'operator' => 'and' |
345 array( |
631 ), |
346 'label' => 'Tag Select', |
632 array( |
347 'id' => 'my_tag_select', |
633 'id' => 'demo_tag_select', |
|
634 'label' => __( 'Tag Select', 'theme-text-domain' ), |
|
635 'desc' => __( 'The Tag Select option type displays a list of tag IDs. It allows the user to select only one tag ID and will return that value for use in a custom function or loop.', 'theme-text-domain' ), |
|
636 'std' => '', |
348 'type' => 'tag-select', |
637 'type' => 'tag-select', |
349 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
638 'section' => 'option_types', |
350 'std' => '', |
639 'rows' => '', |
351 'rows' => '', |
640 'post_type' => '', |
352 'post_type' => '', |
641 'taxonomy' => '', |
353 'taxonomy' => '', |
642 'min_max_step'=> '', |
354 'class' => '', |
643 'class' => '', |
355 'section' => 'miscellaneous' |
644 'condition' => '', |
356 ), |
645 'operator' => 'and' |
357 array( |
646 ), |
358 'label' => 'Taxonomy Checkbox', |
647 array( |
359 'id' => 'my_taxonomy_checkbox', |
648 'id' => 'demo_taxonomy_checkbox', |
|
649 'label' => __( 'Taxonomy Checkbox', 'theme-text-domain' ), |
|
650 'desc' => __( 'The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows the user to check multiple taxonomy IDs and will return that value as an array for use in a custom function or loop.', 'theme-text-domain' ), |
|
651 'std' => '', |
360 'type' => 'taxonomy-checkbox', |
652 'type' => 'taxonomy-checkbox', |
361 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
653 'section' => 'option_types', |
362 'std' => '', |
|
363 'rows' => '', |
654 'rows' => '', |
364 'post_type' => '', |
655 'post_type' => '', |
365 'taxonomy' => 'category,post_tag', |
656 'taxonomy' => 'category,post_tag', |
366 'class' => '', |
657 'min_max_step'=> '', |
367 'section' => 'miscellaneous' |
658 'class' => '', |
368 ), |
659 'condition' => '', |
369 array( |
660 'operator' => 'and' |
370 'label' => 'Taxonomy Select', |
661 ), |
371 'id' => 'my_taxonomy_select', |
662 array( |
|
663 'id' => 'demo_taxonomy_select', |
|
664 'label' => __( 'Taxonomy Select', 'theme-text-domain' ), |
|
665 'desc' => __( 'The Taxonomy Select option type displays a list of taxonomy IDs. It allows the user to select only one taxonomy ID and will return that value for use in a custom function or loop.', 'theme-text-domain' ), |
|
666 'std' => '', |
372 'type' => 'taxonomy-select', |
667 'type' => 'taxonomy-select', |
373 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
668 'section' => 'option_types', |
374 'std' => '', |
|
375 'rows' => '', |
669 'rows' => '', |
376 'post_type' => '', |
670 'post_type' => '', |
377 'taxonomy' => 'category,post_tag', |
671 'taxonomy' => 'category,post_tag', |
378 'class' => '', |
672 'min_max_step'=> '', |
379 'section' => 'miscellaneous' |
673 'class' => '', |
380 ), |
674 'condition' => '', |
381 array( |
675 'operator' => 'and' |
382 'label' => 'Text', |
676 ), |
383 'id' => 'my_text', |
677 array( |
|
678 'id' => 'demo_text', |
|
679 'label' => __( 'Text', 'theme-text-domain' ), |
|
680 'desc' => __( 'The Text option type is used to save string values. For example, any optional or required text that is of reasonably short character length.', 'theme-text-domain' ), |
|
681 'std' => '', |
384 'type' => 'text', |
682 'type' => 'text', |
385 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
683 'section' => 'option_types', |
386 'std' => '', |
684 'rows' => '', |
387 'rows' => '', |
685 'post_type' => '', |
388 'post_type' => '', |
686 'taxonomy' => '', |
389 'taxonomy' => '', |
687 'min_max_step'=> '', |
390 'class' => '', |
688 'class' => '', |
391 'section' => 'miscellaneous' |
689 'condition' => '', |
392 ), |
690 'operator' => 'and' |
393 array( |
691 ), |
394 'label' => 'Textarea', |
692 array( |
395 'id' => 'my_textarea', |
693 'id' => 'demo_textarea', |
|
694 'label' => __( 'Textarea', 'theme-text-domain' ), |
|
695 'desc' => sprintf( __( 'The Textarea option type is a large string value used for custom code or text in the theme and has a WYSIWYG editor that can be filtered to change the how it is displayed. For example, you can filter %s, %s, %s, and %s.', 'theme-text-domain' ), '<code>wpautop</code>', '<code>media_buttons</code>', '<code>tinymce</code>', '<code>quicktags</code>' ), |
|
696 'std' => '', |
396 'type' => 'textarea', |
697 'type' => 'textarea', |
397 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
698 'section' => 'option_types', |
398 'std' => '', |
|
399 'rows' => '15', |
699 'rows' => '15', |
400 'post_type' => '', |
700 'post_type' => '', |
401 'taxonomy' => '', |
701 'taxonomy' => '', |
402 'class' => '', |
702 'min_max_step'=> '', |
403 'section' => 'miscellaneous' |
703 'class' => '', |
404 ), |
704 'condition' => '', |
405 array( |
705 'operator' => 'and' |
406 'label' => 'Textarea Simple', |
706 ), |
407 'id' => 'my_textarea_simple', |
707 array( |
|
708 'id' => 'demo_textarea_simple', |
|
709 'label' => __( 'Textarea Simple', 'theme-text-domain' ), |
|
710 'desc' => __( 'The Textarea Simple option type is a large string value used for custom code or text in the theme. The Textarea Simple does not have a WYSIWYG editor.', 'theme-text-domain' ), |
|
711 'std' => '', |
408 'type' => 'textarea-simple', |
712 'type' => 'textarea-simple', |
409 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
713 'section' => 'option_types', |
410 'std' => '', |
|
411 'rows' => '10', |
714 'rows' => '10', |
412 'post_type' => '', |
715 'post_type' => '', |
413 'taxonomy' => '', |
716 'taxonomy' => '', |
414 'class' => '', |
717 'min_max_step'=> '', |
415 'section' => 'miscellaneous' |
718 'class' => '', |
416 ), |
719 'condition' => '', |
417 array( |
720 'operator' => 'and' |
418 'label' => 'Textblock', |
721 ), |
419 'id' => 'my_textblock', |
722 array( |
|
723 'id' => 'demo_textblock', |
|
724 'label' => __( 'Textblock', 'theme-text-domain' ), |
|
725 'desc' => __( 'The Textblock option type is used only on the Theme Option page. It will allow you to create & display HTML, but has no title above the text block. You can then use the Textblock to add a more detailed set of instruction on how the options are used in your theme. You would never use this in your themes template files as it does not save a value.', 'theme-text-domain' ), |
|
726 'std' => '', |
420 'type' => 'textblock', |
727 'type' => 'textblock', |
421 'desc' => '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', |
728 'section' => 'option_types', |
422 'std' => '', |
729 'rows' => '', |
423 'rows' => '', |
730 'post_type' => '', |
424 'post_type' => '', |
731 'taxonomy' => '', |
425 'taxonomy' => '', |
732 'min_max_step'=> '', |
426 'class' => '', |
733 'class' => '', |
427 'section' => 'miscellaneous' |
734 'condition' => '', |
428 ), |
735 'operator' => 'and' |
429 array( |
736 ), |
430 'label' => 'Textblock Titled', |
737 array( |
431 'id' => 'my_textblock_titled', |
738 'id' => 'demo_textblock_titled', |
|
739 'label' => __( 'Textblock Titled', 'theme-text-domain' ), |
|
740 'desc' => __( 'The Textblock Titled option type is used only on the Theme Option page. It will allow you to create & display HTML, and has a title above the text block. You can then use the Textblock Titled to add a more detailed set of instruction on how the options are used in your theme. You would never use this in your themes template files as it does not save a value.', 'theme-text-domain' ), |
|
741 'std' => '', |
432 'type' => 'textblock-titled', |
742 'type' => 'textblock-titled', |
433 'desc' => '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', |
743 'section' => 'option_types', |
434 'std' => '', |
744 'rows' => '', |
435 'rows' => '', |
745 'post_type' => '', |
436 'post_type' => '', |
746 'taxonomy' => '', |
437 'taxonomy' => '', |
747 'min_max_step'=> '', |
438 'class' => '', |
748 'class' => '', |
439 'section' => 'miscellaneous' |
749 'condition' => '', |
440 ), |
750 'operator' => 'and' |
441 array( |
751 ), |
442 'label' => 'Typography', |
752 array( |
443 'id' => 'my_typography', |
753 'id' => 'demo_typography', |
|
754 'label' => __( 'Typography', 'theme-text-domain' ), |
|
755 'desc' => sprintf( __( 'The Typography option type is for adding typography styles to your theme either dynamically via the CSS option type above or manually with %s. The Typography option type has filters that allow you to remove fields or change the defaults. For example, you can filter %s to remove unwanted fields from all Background options or an individual one. You can also filter %s. These filters allow you to fine tune the select lists for your specific needs.', 'theme-text-domain' ), '<code>ot_get_option()</code>', '<code>ot_recognized_typography_fields</code>', '<code>ot_recognized_font_families</code>, <code>ot_recognized_font_sizes</code>, <code>ot_recognized_font_styles</code>, <code>ot_recognized_font_variants</code>, <code>ot_recognized_font_weights</code>, <code>ot_recognized_letter_spacing</code>, <code>ot_recognized_line_heights</code>, <code>ot_recognized_text_decorations</code> ' . __( 'and', 'theme-text-domain' ) . ' <code>ot_recognized_text_transformations</code>' ), |
|
756 'std' => '', |
444 'type' => 'typography', |
757 'type' => 'typography', |
445 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
758 'section' => 'option_types', |
446 'std' => '', |
759 'rows' => '', |
447 'rows' => '', |
760 'post_type' => '', |
448 'post_type' => '', |
761 'taxonomy' => '', |
449 'taxonomy' => '', |
762 'min_max_step'=> '', |
450 'class' => '', |
763 'class' => '', |
451 'section' => 'miscellaneous' |
764 'condition' => '', |
452 ), |
765 'operator' => 'and' |
453 array( |
766 ), |
454 'label' => 'Upload', |
767 array( |
455 'id' => 'my_upload', |
768 'id' => 'demo_upload', |
|
769 'label' => __( 'Upload', 'theme-text-domain' ), |
|
770 'desc' => sprintf( __( 'The Upload option type is used to upload any WordPress supported media. After uploading, users are required to press the "%s" button in order to populate the input with the URI of that media. There is one caveat of this feature. If you import the theme options and have uploaded media on one site the old URI will not reflect the URI of your new site. You will have to re-upload or %s any media to your new server and change the URIs if necessary.', 'theme-text-domain' ), apply_filters( 'ot_upload_text', __( 'Send to OptionTree', 'theme-text-domain' ) ), 'FTP' ), |
|
771 'std' => '', |
456 'type' => 'upload', |
772 'type' => 'upload', |
457 'desc' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', |
773 'section' => 'option_types', |
458 'std' => '', |
774 'rows' => '', |
459 'rows' => '', |
775 'post_type' => '', |
460 'post_type' => '', |
776 'taxonomy' => '', |
461 'taxonomy' => '', |
777 'min_max_step'=> '', |
462 'class' => '', |
778 'class' => '', |
463 'section' => 'miscellaneous' |
779 'condition' => '', |
|
780 'operator' => 'and' |
|
781 ), |
|
782 array( |
|
783 'id' => 'demo_upload_attachment_id', |
|
784 'label' => __( 'Upload Attachment ID', 'theme-text-domain' ), |
|
785 'desc' => sprintf( __( 'The Upload option type can also be saved as an attachment ID by adding %s to the class attribute.', 'theme-text-domain' ), '<code>ot-upload-attachment-id</code>' ), |
|
786 'std' => '', |
|
787 'type' => 'upload', |
|
788 'section' => 'option_types', |
|
789 'rows' => '', |
|
790 'post_type' => '', |
|
791 'taxonomy' => '', |
|
792 'min_max_step'=> '', |
|
793 'class' => 'ot-upload-attachment-id', |
|
794 'condition' => '', |
|
795 'operator' => 'and' |
464 ) |
796 ) |
465 ) |
797 ) |
466 ); |
798 ); |
467 |
799 |
468 /* allow settings to be filtered before saving */ |
800 /* allow settings to be filtered before saving */ |
469 $custom_settings = apply_filters( 'option_tree_settings_args', $custom_settings ); |
801 $custom_settings = apply_filters( ot_settings_id() . '_args', $custom_settings ); |
470 |
802 |
471 /* settings are not the same update the DB */ |
803 /* settings are not the same update the DB */ |
472 if ( $saved_settings !== $custom_settings ) { |
804 if ( $saved_settings !== $custom_settings ) { |
473 update_option( 'option_tree_settings', $custom_settings ); |
805 update_option( ot_settings_id(), $custom_settings ); |
474 } |
806 } |
475 |
807 |
|
808 /* Lets OptionTree know the UI Builder is being overridden */ |
|
809 global $ot_has_custom_theme_options; |
|
810 $ot_has_custom_theme_options = true; |
|
811 |
476 } |
812 } |