1 <?php |
1 <?php |
2 /** |
2 /** |
3 * Initialize the custom Theme Options. |
3 * Initialize the custom Theme Options. |
|
4 * |
|
5 * @package OptionTree |
4 */ |
6 */ |
|
7 |
5 add_action( 'init', 'custom_theme_options' ); |
8 add_action( 'init', 'custom_theme_options' ); |
6 |
9 |
7 /** |
10 /** |
8 * Build the custom settings & update OptionTree. |
11 * Build the custom settings & update OptionTree. |
9 * |
12 * |
10 * @return void |
13 * @since 2.0 |
11 * @since 2.0 |
|
12 */ |
14 */ |
13 function custom_theme_options() { |
15 function custom_theme_options() { |
14 |
16 |
15 /* OptionTree is not loaded yet, or this is not an admin request */ |
17 // OptionTree is not loaded yet, or this is not an admin request. |
16 if ( ! function_exists( 'ot_settings_id' ) || ! is_admin() ) |
18 if ( ! function_exists( 'ot_settings_id' ) || ! is_admin() ) { |
17 return false; |
19 return false; |
|
20 } |
18 |
21 |
19 /** |
22 /** |
20 * Get a copy of the saved settings array. |
23 * Get a copy of the saved settings array. |
21 */ |
24 */ |
22 $saved_settings = get_option( ot_settings_id(), array() ); |
25 $saved_settings = get_option( ot_settings_id(), array() ); |
23 |
26 |
24 /** |
27 /** |
25 * Custom settings array that will eventually be |
28 * Custom settings array that will eventually be |
26 * passes to the OptionTree Settings API Class. |
29 * passes to the OptionTree Settings API Class. |
27 */ |
30 */ |
28 $custom_settings = array( |
31 $custom_settings = array( |
29 'contextual_help' => array( |
32 'contextual_help' => array( |
30 'content' => array( |
33 'content' => array( |
31 array( |
34 array( |
32 'id' => 'option_types_help', |
35 'id' => 'option_types_help', |
33 'title' => __( 'Option Types', 'theme-text-domain' ), |
36 'title' => __( 'Option Types', 'theme-text-domain' ), |
34 'content' => '<p>' . __( 'Help content goes here!', 'theme-text-domain' ) . '</p>' |
37 'content' => '<p>' . __( 'Help content goes here!', 'theme-text-domain' ) . '</p>', |
35 ) |
38 ), |
36 ), |
39 ), |
37 'sidebar' => '<p>' . __( 'Sidebar content goes here!', 'theme-text-domain' ) . '</p>' |
40 'sidebar' => '<p>' . __( 'Sidebar content goes here!', 'theme-text-domain' ) . '</p>', |
38 ), |
41 ), |
39 'sections' => array( |
42 'sections' => array( |
40 array( |
43 array( |
41 'id' => 'option_types', |
44 'id' => 'option_types', |
42 'title' => __( 'Option Types', 'theme-text-domain' ) |
45 'title' => __( 'Option Types', 'theme-text-domain' ), |
43 ) |
46 ), |
44 ), |
47 ), |
45 'settings' => array( |
48 'settings' => array( |
46 array( |
49 array( |
47 'id' => 'demo_background', |
50 'id' => 'demo_background', |
48 'label' => __( 'Background', 'theme-text-domain' ), |
51 '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>' ), |
52 '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 %1$s. The Background option type has filters that allow you to remove fields or change the defaults. For example, you can filter %2$s to remove unwanted fields from all Background options or an individual one. You can also filter %3$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' => '', |
53 'std' => '', |
51 'type' => 'background', |
54 'type' => 'background', |
52 'section' => 'option_types', |
55 'section' => 'option_types', |
53 'rows' => '', |
56 'rows' => '', |
54 'post_type' => '', |
57 'post_type' => '', |
55 'taxonomy' => '', |
58 'taxonomy' => '', |
56 'min_max_step'=> '', |
59 'min_max_step' => '', |
57 'class' => '', |
60 'class' => '', |
58 'condition' => '', |
61 'condition' => '', |
59 'operator' => 'and' |
62 'operator' => 'and', |
60 ), |
63 ), |
61 array( |
64 array( |
62 'id' => 'demo_border', |
65 'id' => 'demo_border', |
63 'label' => __( 'Border', 'theme-text-domain' ), |
66 'label' => __( 'Border', 'theme-text-domain' ), |
64 'desc' => __( 'The Border option type is used to set width, unit, style, and color values.', 'theme-text-domain' ), |
67 'desc' => __( 'The Border option type is used to set width, unit, style, and color values.', 'theme-text-domain' ), |
65 'std' => '', |
68 'std' => '', |
66 'type' => 'border', |
69 'type' => 'border', |
67 'section' => 'option_types', |
70 'section' => 'option_types', |
68 'rows' => '', |
71 'rows' => '', |
69 'post_type' => '', |
72 'post_type' => '', |
70 'taxonomy' => '', |
73 'taxonomy' => '', |
71 'min_max_step'=> '', |
74 'min_max_step' => '', |
72 'class' => '', |
75 'class' => '', |
73 'condition' => '', |
76 'condition' => '', |
74 'operator' => 'and' |
77 'operator' => 'and', |
75 ), |
78 ), |
76 array( |
79 array( |
77 'id' => 'demo_box_shadow', |
80 'id' => 'demo_box_shadow', |
78 'label' => __( 'Box Shadow', 'theme-text-domain' ), |
81 '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>' ), |
82 'desc' => sprintf( __( 'The Box Shadow option type is used to set %1$s, %2$s, %3$s, %4$s, %5$s, and %6$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' => '', |
83 'std' => '', |
81 'type' => 'box-shadow', |
84 'type' => 'box-shadow', |
82 'section' => 'option_types', |
85 'section' => 'option_types', |
83 'rows' => '', |
86 'rows' => '', |
84 'post_type' => '', |
87 'post_type' => '', |
85 'taxonomy' => '', |
88 'taxonomy' => '', |
86 'min_max_step'=> '', |
89 'min_max_step' => '', |
87 'class' => '', |
90 'class' => '', |
88 'condition' => '', |
91 'condition' => '', |
89 'operator' => 'and' |
92 'operator' => 'and', |
90 ), |
93 ), |
91 array( |
94 array( |
92 'id' => 'demo_category_checkbox', |
95 'id' => 'demo_category_checkbox', |
93 'label' => __( 'Category Checkbox', 'theme-text-domain' ), |
96 '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' ), |
97 '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' => '', |
98 'std' => '', |
96 'type' => 'category-checkbox', |
99 'type' => 'category-checkbox', |
97 'section' => 'option_types', |
100 'section' => 'option_types', |
98 'rows' => '', |
101 'rows' => '', |
99 'post_type' => '', |
102 'post_type' => '', |
100 'taxonomy' => '', |
103 'taxonomy' => '', |
101 'min_max_step'=> '', |
104 'min_max_step' => '', |
102 'class' => '', |
105 'class' => '', |
103 'condition' => '', |
106 'condition' => '', |
104 'operator' => 'and' |
107 'operator' => 'and', |
105 ), |
108 ), |
106 array( |
109 array( |
107 'id' => 'demo_category_select', |
110 'id' => 'demo_category_select', |
108 'label' => __( 'Category Select', 'theme-text-domain' ), |
111 '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' ), |
112 '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' => '', |
113 'std' => '', |
111 'type' => 'category-select', |
114 'type' => 'category-select', |
112 'section' => 'option_types', |
115 'section' => 'option_types', |
113 'rows' => '', |
116 'rows' => '', |
114 'post_type' => '', |
117 'post_type' => '', |
115 'taxonomy' => '', |
118 'taxonomy' => '', |
116 'min_max_step'=> '', |
119 'min_max_step' => '', |
117 'class' => '', |
120 'class' => '', |
118 'condition' => '', |
121 'condition' => '', |
119 'operator' => 'and' |
122 'operator' => 'and', |
120 ), |
123 ), |
121 array( |
124 array( |
122 'id' => 'demo_checkbox', |
125 'id' => 'demo_checkbox', |
123 'label' => __( 'Checkbox', 'theme-text-domain' ), |
126 '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' ), |
127 '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' => '', |
128 'std' => '', |
126 'type' => 'checkbox', |
129 'type' => 'checkbox', |
127 'section' => 'option_types', |
130 'section' => 'option_types', |
128 'rows' => '', |
131 'rows' => '', |
129 'post_type' => '', |
132 'post_type' => '', |
130 'taxonomy' => '', |
133 'taxonomy' => '', |
131 'min_max_step'=> '', |
134 'min_max_step' => '', |
132 'class' => '', |
135 'class' => '', |
133 'condition' => '', |
136 'condition' => '', |
134 'operator' => 'and', |
137 'operator' => 'and', |
135 'choices' => array( |
138 'choices' => array( |
136 array( |
139 array( |
137 'value' => 'no', |
140 'value' => 'no', |
138 'label' => __( 'No', 'theme-text-domain' ), |
141 'label' => __( 'No', 'theme-text-domain' ), |
139 'src' => '' |
142 'src' => '', |
140 ), |
143 ), |
141 array( |
144 array( |
142 'value' => 'Yes', |
145 'value' => 'Yes', |
143 'label' => __( 'Yes', 'theme-text-domain' ), |
146 'label' => __( 'Yes', 'theme-text-domain' ), |
144 'src' => '' |
147 'src' => '', |
145 ) |
148 ), |
146 ) |
149 ), |
147 ), |
150 ), |
148 array( |
151 array( |
149 'id' => 'demo_colorpicker', |
152 'id' => 'demo_colorpicker', |
150 'label' => __( 'Colorpicker', 'theme-text-domain' ), |
153 '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' ), |
154 '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' => '', |
155 'std' => '', |
153 'type' => 'colorpicker', |
156 'type' => 'colorpicker', |
154 'section' => 'option_types', |
157 'section' => 'option_types', |
155 'rows' => '', |
158 'rows' => '', |
156 'post_type' => '', |
159 'post_type' => '', |
157 'taxonomy' => '', |
160 'taxonomy' => '', |
158 'min_max_step'=> '', |
161 'min_max_step' => '', |
159 'class' => '', |
162 'class' => '', |
160 'condition' => '', |
163 'condition' => '', |
161 'operator' => 'and' |
164 'operator' => 'and', |
162 ), |
165 ), |
163 array( |
166 array( |
164 'id' => 'demo_colorpicker_opacity', |
167 'id' => 'demo_colorpicker_opacity', |
165 'label' => __( 'Colorpicker Opacity', 'theme-text-domain' ), |
168 'label' => __( 'Colorpicker Opacity', 'theme-text-domain' ), |
166 'desc' => __( 'Colorpicker Opacity', 'option-tree-theme' ), |
169 '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>' ), |
170 'desc' => sprintf( __( 'The Colorpicker Opacity option type saves an rgba color value for use in CSS. To add opacity to other colorpickers add the %1$s class to the %2$s array.', 'option-tree' ), '<code>ot-colorpicker-opacity</code>', '<code>$args</code>' ), |
168 'std' => '', |
171 'std' => '', |
169 'type' => 'colorpicker-opacity', |
172 'type' => 'colorpicker-opacity', |
170 'section' => 'option_types', |
173 'section' => 'option_types', |
171 'rows' => '', |
174 'rows' => '', |
172 'post_type' => '', |
175 'post_type' => '', |
173 'taxonomy' => '', |
176 'taxonomy' => '', |
174 'min_max_step'=> '', |
177 'min_max_step' => '', |
175 'class' => '', |
178 'class' => '', |
176 'condition' => '', |
179 'condition' => '', |
177 'operator' => 'and' |
180 'operator' => 'and', |
178 ), |
181 ), |
179 array( |
182 array( |
180 'id' => 'demo_css', |
183 'id' => 'demo_css', |
181 'label' => __( 'CSS', 'theme-text-domain' ), |
184 '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>', |
185 '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 %1$s at the root level of your theme and change permissions using %2$s so the server can write to the file. I have had the most success setting this single file to %3$s but feel free to play around with permissions until everything is working. A good starting point is %4$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 { |
186 'std' => '#custom { |
184 {{demo_background}} |
187 {{demo_background}} |
185 }', |
188 }', |
186 'type' => 'css', |
189 'type' => 'css', |
187 'section' => 'option_types', |
190 'section' => 'option_types', |
188 'rows' => '20', |
191 'rows' => '20', |
189 'post_type' => '', |
192 'post_type' => '', |
190 'taxonomy' => '', |
193 'taxonomy' => '', |
191 'min_max_step'=> '', |
194 'min_max_step' => '', |
192 'class' => '', |
195 'class' => '', |
193 'condition' => '', |
196 'condition' => '', |
194 'operator' => 'and' |
197 'operator' => 'and', |
195 ), |
198 ), |
196 array( |
199 array( |
197 'id' => 'demo_custom_post_type_checkbox', |
200 'id' => 'demo_custom_post_type_checkbox', |
198 'label' => __( 'Custom Post Type Checkbox', 'theme-text-domain' ), |
201 '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>' ), |
202 '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' => '', |
203 'std' => '', |
201 'type' => 'custom-post-type-checkbox', |
204 'type' => 'custom-post-type-checkbox', |
202 'section' => 'option_types', |
205 'section' => 'option_types', |
203 'rows' => '', |
206 'rows' => '', |
204 'post_type' => 'post', |
207 'post_type' => 'post', |
205 'taxonomy' => '', |
208 'taxonomy' => '', |
206 'min_max_step'=> '', |
209 'min_max_step' => '', |
207 'class' => '', |
210 'class' => '', |
208 'condition' => '', |
211 'condition' => '', |
209 'operator' => 'and' |
212 'operator' => 'and', |
210 ), |
213 ), |
211 array( |
214 array( |
212 'id' => 'demo_custom_post_type_select', |
215 'id' => 'demo_custom_post_type_select', |
213 'label' => __( 'Custom Post Type Select', 'theme-text-domain' ), |
216 '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>' ), |
217 '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' => '', |
218 'std' => '', |
216 'type' => 'custom-post-type-select', |
219 'type' => 'custom-post-type-select', |
217 'section' => 'option_types', |
220 'section' => 'option_types', |
218 'rows' => '', |
221 'rows' => '', |
219 'post_type' => 'post', |
222 'post_type' => 'post', |
220 'taxonomy' => '', |
223 'taxonomy' => '', |
221 'min_max_step'=> '', |
224 'min_max_step' => '', |
222 'class' => '', |
225 'class' => '', |
223 'condition' => '', |
226 'condition' => '', |
224 'operator' => 'and' |
227 'operator' => 'and', |
225 ), |
228 ), |
226 array( |
229 array( |
227 'id' => 'demo_date_picker', |
230 'id' => 'demo_date_picker', |
228 'label' => __( 'Date Picker', 'theme-text-domain' ), |
231 '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' ), |
232 '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' => '', |
233 'std' => '', |
231 'type' => 'date-picker', |
234 'type' => 'date-picker', |
232 'section' => 'option_types', |
235 'section' => 'option_types', |
233 'rows' => '', |
236 'rows' => '', |
234 'post_type' => '', |
237 'post_type' => '', |
235 'taxonomy' => '', |
238 'taxonomy' => '', |
236 'min_max_step'=> '', |
239 'min_max_step' => '', |
237 'class' => '', |
240 'class' => '', |
238 'condition' => '', |
241 'condition' => '', |
239 'operator' => 'and' |
242 'operator' => 'and', |
240 ), |
243 ), |
241 array( |
244 array( |
242 'id' => 'demo_date_time_picker', |
245 'id' => 'demo_date_time_picker', |
243 'label' => __( 'Date Time Picker', 'theme-text-domain' ), |
246 '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' ), |
247 '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' => '', |
248 'std' => '', |
246 'type' => 'date-time-picker', |
249 'type' => 'date-time-picker', |
247 'section' => 'option_types', |
250 'section' => 'option_types', |
248 'rows' => '', |
251 'rows' => '', |
249 'post_type' => '', |
252 'post_type' => '', |
250 'taxonomy' => '', |
253 'taxonomy' => '', |
251 'min_max_step'=> '', |
254 'min_max_step' => '', |
252 'class' => '', |
255 'class' => '', |
253 'condition' => '', |
256 'condition' => '', |
254 'operator' => 'and' |
257 'operator' => 'and', |
255 ), |
258 ), |
256 array( |
259 array( |
257 'id' => 'demo_dimension', |
260 'id' => 'demo_dimension', |
258 'label' => __( 'Dimension', 'theme-text-domain' ), |
261 'label' => __( 'Dimension', 'theme-text-domain' ), |
259 'desc' => __( 'The Dimension option type is used to set width and height values.', 'theme-text-domain' ), |
262 'desc' => __( 'The Dimension option type is used to set width and height values.', 'theme-text-domain' ), |
260 'std' => '', |
263 'std' => '', |
261 'type' => 'dimension', |
264 'type' => 'dimension', |
262 'section' => 'option_types', |
265 'section' => 'option_types', |
263 'rows' => '', |
266 'rows' => '', |
264 'post_type' => '', |
267 'post_type' => '', |
265 'taxonomy' => '', |
268 'taxonomy' => '', |
266 'min_max_step'=> '', |
269 'min_max_step' => '', |
267 'class' => '', |
270 'class' => '', |
268 'condition' => '', |
271 'condition' => '', |
269 'operator' => 'and' |
272 'operator' => 'and', |
270 ), |
273 ), |
271 array( |
274 array( |
272 'id' => 'demo_gallery', |
275 'id' => 'demo_gallery', |
273 'label' => __( 'Gallery', 'theme-text-domain' ), |
276 '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' ), |
277 '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' => '', |
278 'std' => '', |
276 'type' => 'gallery', |
279 'type' => 'gallery', |
277 'section' => 'option_types', |
280 'section' => 'option_types', |
278 'rows' => '', |
281 'rows' => '', |
279 'post_type' => '', |
282 'post_type' => '', |
280 'taxonomy' => '', |
283 'taxonomy' => '', |
281 'min_max_step'=> '', |
284 'min_max_step' => '', |
282 'class' => '', |
285 'class' => '', |
283 'condition' => '', |
286 'condition' => '', |
284 'operator' => 'and' |
287 'operator' => 'and', |
285 ), |
288 ), |
286 array( |
289 array( |
287 'id' => 'demo_gallery_shortcode', |
290 'id' => 'demo_gallery_shortcode', |
288 'label' => __( 'Gallery Shortcode', 'theme-text-domain' ), |
291 '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>' ), |
292 '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' => '', |
293 'std' => '', |
291 'type' => 'gallery', |
294 'type' => 'gallery', |
292 'section' => 'option_types', |
295 'section' => 'option_types', |
293 'rows' => '', |
296 'rows' => '', |
294 'post_type' => '', |
297 'post_type' => '', |
295 'taxonomy' => '', |
298 'taxonomy' => '', |
296 'min_max_step'=> '', |
299 'min_max_step' => '', |
297 'class' => 'ot-gallery-shortcode', |
300 'class' => 'ot-gallery-shortcode', |
298 'condition' => '', |
301 'condition' => '', |
299 'operator' => 'and' |
302 'operator' => 'and', |
300 ), |
303 ), |
301 array( |
304 array( |
302 'id' => 'demo_google_fonts', |
305 'id' => 'demo_google_fonts', |
303 'label' => __( 'Google Fonts', 'theme-text-domain' ), |
306 '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>' ), |
307 '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( |
308 'std' => array( |
306 array( |
309 array( |
307 'family' => 'opensans', |
310 'family' => 'opensans', |
308 'variants' => array( '300', '300italic', 'regular', 'italic', '600', '600italic' ), |
311 'variants' => array( '300', '300italic', 'regular', 'italic', '600', '600italic' ), |
309 'subsets' => array( 'latin' ) |
312 'subsets' => array( 'latin' ), |
310 ) |
313 ), |
311 ), |
314 ), |
312 'type' => 'google-fonts', |
315 'type' => 'google-fonts', |
313 'section' => 'option_types', |
316 'section' => 'option_types', |
314 'rows' => '', |
317 'rows' => '', |
315 'post_type' => '', |
318 'post_type' => '', |
316 'taxonomy' => '', |
319 'taxonomy' => '', |
317 'min_max_step'=> '', |
320 'min_max_step' => '', |
318 'class' => '', |
321 'class' => '', |
319 'condition' => '', |
322 'condition' => '', |
320 'operator' => 'and' |
323 'operator' => 'and', |
321 ), |
324 ), |
322 array( |
325 array( |
323 'id' => 'demo_javascript', |
326 'id' => 'demo_javascript', |
324 'label' => __( 'JavaScript', 'theme-text-domain' ), |
327 'label' => __( 'JavaScript', 'theme-text-domain' ), |
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>', |
328 '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>', |
326 'std' => '', |
329 'std' => '', |
327 'type' => 'javascript', |
330 'type' => 'javascript', |
328 'section' => 'option_types', |
331 'section' => 'option_types', |
329 'rows' => '20', |
332 'rows' => '20', |
330 'post_type' => '', |
333 'post_type' => '', |
331 'taxonomy' => '', |
334 'taxonomy' => '', |
332 'min_max_step'=> '', |
335 'min_max_step' => '', |
333 'class' => '', |
336 'class' => '', |
334 'condition' => '', |
337 'condition' => '', |
335 'operator' => 'and' |
338 'operator' => 'and', |
336 ), |
339 ), |
337 array( |
340 array( |
338 'id' => 'demo_link_color', |
341 'id' => 'demo_link_color', |
339 'label' => __( 'Link Color', 'theme-text-domain' ), |
342 'label' => __( 'Link Color', 'theme-text-domain' ), |
340 'desc' => __( 'The Link Color option type is used to set all link color states.', 'theme-text-domain' ), |
343 'desc' => __( 'The Link Color option type is used to set all link color states.', 'theme-text-domain' ), |
341 'std' => '', |
344 'std' => '', |
342 'type' => 'link-color', |
345 'type' => 'link-color', |
343 'section' => 'option_types', |
346 'section' => 'option_types', |
344 'rows' => '', |
347 'rows' => '', |
345 'post_type' => '', |
348 'post_type' => '', |
346 'taxonomy' => '', |
349 'taxonomy' => '', |
347 'min_max_step'=> '', |
350 'min_max_step' => '', |
348 'class' => '', |
351 'class' => '', |
349 'condition' => '', |
352 'condition' => '', |
350 'operator' => 'and' |
353 'operator' => 'and', |
351 ), |
354 ), |
352 array( |
355 array( |
353 'id' => 'demo_list_item', |
356 'id' => 'demo_list_item', |
354 'label' => __( 'List Item', 'theme-text-domain' ), |
357 'label' => __( 'List Item', 'theme-text-domain' ), |
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' ), |
358 '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' ), |
356 'std' => '', |
359 'std' => '', |
357 'type' => 'list-item', |
360 'type' => 'list-item', |
358 'section' => 'option_types', |
361 'section' => 'option_types', |
359 'rows' => '', |
362 'rows' => '', |
360 'post_type' => '', |
363 'post_type' => '', |
361 'taxonomy' => '', |
364 'taxonomy' => '', |
362 'min_max_step'=> '', |
365 'min_max_step' => '', |
363 'class' => '', |
366 'class' => '', |
364 'condition' => '', |
367 'condition' => '', |
365 'operator' => 'and', |
368 'operator' => 'and', |
366 'settings' => array( |
369 'settings' => array( |
367 array( |
370 array( |
368 'id' => 'demo_list_item_content', |
371 'id' => 'demo_list_item_content', |
369 'label' => __( 'Content', 'theme-text-domain' ), |
372 'label' => __( 'Content', 'theme-text-domain' ), |
370 'desc' => '', |
373 'desc' => '', |
371 'std' => '', |
374 'std' => '', |
372 'type' => 'textarea-simple', |
375 'type' => 'textarea-simple', |
373 'rows' => '10', |
376 'rows' => '10', |
374 'post_type' => '', |
377 'post_type' => '', |
375 'taxonomy' => '', |
378 'taxonomy' => '', |
376 'min_max_step'=> '', |
379 'min_max_step' => '', |
377 'class' => '', |
380 'class' => '', |
378 'condition' => '', |
381 'condition' => '', |
379 'operator' => 'and' |
382 'operator' => 'and', |
380 ) |
383 ), |
381 ) |
384 ), |
382 ), |
385 ), |
383 array( |
386 array( |
384 'id' => 'demo_measurement', |
387 'id' => 'demo_measurement', |
385 'label' => __( 'Measurement', 'theme-text-domain' ), |
388 'label' => __( 'Measurement', 'theme-text-domain' ), |
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>' ), |
389 '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 %1$s, %2$s, %3$s, and %4$s. However, you can change them with the %5$s filter.', 'theme-text-domain' ), '<code>px</code>', '<code>%</code>', '<code>em</code>', '<code>pt</code>', '<code>ot_measurement_unit_types</code>' ), |
387 'std' => '', |
390 'std' => '', |
388 'type' => 'measurement', |
391 'type' => 'measurement', |
389 'section' => 'option_types', |
392 'section' => 'option_types', |
390 'rows' => '', |
393 'rows' => '', |
391 'post_type' => '', |
394 'post_type' => '', |
392 'taxonomy' => '', |
395 'taxonomy' => '', |
393 'min_max_step'=> '', |
396 'min_max_step' => '', |
394 'class' => '', |
397 'class' => '', |
395 'condition' => '', |
398 'condition' => '', |
396 'operator' => 'and' |
399 'operator' => 'and', |
397 ), |
400 ), |
398 array( |
401 array( |
399 'id' => 'demo_numeric_slider', |
402 'id' => 'demo_numeric_slider', |
400 'label' => __( 'Numeric Slider', 'theme-text-domain' ), |
403 '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' ), |
404 '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' => '', |
405 'std' => '', |
403 'type' => 'numeric-slider', |
406 'type' => 'numeric-slider', |
404 'section' => 'option_types', |
407 'section' => 'option_types', |
405 'rows' => '', |
408 'rows' => '', |
406 'post_type' => '', |
409 'post_type' => '', |
407 'taxonomy' => '', |
410 'taxonomy' => '', |
408 'min_max_step'=> '-500,5000,100', |
411 'min_max_step' => '-500,5000,100', |
409 'class' => '', |
412 'class' => '', |
410 'condition' => '', |
413 'condition' => '', |
411 'operator' => 'and' |
414 'operator' => 'and', |
412 ), |
415 ), |
413 array( |
416 array( |
414 'id' => 'demo_on_off', |
417 'id' => 'demo_on_off', |
415 'label' => __( 'On/Off', 'theme-text-domain' ), |
418 '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>' ), |
419 '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 %1$s or %2$s.', 'theme-text-domain' ), '<code>on</code>', '<code>off</code>' ), |
417 'std' => '', |
420 'std' => '', |
418 'type' => 'on-off', |
421 'type' => 'on-off', |
419 'section' => 'option_types', |
422 'section' => 'option_types', |
420 'rows' => '', |
423 'rows' => '', |
421 'post_type' => '', |
424 'post_type' => '', |
422 'taxonomy' => '', |
425 'taxonomy' => '', |
423 'min_max_step'=> '', |
426 'min_max_step' => '', |
424 'class' => '', |
427 'class' => '', |
425 'condition' => '', |
428 'condition' => '', |
426 'operator' => 'and' |
429 'operator' => 'and', |
427 ), |
430 ), |
428 array( |
431 array( |
429 'id' => 'demo_page_checkbox', |
432 'id' => 'demo_page_checkbox', |
430 'label' => __( 'Page Checkbox', 'theme-text-domain' ), |
433 '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' ), |
434 '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' => '', |
435 'std' => '', |
433 'type' => 'page-checkbox', |
436 'type' => 'page-checkbox', |
434 'section' => 'option_types', |
437 'section' => 'option_types', |
435 'rows' => '', |
438 'rows' => '', |
436 'post_type' => '', |
439 'post_type' => '', |
437 'taxonomy' => '', |
440 'taxonomy' => '', |
438 'min_max_step'=> '', |
441 'min_max_step' => '', |
439 'class' => '', |
442 'class' => '', |
440 'condition' => '', |
443 'condition' => '', |
441 'operator' => 'and' |
444 'operator' => 'and', |
442 ), |
445 ), |
443 array( |
446 array( |
444 'id' => 'demo_page_select', |
447 'id' => 'demo_page_select', |
445 'label' => __( 'Page Select', 'theme-text-domain' ), |
448 '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' ), |
449 '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' => '', |
450 'std' => '', |
448 'type' => 'page-select', |
451 'type' => 'page-select', |
449 'section' => 'option_types', |
452 'section' => 'option_types', |
450 'rows' => '', |
453 'rows' => '', |
451 'post_type' => '', |
454 'post_type' => '', |
452 'taxonomy' => '', |
455 'taxonomy' => '', |
453 'min_max_step'=> '', |
456 'min_max_step' => '', |
454 'class' => '', |
457 'class' => '', |
455 'condition' => '', |
458 'condition' => '', |
456 'operator' => 'and' |
459 'operator' => 'and', |
457 ), |
460 ), |
458 array( |
461 array( |
459 'id' => 'demo_post_checkbox', |
462 'id' => 'demo_post_checkbox', |
460 'label' => __( 'Post Checkbox', 'theme-text-domain' ), |
463 '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' ), |
464 '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' => '', |
465 'std' => '', |
463 'type' => 'post-checkbox', |
466 'type' => 'post-checkbox', |
464 'section' => 'option_types', |
467 'section' => 'option_types', |
465 'rows' => '', |
468 'rows' => '', |
466 'post_type' => '', |
469 'post_type' => '', |
467 'taxonomy' => '', |
470 'taxonomy' => '', |
468 'min_max_step'=> '', |
471 'min_max_step' => '', |
469 'class' => '', |
472 'class' => '', |
470 'condition' => '', |
473 'condition' => '', |
471 'operator' => 'and' |
474 'operator' => 'and', |
472 ), |
475 ), |
473 array( |
476 array( |
474 'id' => 'demo_post_select', |
477 'id' => 'demo_post_select', |
475 'label' => __( 'Post Select', 'theme-text-domain' ), |
478 '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' ), |
479 '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' => '', |
480 'std' => '', |
478 'type' => 'post-select', |
481 'type' => 'post-select', |
479 'section' => 'option_types', |
482 'section' => 'option_types', |
480 'rows' => '', |
483 'rows' => '', |
481 'post_type' => '', |
484 'post_type' => '', |
482 'taxonomy' => '', |
485 'taxonomy' => '', |
483 'min_max_step'=> '', |
486 'min_max_step' => '', |
484 'class' => '', |
487 'class' => '', |
485 'condition' => '', |
488 'condition' => '', |
486 'operator' => 'and' |
489 'operator' => 'and', |
487 ), |
490 ), |
488 array( |
491 array( |
489 'id' => 'demo_radio', |
492 'id' => 'demo_radio', |
490 'label' => __( 'Radio', 'theme-text-domain' ), |
493 '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' ), |
494 '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' => '', |
495 'std' => '', |
493 'type' => 'radio', |
496 'type' => 'radio', |
494 'section' => 'option_types', |
497 'section' => 'option_types', |
495 'rows' => '', |
498 'rows' => '', |
496 'post_type' => '', |
499 'post_type' => '', |
497 'taxonomy' => '', |
500 'taxonomy' => '', |
498 'min_max_step'=> '', |
501 'min_max_step' => '', |
499 'class' => '', |
502 'class' => '', |
500 'condition' => '', |
503 'condition' => '', |
501 'operator' => 'and', |
504 'operator' => 'and', |
502 'choices' => array( |
505 'choices' => array( |
503 array( |
506 array( |
504 'value' => 'yes', |
507 'value' => 'yes', |
505 'label' => __( 'Yes', 'theme-text-domain' ), |
508 'label' => __( 'Yes', 'theme-text-domain' ), |
506 'src' => '' |
509 'src' => '', |
507 ), |
510 ), |
508 array( |
511 array( |
509 'value' => 'no', |
512 'value' => 'no', |
510 'label' => __( 'No', 'theme-text-domain' ), |
513 'label' => __( 'No', 'theme-text-domain' ), |
511 'src' => '' |
514 'src' => '', |
512 ), |
515 ), |
513 array( |
516 array( |
514 'value' => 'maybe', |
517 'value' => 'maybe', |
515 'label' => __( 'Maybe', 'theme-text-domain' ), |
518 'label' => __( 'Maybe', 'theme-text-domain' ), |
516 'src' => '' |
519 'src' => '', |
517 ) |
520 ), |
518 ) |
521 ), |
519 ), |
522 ), |
520 array( |
523 array( |
521 'id' => 'demo_radio_image', |
524 'id' => 'demo_radio_image', |
522 'label' => __( 'Radio Image', 'theme-text-domain' ), |
525 'label' => __( 'Radio Image', 'theme-text-domain' ), |
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>' ), |
526 '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>' ), |
524 'std' => 'right-sidebar', |
527 'std' => 'right-sidebar', |
525 'type' => 'radio-image', |
528 'type' => 'radio-image', |
526 'section' => 'option_types', |
529 'section' => 'option_types', |
527 'rows' => '', |
530 'rows' => '', |
528 'post_type' => '', |
531 'post_type' => '', |
529 'taxonomy' => '', |
532 'taxonomy' => '', |
530 'min_max_step'=> '', |
533 'min_max_step' => '', |
531 'class' => '', |
534 'class' => '', |
532 'condition' => '', |
535 'condition' => '', |
533 'operator' => 'and' |
536 'operator' => 'and', |
534 ), |
537 ), |
535 array( |
538 array( |
536 'id' => 'demo_select', |
539 'id' => 'demo_select', |
537 'label' => __( 'Select', 'theme-text-domain' ), |
540 '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' ), |
541 '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' => '', |
542 'std' => '', |
540 'type' => 'select', |
543 'type' => 'select', |
541 'section' => 'option_types', |
544 'section' => 'option_types', |
542 'rows' => '', |
545 'rows' => '', |
543 'post_type' => '', |
546 'post_type' => '', |
544 'taxonomy' => '', |
547 'taxonomy' => '', |
545 'min_max_step'=> '', |
548 'min_max_step' => '', |
546 'class' => '', |
549 'class' => '', |
547 'condition' => '', |
550 'condition' => '', |
548 'operator' => 'and', |
551 'operator' => 'and', |
549 'choices' => array( |
552 'choices' => array( |
550 array( |
553 array( |
551 'value' => '', |
554 'value' => '', |
552 'label' => __( '-- Choose One --', 'theme-text-domain' ), |
555 'label' => __( '-- Choose One --', 'theme-text-domain' ), |
553 'src' => '' |
556 'src' => '', |
554 ), |
557 ), |
555 array( |
558 array( |
556 'value' => 'yes', |
559 'value' => 'yes', |
557 'label' => __( 'Yes', 'theme-text-domain' ), |
560 'label' => __( 'Yes', 'theme-text-domain' ), |
558 'src' => '' |
561 'src' => '', |
559 ), |
562 ), |
560 array( |
563 array( |
561 'value' => 'no', |
564 'value' => 'no', |
562 'label' => __( 'No', 'theme-text-domain' ), |
565 'label' => __( 'No', 'theme-text-domain' ), |
563 'src' => '' |
566 'src' => '', |
564 ), |
567 ), |
565 array( |
568 array( |
566 'value' => 'maybe', |
569 'value' => 'maybe', |
567 'label' => __( 'Maybe', 'theme-text-domain' ), |
570 'label' => __( 'Maybe', 'theme-text-domain' ), |
568 'src' => '' |
571 'src' => '', |
569 ) |
572 ), |
570 ) |
573 ), |
571 ), |
574 ), |
572 array( |
575 array( |
573 'id' => 'demo_sidebar_select', |
576 'id' => 'demo_sidebar_select', |
574 'label' => __( 'Sidebar Select', 'theme-text-domain' ), |
577 'label' => __( 'Sidebar Select', 'theme-text-domain' ), |
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>', |
578 '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, %1$s, and %2$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>', |
576 'std' => '', |
579 'std' => '', |
577 'type' => 'sidebar-select', |
580 'type' => 'sidebar-select', |
578 'section' => 'option_types', |
581 'section' => 'option_types', |
579 'rows' => '', |
582 'rows' => '', |
580 'post_type' => '', |
583 'post_type' => '', |
581 'taxonomy' => '', |
584 'taxonomy' => '', |
582 'min_max_step'=> '', |
585 'min_max_step' => '', |
583 'class' => '', |
586 'class' => '', |
584 'condition' => '', |
587 'condition' => '', |
585 'operator' => 'and' |
588 'operator' => 'and', |
586 ), |
589 ), |
587 array( |
590 array( |
588 'id' => 'demo_social_links', |
591 'id' => 'demo_social_links', |
589 'label' => __( 'Social Links', 'theme-text-domain' ), |
592 'label' => __( 'Social Links', 'theme-text-domain' ), |
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>', |
593 '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 %1$s filter to %2$s and turn off loading default values. Use the %3$s filter to change the default values that are loaded. To filter the settings array use the %4$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>', |
591 'std' => '', |
594 'std' => '', |
592 'type' => 'social-links', |
595 'type' => 'social-links', |
593 'section' => 'option_types', |
596 'section' => 'option_types', |
594 'rows' => '', |
597 'rows' => '', |
595 'post_type' => '', |
598 'post_type' => '', |
596 'taxonomy' => '', |
599 'taxonomy' => '', |
597 'min_max_step'=> '', |
600 'min_max_step' => '', |
598 'class' => '', |
601 'class' => '', |
599 'condition' => '', |
602 'condition' => '', |
600 'operator' => 'and' |
603 'operator' => 'and', |
601 ), |
604 ), |
602 array( |
605 array( |
603 'id' => 'demo_spacing', |
606 'id' => 'demo_spacing', |
604 'label' => __( 'Spacing', 'theme-text-domain' ), |
607 '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' ), |
608 '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' => '', |
609 'std' => '', |
607 'type' => 'spacing', |
610 'type' => 'spacing', |
608 'section' => 'option_types', |
611 'section' => 'option_types', |
609 'rows' => '', |
612 'rows' => '', |
610 'post_type' => '', |
613 'post_type' => '', |
611 'taxonomy' => '', |
614 'taxonomy' => '', |
612 'min_max_step'=> '', |
615 'min_max_step' => '', |
613 'class' => '', |
616 'class' => '', |
614 'condition' => '', |
617 'condition' => '', |
615 'operator' => 'and' |
618 'operator' => 'and', |
616 ), |
619 ), |
617 array( |
620 array( |
618 'id' => 'demo_tag_checkbox', |
621 'id' => 'demo_tag_checkbox', |
619 'label' => __( 'Tag Checkbox', 'theme-text-domain' ), |
622 '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' ), |
623 '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' => '', |
624 'std' => '', |
622 'type' => 'tag-checkbox', |
625 'type' => 'tag-checkbox', |
623 'section' => 'option_types', |
626 'section' => 'option_types', |
624 'rows' => '', |
627 'rows' => '', |
625 'post_type' => '', |
628 'post_type' => '', |
626 'taxonomy' => '', |
629 'taxonomy' => '', |
627 'min_max_step'=> '', |
630 'min_max_step' => '', |
628 'class' => '', |
631 'class' => '', |
629 'condition' => '', |
632 'condition' => '', |
630 'operator' => 'and' |
633 'operator' => 'and', |
631 ), |
634 ), |
632 array( |
635 array( |
633 'id' => 'demo_tag_select', |
636 'id' => 'demo_tag_select', |
634 'label' => __( 'Tag Select', 'theme-text-domain' ), |
637 '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' ), |
638 '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' => '', |
639 'std' => '', |
637 'type' => 'tag-select', |
640 'type' => 'tag-select', |
638 'section' => 'option_types', |
641 'section' => 'option_types', |
639 'rows' => '', |
642 'rows' => '', |
640 'post_type' => '', |
643 'post_type' => '', |
641 'taxonomy' => '', |
644 'taxonomy' => '', |
642 'min_max_step'=> '', |
645 'min_max_step' => '', |
643 'class' => '', |
646 'class' => '', |
644 'condition' => '', |
647 'condition' => '', |
645 'operator' => 'and' |
648 'operator' => 'and', |
646 ), |
649 ), |
647 array( |
650 array( |
648 'id' => 'demo_taxonomy_checkbox', |
651 'id' => 'demo_taxonomy_checkbox', |
649 'label' => __( 'Taxonomy Checkbox', 'theme-text-domain' ), |
652 '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' ), |
653 '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' => '', |
654 'std' => '', |
652 'type' => 'taxonomy-checkbox', |
655 'type' => 'taxonomy-checkbox', |
653 'section' => 'option_types', |
656 'section' => 'option_types', |
654 'rows' => '', |
657 'rows' => '', |
655 'post_type' => '', |
658 'post_type' => '', |
656 'taxonomy' => 'category,post_tag', |
659 'taxonomy' => 'category,post_tag', |
657 'min_max_step'=> '', |
660 'min_max_step' => '', |
658 'class' => '', |
661 'class' => '', |
659 'condition' => '', |
662 'condition' => '', |
660 'operator' => 'and' |
663 'operator' => 'and', |
661 ), |
664 ), |
662 array( |
665 array( |
663 'id' => 'demo_taxonomy_select', |
666 'id' => 'demo_taxonomy_select', |
664 'label' => __( 'Taxonomy Select', 'theme-text-domain' ), |
667 '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' ), |
668 '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' => '', |
669 'std' => '', |
667 'type' => 'taxonomy-select', |
670 'type' => 'taxonomy-select', |
668 'section' => 'option_types', |
671 'section' => 'option_types', |
669 'rows' => '', |
672 'rows' => '', |
670 'post_type' => '', |
673 'post_type' => '', |
671 'taxonomy' => 'category,post_tag', |
674 'taxonomy' => 'category,post_tag', |
672 'min_max_step'=> '', |
675 'min_max_step' => '', |
673 'class' => '', |
676 'class' => '', |
674 'condition' => '', |
677 'condition' => '', |
675 'operator' => 'and' |
678 'operator' => 'and', |
676 ), |
679 ), |
677 array( |
680 array( |
678 'id' => 'demo_text', |
681 'id' => 'demo_text', |
679 'label' => __( 'Text', 'theme-text-domain' ), |
682 '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' ), |
683 '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' => '', |
684 'std' => '', |
682 'type' => 'text', |
685 'type' => 'text', |
683 'section' => 'option_types', |
686 'section' => 'option_types', |
684 'rows' => '', |
687 'rows' => '', |
685 'post_type' => '', |
688 'post_type' => '', |
686 'taxonomy' => '', |
689 'taxonomy' => '', |
687 'min_max_step'=> '', |
690 'min_max_step' => '', |
688 'class' => '', |
691 'class' => '', |
689 'condition' => '', |
692 'condition' => '', |
690 'operator' => 'and' |
693 'operator' => 'and', |
691 ), |
694 ), |
692 array( |
695 array( |
693 'id' => 'demo_textarea', |
696 'id' => 'demo_textarea', |
694 'label' => __( 'Textarea', 'theme-text-domain' ), |
697 '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>' ), |
698 '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 %1$s, %2$s, %3$s, and %4$s.', 'theme-text-domain' ), '<code>wpautop</code>', '<code>media_buttons</code>', '<code>tinymce</code>', '<code>quicktags</code>' ), |
696 'std' => '', |
699 'std' => '', |
697 'type' => 'textarea', |
700 'type' => 'textarea', |
698 'section' => 'option_types', |
701 'section' => 'option_types', |
699 'rows' => '15', |
702 'rows' => '15', |
700 'post_type' => '', |
703 'post_type' => '', |
701 'taxonomy' => '', |
704 'taxonomy' => '', |
702 'min_max_step'=> '', |
705 'min_max_step' => '', |
703 'class' => '', |
706 'class' => '', |
704 'condition' => '', |
707 'condition' => '', |
705 'operator' => 'and' |
708 'operator' => 'and', |
706 ), |
709 ), |
707 array( |
710 array( |
708 'id' => 'demo_textarea_simple', |
711 'id' => 'demo_textarea_simple', |
709 'label' => __( 'Textarea Simple', 'theme-text-domain' ), |
712 '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' ), |
713 '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' => '', |
714 'std' => '', |
712 'type' => 'textarea-simple', |
715 'type' => 'textarea-simple', |
713 'section' => 'option_types', |
716 'section' => 'option_types', |
714 'rows' => '10', |
717 'rows' => '10', |
715 'post_type' => '', |
718 'post_type' => '', |
716 'taxonomy' => '', |
719 'taxonomy' => '', |
717 'min_max_step'=> '', |
720 'min_max_step' => '', |
718 'class' => '', |
721 'class' => '', |
719 'condition' => '', |
722 'condition' => '', |
720 'operator' => 'and' |
723 'operator' => 'and', |
721 ), |
724 ), |
722 array( |
725 array( |
723 'id' => 'demo_textblock', |
726 'id' => 'demo_textblock', |
724 'label' => __( 'Textblock', 'theme-text-domain' ), |
727 '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' ), |
728 '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' => '', |
729 'std' => '', |
727 'type' => 'textblock', |
730 'type' => 'textblock', |
728 'section' => 'option_types', |
731 'section' => 'option_types', |
729 'rows' => '', |
732 'rows' => '', |
730 'post_type' => '', |
733 'post_type' => '', |
731 'taxonomy' => '', |
734 'taxonomy' => '', |
732 'min_max_step'=> '', |
735 'min_max_step' => '', |
733 'class' => '', |
736 'class' => '', |
734 'condition' => '', |
737 'condition' => '', |
735 'operator' => 'and' |
738 'operator' => 'and', |
736 ), |
739 ), |
737 array( |
740 array( |
738 'id' => 'demo_textblock_titled', |
741 'id' => 'demo_textblock_titled', |
739 'label' => __( 'Textblock Titled', 'theme-text-domain' ), |
742 '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' ), |
743 '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' => '', |
744 'std' => '', |
742 'type' => 'textblock-titled', |
745 'type' => 'textblock-titled', |
743 'section' => 'option_types', |
746 'section' => 'option_types', |
744 'rows' => '', |
747 'rows' => '', |
745 'post_type' => '', |
748 'post_type' => '', |
746 'taxonomy' => '', |
749 'taxonomy' => '', |
747 'min_max_step'=> '', |
750 'min_max_step' => '', |
748 'class' => '', |
751 'class' => '', |
749 'condition' => '', |
752 'condition' => '', |
750 'operator' => 'and' |
753 'operator' => 'and', |
751 ), |
754 ), |
752 array( |
755 array( |
753 'id' => 'demo_typography', |
756 'id' => 'demo_typography', |
754 'label' => __( 'Typography', 'theme-text-domain' ), |
757 '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>' ), |
758 '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 %1$s. The Typography option type has filters that allow you to remove fields or change the defaults. For example, you can filter %2$s to remove unwanted fields from all Background options or an individual one. You can also filter %3$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' => '', |
759 'std' => '', |
757 'type' => 'typography', |
760 'type' => 'typography', |
758 'section' => 'option_types', |
761 'section' => 'option_types', |
759 'rows' => '', |
762 'rows' => '', |
760 'post_type' => '', |
763 'post_type' => '', |
761 'taxonomy' => '', |
764 'taxonomy' => '', |
762 'min_max_step'=> '', |
765 'min_max_step' => '', |
763 'class' => '', |
766 'class' => '', |
764 'condition' => '', |
767 'condition' => '', |
765 'operator' => 'and' |
768 'operator' => 'and', |
766 ), |
769 ), |
767 array( |
770 array( |
768 'id' => 'demo_upload', |
771 'id' => 'demo_upload', |
769 'label' => __( 'Upload', 'theme-text-domain' ), |
772 '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' ), |
773 'desc' => sprintf( __( 'The Upload option type is used to upload any WordPress supported media. After uploading, users are required to press the "%1$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 %2$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' => '', |
774 'std' => '', |
772 'type' => 'upload', |
775 'type' => 'upload', |
773 'section' => 'option_types', |
776 'section' => 'option_types', |
774 'rows' => '', |
777 'rows' => '', |
775 'post_type' => '', |
778 'post_type' => '', |
776 'taxonomy' => '', |
779 'taxonomy' => '', |
777 'min_max_step'=> '', |
780 'min_max_step' => '', |
778 'class' => '', |
781 'class' => '', |
779 'condition' => '', |
782 'condition' => '', |
780 'operator' => 'and' |
783 'operator' => 'and', |
781 ), |
784 ), |
782 array( |
785 array( |
783 'id' => 'demo_upload_attachment_id', |
786 'id' => 'demo_upload_attachment_id', |
784 'label' => __( 'Upload Attachment ID', 'theme-text-domain' ), |
787 '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>' ), |
788 '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' => '', |
789 'std' => '', |
787 'type' => 'upload', |
790 'type' => 'upload', |
788 'section' => 'option_types', |
791 'section' => 'option_types', |
789 'rows' => '', |
792 'rows' => '', |
790 'post_type' => '', |
793 'post_type' => '', |
791 'taxonomy' => '', |
794 'taxonomy' => '', |
792 'min_max_step'=> '', |
795 'min_max_step' => '', |
793 'class' => 'ot-upload-attachment-id', |
796 'class' => 'ot-upload-attachment-id', |
794 'condition' => '', |
797 'condition' => '', |
795 'operator' => 'and' |
798 'operator' => 'and', |
796 ) |
799 ), |
797 ) |
800 ), |
798 ); |
801 ); |
799 |
802 |
800 /* allow settings to be filtered before saving */ |
803 // Allow settings to be filtered before saving. |
801 $custom_settings = apply_filters( ot_settings_id() . '_args', $custom_settings ); |
804 $custom_settings = apply_filters( ot_settings_id() . '_args', $custom_settings ); |
802 |
805 |
803 /* settings are not the same update the DB */ |
806 // Settings are not the same update the DB. |
804 if ( $saved_settings !== $custom_settings ) { |
807 if ( $saved_settings !== $custom_settings ) { |
805 update_option( ot_settings_id(), $custom_settings ); |
808 update_option( ot_settings_id(), $custom_settings ); |
806 } |
809 } |
807 |
810 |
808 /* Lets OptionTree know the UI Builder is being overridden */ |
811 // Lets OptionTree know the UI Builder is being overridden. |
809 global $ot_has_custom_theme_options; |
812 global $ot_has_custom_theme_options; |
810 $ot_has_custom_theme_options = true; |
813 $ot_has_custom_theme_options = true; |
811 |
|
812 } |
814 } |