Version Description
- Added support for WordPress 3.6.
- UI got a small but needed update, and is now more inline with WordPress.
- Added WPML support for the Text, Textarea, and Textarea Simple option types, and within list items; even after drag & drop.
- Upload now uses the media uploader introduced in WordPress 3.5. Contributors via github @htvu, @maimairel, and @valendesigns.
- Added a horizontal Numeric Slider option type. Contributors via github @maimairel and @valendesigns.
- Added a Sidebar Select option type. Contributors via github @maimairel.
- Removed additional deprecated assigning of return value in PHP.
- Fix missing "Send to OptionTree" button in CPT. Contributors via github @jomaddim.
- Fix option types that use $count instead of an array key to select the option value.
- Created functions to register the Theme Options & Settings pages, and with better filtering.
- Added relative path support for Radio Image choices.
- Added dynamic replacement of 'OT_URL' & 'OT_THEME_URL' in the Radio Image source path.
- Make '0' possible as a field value. Validate for empty strings instead of empty(). Contributors via github @maimairel.
- The 'ot_theme_options_capability' filter is now working for different capabilities like editor.
- The 'ot_display_by_type' filter is now being assigned to a value.
- Added filter 'ot_show_options_ui' which allows you to hide the Theme Options UI Builder.
- Added filter 'ot_show_settings_import' which allows you to hide the Settings Import options on the Import page.
- Added filter 'ot_show_settings_export' which allows you to hide the Settings Export options on the Export page.
- Added filter 'ot_show_docs' which allows you to hide the Documentation.
- Added filter 'ot_use_theme_options' which allows you to hide the OptionTree Theme Option page (not recommended for beginners).
- Added filter 'ot_list_item_description' which allows you to change the default list item description text.
- Added filter 'ot_type_custom_post_type_checkbox_query' which allows you to filter the Custom Post Type Checkbox option type WP_Query array.
- Added filter 'ot_type_custom_post_type_select_query' which allows you to filter the Custom Post Type Select option type WP_Query array.
- Added filter 'ot_type_page_checkbox_query' which allows you to filter the Page Checkbox option type WP_Query array.
- Added filter 'ot_type_page_select_query' which allows you to filter the Page Select option type WP_Query array.
- Added filter 'ot_type_post_checkbox_query' which allows you to filter the Post Checkbox option type WP_Query array.
- Added filter 'ot_type_post_select_query' which allows you to filter the Post Select option type WP_Query array.
Download this release
Release Info
Developer | valendesigns |
Plugin | OptionTree |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.16 to 2.1
- assets/css/ot-admin.css +1240 -217
- assets/images/ot-ui-light-sprite.png +0 -0
- assets/images/ot-ui-sprite.png +0 -0
- assets/js/ot-admin.js +104 -42
- includes/ot-functions-admin.php +630 -130
- includes/ot-functions-compat.php +31 -13
- includes/ot-functions-deprecated.php +1 -1
- includes/ot-functions-docs-page.php +16 -3
- includes/ot-functions-option-types.php +154 -37
- includes/ot-functions-settings-page.php +15 -15
- includes/ot-functions.php +98 -2
- includes/ot-meta-box-api.php +8 -7
- includes/ot-settings-api.php +74 -28
- includes/ot-ui-admin.php +0 -225
- includes/ot-ui-theme-options.php +0 -56
- languages/option-tree.pot +474 -400
- license.txt +674 -0
- ot-loader.php +114 -19
- readme.txt +35 -3
assets/css/ot-admin.css
CHANGED
@@ -1,353 +1,1376 @@
|
|
1 |
/* --------------------------------------------------
|
2 |
:: Screen Meta & Menu Icon
|
3 |
---------------------------------------------------*/
|
4 |
-
.appearance_page_ot-theme-options #screen-meta {
|
|
|
|
|
|
|
|
|
5 |
|
6 |
/* --------------------------------------------------
|
7 |
:: Messages
|
8 |
---------------------------------------------------*/
|
9 |
.wrap.settings-wrap div.error,
|
10 |
-
.wrap.settings-wrap div.updated
|
|
|
|
|
11 |
|
12 |
/* --------------------------------------------------
|
13 |
:: OptionTree Wrappers
|
14 |
---------------------------------------------------*/
|
15 |
-
#option-tree-settings-api .metabox-holder {
|
16 |
-
|
17 |
-
|
18 |
-
#option-tree-settings-api .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
/* --------------------------------------------------
|
21 |
:: Header
|
22 |
---------------------------------------------------*/
|
23 |
-
#option-tree-header-wrap
|
24 |
-
|
25 |
-
|
26 |
-
#option-tree-header
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
#option-tree-header #option-tree-version span {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
/* --------------------------------------------------
|
35 |
:: Sub Header
|
36 |
---------------------------------------------------*/
|
37 |
-
#option-tree-sub-header
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
/* --------------------------------------------------
|
40 |
:: Tabs
|
41 |
---------------------------------------------------*/
|
42 |
-
.wrap.settings-wrap .ui-tabs-nav
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
.wrap.settings-wrap .ui-tabs-nav li a:hover,
|
47 |
-
.wrap.settings-wrap .ui-tabs-nav li.ui-state-active a {
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
50 |
/* --------------------------------------------------
|
51 |
:: Format Settings
|
52 |
---------------------------------------------------*/
|
53 |
-
.format-settings
|
|
|
|
|
|
|
|
|
54 |
|
55 |
/* --------------------------------------------------
|
56 |
:: Format Setting Label
|
57 |
---------------------------------------------------*/
|
58 |
-
.format-setting-label
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
#option-tree-settings-api .description h3,
|
61 |
#option-tree-settings-api .format-setting-label .label,
|
62 |
-
.metabox-holder .format-setting-label .label {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
/* --------------------------------------------------
|
65 |
:: Format Setting
|
66 |
---------------------------------------------------*/
|
67 |
-
.format-setting
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
.format-setting.no-desc .format-setting-inner,
|
71 |
.format-setting.wide-desc .format-setting-inner,
|
72 |
-
.option-tree-list-item .format-setting-inner {
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
75 |
.format-setting.no-desc .description,
|
76 |
.format-setting.wide-desc .description,
|
77 |
-
.option-tree-list-item .description
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
#
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
-
@media only screen and (max-width: 900px) {
|
|
|
97 |
.format-setting .description,
|
98 |
-
.format-setting .format-setting-inner {
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
|
102 |
/* --------------------------------------------------
|
103 |
:: Code formatting
|
104 |
---------------------------------------------------*/
|
105 |
-
#option-tree-settings-api code
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
/* --------------------------------------------------
|
110 |
:: Input & Upload
|
111 |
---------------------------------------------------*/
|
112 |
input.option-tree-ui-upload-input,
|
113 |
-
input.option-tree-ui-input
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
input:focus.option-tree-ui-upload-input,
|
116 |
-
input:focus.option-tree-ui-input
|
|
|
|
|
117 |
|
118 |
-
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
|
|
119 |
.option-tree-ui-input,
|
120 |
-
.option-tree-ui-upload-input
|
|
|
|
|
121 |
}
|
122 |
|
123 |
/* --------------------------------------------------
|
124 |
:: Upload
|
125 |
---------------------------------------------------*/
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
/* --------------------------------------------------
|
133 |
:: Textarea
|
134 |
---------------------------------------------------*/
|
135 |
.fill-area .description,
|
136 |
-
.fill-area .format-setting-inner
|
|
|
|
|
137 |
|
138 |
-
.wp-editor-area {
|
|
|
|
|
139 |
.textarea,
|
140 |
-
.ot-metabox-wrapper textarea
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
-
@media only screen and (max-width: 1105px) {
|
|
|
|
|
|
|
|
|
146 |
|
147 |
/* --------------------------------------------------
|
148 |
:: Setting Item with Drag & Drop
|
149 |
---------------------------------------------------*/
|
150 |
.option-tree-setting-wrap { margin-top: 0px; }
|
151 |
.option-tree-setting-wrap li { margin: 4px 0px; }
|
152 |
-
.option-tree-setting
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
/* --------------------------------------------------
|
174 |
:: Layouts
|
175 |
---------------------------------------------------*/
|
176 |
-
#option_tree_layouts
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
/* --------------------------------------------------
|
184 |
:: Select
|
185 |
---------------------------------------------------*/
|
186 |
-
.select-group
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
.select-wrapper
|
192 |
-
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
-
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
/* FireFox */
|
199 |
@-moz-document url-prefix() {
|
200 |
-
#option-tree-options-layouts-form .select-wrapper {
|
|
|
|
|
201 |
}
|
202 |
|
203 |
/* Webkit */
|
204 |
-
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
|
|
205 |
.select-wrapper span {
|
206 |
height: 26px;
|
207 |
line-height: 26px;
|
208 |
-
}
|
209 |
}
|
210 |
|
211 |
/* Opera 11 */
|
212 |
@media not screen and (1) {
|
213 |
-
.select-wrapper
|
214 |
height: 26px;
|
215 |
-
}
|
216 |
}
|
217 |
|
218 |
/* --------------------------------------------------
|
219 |
:: Measurement
|
220 |
---------------------------------------------------*/
|
221 |
-
.option-tree-ui-measurement-input-wrap {
|
|
|
|
|
222 |
|
223 |
/* --------------------------------------------------
|
224 |
:: Checkbox & Radio
|
225 |
---------------------------------------------------*/
|
226 |
.format-setting.type-checkbox input,
|
227 |
-
.format-setting.type-radio input
|
|
|
|
|
|
|
228 |
.format-setting.type-checkbox label,
|
229 |
-
.format-setting.type-radio label
|
|
|
|
|
|
|
|
|
230 |
#option-tree-settings-api .format-setting.type-checkbox p,
|
231 |
-
#option-tree-settings-api .format-setting.type-radio p {
|
|
|
|
|
|
|
|
|
232 |
|
233 |
/* --------------------------------------------------
|
234 |
:: Radio Images
|
235 |
---------------------------------------------------*/
|
236 |
-
.type-radio-image .option-tree-ui-radio-images {
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
.type-radio-image .option-tree-ui-radio-images img.option-tree-ui-radio-image-selected,
|
239 |
-
.type-radio-image .option-tree-ui-radio-images img:hover {
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
/* --------------------------------------------------
|
242 |
:: Colorpicker
|
243 |
---------------------------------------------------*/
|
244 |
-
.option-tree-ui-colorpicker-input-wrap{
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
.
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
.ot_colorpicker
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
@media not screen and (1) {
|
272 |
-
.format-settings .cp_box
|
|
|
|
|
273 |
}
|
274 |
|
275 |
/* --------------------------------------------------
|
276 |
:: OptionTree UI Buttons
|
277 |
---------------------------------------------------*/
|
278 |
-
.option-tree-ui-
|
279 |
-
.option-tree-ui-
|
280 |
-
.option-tree-ui-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
.option-tree-ui-button:hover,
|
294 |
-
.option-tree-ui-button
|
295 |
-
.option-tree-ui-button
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
.option-tree-ui-button.active,
|
297 |
.option-tree-ui-button.active:hover,
|
298 |
-
.option-tree-ui-button.active:
|
299 |
-
.option-tree-ui-button
|
300 |
-
.option-tree-ui-button.
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
}
|
310 |
-
/* --------------------------------------------------
|
311 |
-
:: OptionTree UI Button Colors
|
312 |
-
---------------------------------------------------*/
|
313 |
-
|
314 |
-
/* Blue */
|
315 |
-
.option-tree-ui-button.blue { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.3); border-color: #0080f0; background: #2c95ff; background: -moz-linear-gradient(top, #2c95ff 0%, #288cef 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2c95ff), color-stop(100%,#288cef)); background: -webkit-linear-gradient(top, #2c95ff 0%,#288cef 100%); background: -o-linear-gradient(top, #2c95ff 0%,#288cef 100%); background: -ms-linear-gradient(top, #2c95ff 0%,#288cef 100%); background: linear-gradient(top, #2c95ff 0%,#288cef 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2c95ff', endColorstr='#288cef',GradientType=0 ); }
|
316 |
-
.option-tree-ui-button.blue:hover { border-color: #1260b9; background: #2d95ff; background: -moz-linear-gradient(top, #2d95ff 0%, #0081eb 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2d95ff), color-stop(100%,#0081eb)); background: -webkit-linear-gradient(top, #2d95ff 0%,#0081eb 100%); background: -o-linear-gradient(top, #2d95ff 0%,#0081eb 100%); background: -ms-linear-gradient(top, #2d95ff 0%,#0081eb 100%); background: linear-gradient(top, #2d95ff 0%,#0081eb 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2d95ff', endColorstr='#0081eb',GradientType=0 ); }
|
317 |
-
.option-tree-ui-button.blue:active { border-color: #0083dd; }
|
318 |
-
|
319 |
-
/* Red */
|
320 |
-
.option-tree-ui-button.red { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.3); border-color: #d94d30; background: #e55033; background: -moz-linear-gradient(top, #e55033 0%, #d94d30 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e55033), color-stop(100%,#d94d30)); background: -webkit-linear-gradient(top, #e55033 0%,#d94d30 100%); background: -o-linear-gradient(top, #e55033 0%,#d94d30 100%); background: -ms-linear-gradient(top, #e55033 0%,#d94d30 100%); background: linear-gradient(top, #e55033 0%,#d94d30 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e55033', endColorstr='#d94d30',GradientType=0 ); }
|
321 |
-
.option-tree-ui-button.red:hover { border-color: #b72f11; background: #e65033; background: -moz-linear-gradient(top, #e65033 0%, #cc3d1f 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e65033), color-stop(100%,#cc3d1f)); background: -webkit-linear-gradient(top, #e65033 0%,#cc3d1f 100%); background: -o-linear-gradient(top, #e65033 0%,#cc3d1f 100%); background: -ms-linear-gradient(top, #e65033 0%,#cc3d1f 100%); background: linear-gradient(top, #e65033 0%,#cc3d1f 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e65033', endColorstr='#cc3d1f',GradientType=0 ); }
|
322 |
-
.option-tree-ui-button.red:active { border-color: #ce4925; }
|
323 |
-
|
324 |
-
/* Green */
|
325 |
-
.option-tree-ui-button.green { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.3); border-color: #29691d; background: #3c9300; background: -moz-linear-gradient(top, #3c9300 0%, #398a00 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3c9300), color-stop(100%,#398a00)); background: -webkit-linear-gradient(top, #3c9300 0%,#398a00 100%); background: -o-linear-gradient(top, #3c9300 0%,#398a00 100%); background: -ms-linear-gradient(top, #3c9300 0%,#398a00 100%); background: linear-gradient(top, #3c9300 0%,#398a00 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3c9300', endColorstr='#398a00',GradientType=0 ); }
|
326 |
-
.option-tree-ui-button.green:hover { border-color: #275400; background: #3c9300; background: -moz-linear-gradient(top, #3c9300 0%, #347d00 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3c9300), color-stop(100%,#347d00)); background: -webkit-linear-gradient(top, #3c9300 0%,#347d00 100%); background: -o-linear-gradient(top, #3c9300 0%,#347d00 100%); background: -ms-linear-gradient(top, #3c9300 0%,#347d00 100%); background: linear-gradient(top, #3c9300 0%,#347d00 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3c9300', endColorstr='#347d00',GradientType=0 ); }
|
327 |
-
.option-tree-ui-button.green:active { border-color: #2b7800; }
|
328 |
-
|
329 |
-
/* Grey */
|
330 |
-
.option-tree-ui-button.grey { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,1); border-color: #333; background: #555; background: -moz-linear-gradient(top, #555 0%, #444 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#555), color-stop(100%,#444)); background: -webkit-linear-gradient(top, #555 0%,#444 100%); background: -o-linear-gradient(top, #555 0%,#444 100%); background: -ms-linear-gradient(top, #555 0%,#444 100%); background: linear-gradient(top, #555 0%,#444 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#555', endColorstr='#444',GradientType=0 ); }
|
331 |
-
.option-tree-ui-button.grey:hover { border-color: #222; background: #444; background: -moz-linear-gradient(top, #444 0%, #333 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#444), color-stop(100%,#333)); background: -webkit-linear-gradient(top, #444 0%,#333 100%); background: -o-linear-gradient(top, #444 0%,#333 100%); background: -ms-linear-gradient(top, #444 0%,#333 100%); background: linear-gradient(top, #444 0%,#333 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444', endColorstr='#333',GradientType=0 ); }
|
332 |
-
.option-tree-ui-button.grey:active { border-color: #111; }
|
333 |
-
|
334 |
-
/* All Active */
|
335 |
-
.option-tree-ui-button.blue:active,
|
336 |
-
.option-tree-ui-button.red:active,
|
337 |
-
.option-tree-ui-button.green:active,
|
338 |
-
.option-tree-ui-button.grey:active { box-shadow: inset 1px 1px 3px rgba(0,0,0, 0.2); -moz-box-shadow: inset 1px 1px 3px rgba(0,0,0, 0.2); -webkit-box-shadow: inset 1px 1px 3px rgba(0,0,0, 0.2); }
|
339 |
|
340 |
/* --------------------------------------------------
|
341 |
:: OptionTree UI Button Icons
|
342 |
---------------------------------------------------*/
|
343 |
-
.option-tree-ui-button .icon
|
344 |
-
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
.option-tree-ui-button.active .icon,
|
347 |
-
.option-tree-ui-button:hover .icon
|
348 |
-
|
349 |
-
|
350 |
-
.option-tree-ui-button .
|
351 |
-
|
352 |
-
|
353 |
-
.option-tree-ui-button .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/* --------------------------------------------------
|
2 |
:: Screen Meta & Menu Icon
|
3 |
---------------------------------------------------*/
|
4 |
+
.appearance_page_ot-theme-options #screen-meta {
|
5 |
+
margin-right: 20px;
|
6 |
+
margin-left: 2px;
|
7 |
+
min-width: 533px;
|
8 |
+
}
|
9 |
|
10 |
/* --------------------------------------------------
|
11 |
:: Messages
|
12 |
---------------------------------------------------*/
|
13 |
.wrap.settings-wrap div.error,
|
14 |
+
.wrap.settings-wrap div.updated {
|
15 |
+
margin: 9px 5px 0px 2px !important;
|
16 |
+
}
|
17 |
|
18 |
/* --------------------------------------------------
|
19 |
:: OptionTree Wrappers
|
20 |
---------------------------------------------------*/
|
21 |
+
#option-tree-settings-api .metabox-holder {
|
22 |
+
overflow: hidden;
|
23 |
+
}
|
24 |
+
#option-tree-settings-api .postbox {
|
25 |
+
background: #fff;
|
26 |
+
border: none;
|
27 |
+
margin: 0 20px;
|
28 |
+
}
|
29 |
+
#option-tree-settings-api .inside {
|
30 |
+
margin: 0px !important;
|
31 |
+
padding: 0px !important;
|
32 |
+
}
|
33 |
+
#option-tree-settings-api .ui-tabs {
|
34 |
+
background: #fff url(../images/ot-menu-bg.png) repeat-y 0 0;
|
35 |
+
border: 1px solid #ccc;
|
36 |
+
border-top: none;
|
37 |
+
margin: 0px 5px 0 2px;
|
38 |
+
min-width: 533px;
|
39 |
+
padding-bottom: 5px;
|
40 |
+
position: relative;
|
41 |
+
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
42 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
43 |
+
-webkit-border-radius: 0 0 4px 4px;
|
44 |
+
-khtml-border-radius: 0 0 4px 4px;
|
45 |
+
-moz-border-radius: 0 0 4px 4px;
|
46 |
+
-o-border-radius: 0 0 4px 4px;
|
47 |
+
border-radius: 0 0 4px 4px;
|
48 |
+
}
|
49 |
|
50 |
/* --------------------------------------------------
|
51 |
:: Header
|
52 |
---------------------------------------------------*/
|
53 |
+
#option-tree-header-wrap {
|
54 |
+
position: relative;
|
55 |
+
}
|
56 |
+
#option-tree-header {
|
57 |
+
background: #464646;
|
58 |
+
color: #ccc;
|
59 |
+
display: block;
|
60 |
+
margin: 11px 5px 0 2px;
|
61 |
+
min-width: 535px;
|
62 |
+
overflow: hidden;
|
63 |
+
position: relative;
|
64 |
+
background-image: -webkit-linear-gradient(bottom, #373737, #464646 5px);
|
65 |
+
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
66 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
67 |
+
-webkit-border-radius: 4px 4px 0 0;
|
68 |
+
-khtml-border-radius: 4px 4px 0 0;
|
69 |
+
-moz-border-radius: 4px 4px 0 0;
|
70 |
+
-o-border-radius: 4px 4px 0 0;
|
71 |
+
border-radius: 4px 4px 0 0;
|
72 |
+
}
|
73 |
+
#option-tree-header li {
|
74 |
+
display: block;
|
75 |
+
float: left;
|
76 |
+
margin: 0px;
|
77 |
+
padding: 0px;
|
78 |
+
}
|
79 |
+
#option-tree-header li a {
|
80 |
+
color: #ccc;
|
81 |
+
text-decoration: none;
|
82 |
+
}
|
83 |
+
#option-tree-header li a:hover {
|
84 |
+
color: #fafafa;
|
85 |
+
}
|
86 |
+
#option-tree-header #option-tree-logo a {
|
87 |
+
background: transparent url(../images/ot-logo.png) no-repeat 13px center;
|
88 |
+
border-right: 1px solid #333;
|
89 |
+
display: block;
|
90 |
+
float: left;
|
91 |
+
height: 24px;
|
92 |
+
line-height: 24px;
|
93 |
+
padding: 3px 12px 3px 13px;
|
94 |
+
text-indent: -9999px;
|
95 |
+
width: 24px;
|
96 |
+
}
|
97 |
+
#option-tree-header li#option-tree-logo:hover {
|
98 |
+
color: #fafafa;
|
99 |
+
background-color: #3a3a3a;
|
100 |
+
background-image: -ms-linear-gradient(bottom,#3a3a3a,#222);
|
101 |
+
background-image: -moz-linear-gradient(bottom,#3a3a3a,#222);
|
102 |
+
background-image: -o-linear-gradient(bottom,#3a3a3a,#222);
|
103 |
+
background-image: -webkit-gradient(linear,left bottom,left top,from(#3a3a3a),to(#222));
|
104 |
+
background-image: -webkit-linear-gradient(bottom,#3a3a3a,#222);
|
105 |
+
background-image: linear-gradient(bottom,#3a3a3a,#222);
|
106 |
+
-webkit-border-top-left-radius: 5px;
|
107 |
+
-moz-border-radius-topleft: 5px;
|
108 |
+
border-top-left-radius: 5px;
|
109 |
+
}
|
110 |
+
#option-tree-header #option-tree-version {
|
111 |
|
112 |
+
}
|
113 |
+
#option-tree-header #option-tree-version span {
|
114 |
+
border-left: 1px solid #555;
|
115 |
+
display: block;
|
116 |
+
float: left;
|
117 |
+
height: 24px;
|
118 |
+
line-height: 24px;
|
119 |
+
padding: 3px 12px 3px 12px;
|
120 |
+
}
|
121 |
|
122 |
/* --------------------------------------------------
|
123 |
:: Sub Header
|
124 |
---------------------------------------------------*/
|
125 |
+
#option-tree-sub-header {
|
126 |
+
background: #fafafa url(../images/ot-sub-header-bg.png) repeat-x 0 0;
|
127 |
+
border: 1px solid #ccc;
|
128 |
+
border-top: none;
|
129 |
+
display: block;
|
130 |
+
margin: 0 5px 0 2px;
|
131 |
+
min-width: 523px;
|
132 |
+
overflow: hidden;
|
133 |
+
padding: 5px;
|
134 |
+
position: relative;
|
135 |
+
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
136 |
+
box-shadow:0 1px 3px rgba(0,0,0,0.05);
|
137 |
+
}
|
138 |
|
139 |
/* --------------------------------------------------
|
140 |
:: Tabs
|
141 |
---------------------------------------------------*/
|
142 |
+
.wrap.settings-wrap .ui-tabs-nav {
|
143 |
+
background: url(../images/ot-menu-top-bg.png) no-repeat right top;
|
144 |
+
float: left;
|
145 |
+
list-style: none;
|
146 |
+
margin: 0 0 0 -4px;
|
147 |
+
padding: 1em 0;
|
148 |
+
width: 151px;
|
149 |
+
}
|
150 |
+
.wrap.settings-wrap .ui-tabs-nav li {
|
151 |
+
border: 1px solid transparent;
|
152 |
+
border-right-width: 0px;
|
153 |
+
display: block; margin: 0;
|
154 |
+
-webkit-border-radius: 3px 0 0 3px;
|
155 |
+
-khtml-border-radius: 3px 0 0 3px;
|
156 |
+
-moz-border-radius: 3px 0 0 3px;
|
157 |
+
-o-border-radius: 3px 0 0 3px;
|
158 |
+
border-radius: 3px 0 0 3px;
|
159 |
+
}
|
160 |
+
.wrap.settings-wrap .ui-tabs-nav li.ui-state-active {
|
161 |
+
background: #fff;
|
162 |
+
border-color: #ccc;
|
163 |
+
color: #000;
|
164 |
+
}
|
165 |
+
.wrap.settings-wrap .ui-tabs-nav li a {
|
166 |
+
color: #21759b;
|
167 |
+
display: block;
|
168 |
+
line-height: 18px;
|
169 |
+
padding: 5px 5px 5px 12px;
|
170 |
+
text-decoration: none;
|
171 |
+
}
|
172 |
.wrap.settings-wrap .ui-tabs-nav li a:hover,
|
173 |
+
.wrap.settings-wrap .ui-tabs-nav li.ui-state-active a {
|
174 |
+
color: #000;
|
175 |
+
outline: none;
|
176 |
+
}
|
177 |
+
.wrap.settings-wrap .ui-tabs-panel {
|
178 |
+
clear: both;
|
179 |
+
}
|
180 |
/* --------------------------------------------------
|
181 |
:: Format Settings
|
182 |
---------------------------------------------------*/
|
183 |
+
.format-settings {
|
184 |
+
padding: 10px 0 20px 0;
|
185 |
+
position: relative;
|
186 |
+
width: 100%;
|
187 |
+
}
|
188 |
|
189 |
/* --------------------------------------------------
|
190 |
:: Format Setting Label
|
191 |
---------------------------------------------------*/
|
192 |
+
.format-setting-label {
|
193 |
+
border-bottom: 1px dashed #ddd;
|
194 |
+
margin: 0 0 14px 0;
|
195 |
+
padding: 5px 0px 1px 0px;
|
196 |
+
width: 100%;
|
197 |
+
}
|
198 |
#option-tree-settings-api .description h3,
|
199 |
#option-tree-settings-api .format-setting-label .label,
|
200 |
+
.metabox-holder .format-setting-label .label {
|
201 |
+
background: none;
|
202 |
+
border: none;
|
203 |
+
color: #333;
|
204 |
+
cursor: text;
|
205 |
+
display: block;
|
206 |
+
font-family: sans-serif !important;
|
207 |
+
font-size: 1.2em !important;
|
208 |
+
font-weight: bold !important;
|
209 |
+
letter-spacing: 0;
|
210 |
+
padding: 0 0 9px 0 !important;
|
211 |
+
-webkit-user-select: text;
|
212 |
+
text-shadow: none;
|
213 |
+
}
|
214 |
|
215 |
/* --------------------------------------------------
|
216 |
:: Format Setting
|
217 |
---------------------------------------------------*/
|
218 |
+
.format-setting {
|
219 |
+
overflow: hidden;
|
220 |
+
position: relative;
|
221 |
+
width: 100%;
|
222 |
+
}
|
223 |
+
.format-setting .format-setting-inner {
|
224 |
+
float: left;
|
225 |
+
position: relative;
|
226 |
+
width: 63%;
|
227 |
+
}
|
228 |
.format-setting.no-desc .format-setting-inner,
|
229 |
.format-setting.wide-desc .format-setting-inner,
|
230 |
+
.option-tree-list-item .format-setting-inner {
|
231 |
+
width: 100%;
|
232 |
+
}
|
233 |
+
.format-setting .description {
|
234 |
+
float: right;
|
235 |
+
padding: 5px 0;
|
236 |
+
width: 35%;
|
237 |
+
}
|
238 |
.format-setting.no-desc .description,
|
239 |
.format-setting.wide-desc .description,
|
240 |
+
.option-tree-list-item .description {
|
241 |
+
float: none;
|
242 |
+
width: 100%;
|
243 |
+
}
|
244 |
+
.list-item-description {
|
245 |
+
padding-top: 10px;
|
246 |
+
}
|
247 |
+
#option-tree-settings-api h4 {
|
248 |
+
color: #333;
|
249 |
+
font-size: 1.12em;
|
250 |
+
font-weight: bold;
|
251 |
+
margin: 1em 0 0.5em 0;
|
252 |
+
padding: 0;
|
253 |
+
}
|
254 |
+
#option-tree-settings-api h5 {
|
255 |
+
color: #444;
|
256 |
+
font-size: 1em;
|
257 |
+
font-weight: bold;
|
258 |
+
margin: 1em 0 0.5em 0;
|
259 |
+
padding: 0;
|
260 |
+
}
|
261 |
+
#option-tree-settings-api p {
|
262 |
+
margin: 0 0 1.5em 0 !important;
|
263 |
+
}
|
264 |
+
#post .format-setting-inner p {
|
265 |
+
float: left;
|
266 |
+
width: 100%;
|
267 |
+
margin: 0 0 1.05em 0 !important;
|
268 |
+
}
|
269 |
+
.aside {
|
270 |
+
border-bottom: 1px solid #eee;
|
271 |
+
padding-bottom: 15px;
|
272 |
+
margin-bottom: 15px;
|
273 |
+
}
|
274 |
+
.deprecated {
|
275 |
+
border-bottom: 1px solid #eee;
|
276 |
+
color: #b94029;
|
277 |
+
padding-bottom: 15px;
|
278 |
+
margin-bottom: 15px;
|
279 |
+
}
|
280 |
+
.warning {
|
281 |
+
color: #b94029;
|
282 |
+
}
|
283 |
+
.docs-ul {
|
284 |
+
line-height: 1.3em;
|
285 |
+
margin: 0;
|
286 |
+
padding: 0 0 1em 0;
|
287 |
+
}
|
288 |
+
.docs-ul li {
|
289 |
+
list-style-type: square;
|
290 |
+
margin-left: 20px;
|
291 |
+
}
|
292 |
+
#contextual-help-setting {
|
293 |
+
float: left;
|
294 |
+
padding: 10px 0 5px 0;
|
295 |
+
width: 100%;
|
296 |
+
}
|
297 |
+
#contextual-help-label {
|
298 |
+
float: left;
|
299 |
+
padding-top: 20px;
|
300 |
+
width: 100%;
|
301 |
+
}
|
302 |
+
#option_tree_settings_help {
|
303 |
+
float: left;
|
304 |
+
width: 100%;
|
305 |
+
}
|
306 |
+
#option-tree-settings-api blockquote {
|
307 |
+
font-style: italic;
|
308 |
+
padding-left: 15px;
|
309 |
+
position: relative;
|
310 |
+
}
|
311 |
+
#option-tree-settings-api blockquote:before {
|
312 |
+
color: #ccc;
|
313 |
+
content: "\201C";
|
314 |
+
display: block;
|
315 |
+
font-size: 400%;
|
316 |
+
font-style: normal;
|
317 |
+
left: -10px;
|
318 |
+
position: absolute;
|
319 |
+
top: 10px;
|
320 |
+
}
|
321 |
|
322 |
+
@media only screen and (max-width: 900px) {
|
323 |
+
|
324 |
.format-setting .description,
|
325 |
+
.format-setting .format-setting-inner {
|
326 |
+
width: 100%;
|
327 |
+
}
|
328 |
+
|
329 |
+
.format-setting .description {
|
330 |
+
padding-top: 0px;
|
331 |
+
};
|
332 |
}
|
333 |
|
334 |
/* --------------------------------------------------
|
335 |
:: Code formatting
|
336 |
---------------------------------------------------*/
|
337 |
+
#option-tree-settings-api code {
|
338 |
+
background-color: #f1f1f1;
|
339 |
+
color: #000;
|
340 |
+
}
|
341 |
+
#option-tree-settings-api pre {
|
342 |
+
font-size: 13px;
|
343 |
+
padding: 0;
|
344 |
+
margin: 1.5em 0;
|
345 |
+
line-height: 18px;
|
346 |
+
overflow: auto;
|
347 |
+
overflow-Y: hidden;
|
348 |
+
padding-top: 18px;
|
349 |
+
background: #f1f1f1;
|
350 |
+
border-bottom: 1px solid #f1f1f1;
|
351 |
+
margin-bottom: 20px;
|
352 |
+
color: #000;
|
353 |
+
white-space: pre-wrap;
|
354 |
+
word-wrap: break-word;
|
355 |
+
}
|
356 |
+
#option-tree-settings-api pre code {
|
357 |
+
padding: 0 18px 18px 18px;
|
358 |
+
display: block;
|
359 |
+
background: url(../images/ot-pre-bg.gif) repeat left top;
|
360 |
+
}
|
361 |
|
362 |
/* --------------------------------------------------
|
363 |
:: Input & Upload
|
364 |
---------------------------------------------------*/
|
365 |
input.option-tree-ui-upload-input,
|
366 |
+
input.option-tree-ui-input {
|
367 |
+
background: #fff;
|
368 |
+
border: 1px solid #ccc !important;
|
369 |
+
line-height: 17px;
|
370 |
+
font-size: 12px;
|
371 |
+
margin-bottom: 5px;
|
372 |
+
padding: 7px 6px;
|
373 |
+
position: relative;
|
374 |
+
width: 100%;
|
375 |
+
border-radius: 2px;
|
376 |
+
-webkit-border-radius: 2px;
|
377 |
+
-moz-border-radius: 2px;
|
378 |
+
-moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
379 |
+
-webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
380 |
+
box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
381 |
+
}
|
382 |
input:focus.option-tree-ui-upload-input,
|
383 |
+
input:focus.option-tree-ui-input {
|
384 |
+
border-color: #bbb !important;
|
385 |
+
}
|
386 |
|
387 |
+
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
388 |
+
|
389 |
.option-tree-ui-input,
|
390 |
+
.option-tree-ui-upload-input {
|
391 |
+
padding: 5px 6px !important;
|
392 |
+
};
|
393 |
}
|
394 |
|
395 |
/* --------------------------------------------------
|
396 |
:: Upload
|
397 |
---------------------------------------------------*/
|
398 |
+
div.option-tree-ui-media-wrap {
|
399 |
+
margin: 5px 63px 0 0;
|
400 |
+
min-height: 35px;
|
401 |
+
position: relative;
|
402 |
+
}
|
403 |
+
.option-tree-ui-media-wrap img {
|
404 |
+
background: #fafafa;
|
405 |
+
border: 1px solid #ccc;
|
406 |
+
padding: 4px;
|
407 |
+
border-radius: 2px;
|
408 |
+
-webkit-border-radius: 2px;
|
409 |
+
-moz-border-radius: 2px;
|
410 |
+
display: block;
|
411 |
+
float: left;
|
412 |
+
max-width: 100%;
|
413 |
+
height: auto;
|
414 |
+
-ms-interpolation-mode: bicubic;
|
415 |
+
}
|
416 |
+
.option-tree-ui-upload-parent {
|
417 |
+
width: auto !important;
|
418 |
+
margin-right: 53px;
|
419 |
+
padding: 0px;
|
420 |
+
position: relative;
|
421 |
+
}
|
422 |
+
.format-setting .ot_upload_media {
|
423 |
+
top: 0px;
|
424 |
+
margin: 0px !important;
|
425 |
+
position: absolute;
|
426 |
+
right: -53px;
|
427 |
+
}
|
428 |
+
.option-tree-ui-media-wrap a.option-tree-ui-remove-media {
|
429 |
+
float: none !important;
|
430 |
+
margin: 0px !important;
|
431 |
+
position: absolute !important;
|
432 |
+
right: -63px;
|
433 |
+
top: 1px;
|
434 |
+
}
|
435 |
|
436 |
/* --------------------------------------------------
|
437 |
:: Textarea
|
438 |
---------------------------------------------------*/
|
439 |
.fill-area .description,
|
440 |
+
.fill-area .format-setting-inner {
|
441 |
+
width: 100% !important;
|
442 |
+
}
|
443 |
|
444 |
+
.wp-editor-area {
|
445 |
+
display: block;
|
446 |
+
}
|
447 |
.textarea,
|
448 |
+
.ot-metabox-wrapper textarea {
|
449 |
+
width: 99.9%;
|
450 |
+
border: 1px solid #ccc;
|
451 |
+
font-family: Consolas, Monaco, monospace;
|
452 |
+
line-height: 150%;
|
453 |
+
outline: 0;
|
454 |
+
padding: 10px;
|
455 |
+
resize: vertical;
|
456 |
+
}
|
457 |
+
#contextual-help-setting .textarea {
|
458 |
+
width: 99.75%;
|
459 |
+
}
|
460 |
+
.ot-metabox-wrapper .wp-editor-container {
|
461 |
+
border: none;
|
462 |
+
}
|
463 |
+
.ot-metabox-wrapper textarea:focus {
|
464 |
+
border-color: #bbb !important;
|
465 |
+
}
|
466 |
|
467 |
+
@media only screen and (max-width: 1105px) {
|
468 |
+
.type-textarea .description, .type-textarea .format-setting-inner {
|
469 |
+
width: 100%;
|
470 |
+
};
|
471 |
+
}
|
472 |
|
473 |
/* --------------------------------------------------
|
474 |
:: Setting Item with Drag & Drop
|
475 |
---------------------------------------------------*/
|
476 |
.option-tree-setting-wrap { margin-top: 0px; }
|
477 |
.option-tree-setting-wrap li { margin: 4px 0px; }
|
478 |
+
.option-tree-setting {
|
479 |
+
border: 1px solid #ccc;
|
480 |
+
overflow: hidden;
|
481 |
+
position: relative;
|
482 |
+
-webkit-border-radius: 4px;
|
483 |
+
-khtml-border-radius: 4px;
|
484 |
+
-moz-border-radius: 4px;
|
485 |
+
-o-border-radius: 4px;
|
486 |
+
border-radius: 4px;
|
487 |
+
}
|
488 |
+
.option-tree-setting a {
|
489 |
+
text-decoration: none;
|
490 |
+
}
|
491 |
+
.option-tree-setting .open {
|
492 |
+
background: #fafafa;
|
493 |
+
cursor: move;
|
494 |
+
line-height: 21px;
|
495 |
+
height: 21px;
|
496 |
+
padding: 10px 100px 10px 10px;
|
497 |
+
display: block;
|
498 |
+
}
|
499 |
+
.ui-state-disabled .option-tree-setting .open {
|
500 |
+
cursor: default;
|
501 |
+
}
|
502 |
+
.option-tree-setting .open:hover {
|
503 |
+
background: #fafafa url(../images/ot-dots.png) no-repeat 4px 15px;
|
504 |
+
}
|
505 |
+
.button-section {
|
506 |
+
position: absolute;
|
507 |
+
right: 0px;
|
508 |
+
top: 1px;
|
509 |
+
}
|
510 |
+
.option-tree-setting.is-section {
|
511 |
+
border: 1px solid #464646;
|
512 |
+
}
|
513 |
+
.option-tree-setting.is-section .open {
|
514 |
+
background: #464646;
|
515 |
+
color: #ccc;
|
516 |
+
}
|
517 |
+
.option-tree-setting.is-section .option-tree-ui-button {
|
518 |
+
border-color: #151515 !important;
|
519 |
+
}
|
520 |
+
.format-setting .ui-sortable-helper .option-tree-setting .open {
|
521 |
+
background: #fff url(../images/ot-dots.png) no-repeat 4px 15px;
|
522 |
+
}
|
523 |
+
.option-tree-setting.is-section .open:hover,
|
524 |
+
.format-setting .ui-sortable-helper .option-tree-setting.is-section .open {
|
525 |
+
background: #464646 url(../images/ot-dots.png) no-repeat 4px 15px;
|
526 |
+
}
|
527 |
+
.ui-state-highlight {
|
528 |
+
border: 1px dashed #ccc;
|
529 |
+
display: block;
|
530 |
+
-webkit-border-radius: 4px;
|
531 |
+
-moz-border-radius: 4px;
|
532 |
+
border-radius: 4px;
|
533 |
+
}
|
534 |
+
.option-tree-setting-body {
|
535 |
+
background: #fff;
|
536 |
+
border-top: 1px solid #ccc;
|
537 |
+
display: none;
|
538 |
+
padding: 10px;
|
539 |
+
-webkit-border-bottom-right-radius: 3px;
|
540 |
+
-webkit-border-bottom-left-radius: 3px;
|
541 |
+
-moz-border-radius-bottomright: 3px;
|
542 |
+
-moz-border-radius-bottomleft: 3px;
|
543 |
+
border-bottom-right-radius: 3px;
|
544 |
+
border-bottom-left-radius: 3px;
|
545 |
+
}
|
546 |
+
li ul .format-settings {
|
547 |
+
padding: 0 0 10px 0;
|
548 |
+
}
|
549 |
+
li ul .format-setting-label {
|
550 |
+
border: none;
|
551 |
+
padding: 0px;
|
552 |
+
margin: 0px;
|
553 |
+
}
|
554 |
|
555 |
/* --------------------------------------------------
|
556 |
:: Layouts
|
557 |
---------------------------------------------------*/
|
558 |
+
#option_tree_layouts {
|
559 |
+
display: none;
|
560 |
+
padding-top: 12px;
|
561 |
+
}
|
562 |
+
#option-tree-options-layouts-form {
|
563 |
+
left: 13px;
|
564 |
+
position: absolute;
|
565 |
+
top: 30px;
|
566 |
+
z-index: 100;
|
567 |
+
}
|
568 |
+
.option-tree-save-layout {
|
569 |
+
float: left;
|
570 |
+
padding: 10px 0;
|
571 |
+
}
|
572 |
+
.option-tree-save-layout.active-layout {
|
573 |
+
border-left: 1px solid #fff;
|
574 |
+
padding-left: 9px;
|
575 |
+
}
|
576 |
+
.option-tree-save-layout .widefat {
|
577 |
+
float: left;
|
578 |
+
width: 128px !important;
|
579 |
+
margin: 0;
|
580 |
+
}
|
581 |
+
.option-tree-save-layout button.blue {
|
582 |
+
margin: 0 0 0 10px;
|
583 |
+
}
|
584 |
+
.option-tree-active-layout {
|
585 |
+
border-right: 1px solid #ccc;
|
586 |
+
float: left;
|
587 |
+
padding: 10px 10px 10px 0;
|
588 |
+
min-width: 126px;
|
589 |
+
}
|
590 |
|
591 |
/* --------------------------------------------------
|
592 |
:: Select
|
593 |
---------------------------------------------------*/
|
594 |
+
.select-group {
|
595 |
+
margin-right: 53px;
|
596 |
+
overflow: hidden;
|
597 |
+
width: auto;
|
598 |
+
}
|
599 |
+
.select-wrapper {
|
600 |
+
background: #fff url(../images/ot-select.png) no-repeat right center;
|
601 |
+
border: 1px solid #ccc;
|
602 |
+
display: block;
|
603 |
+
float: left;
|
604 |
+
font-size: 12px;
|
605 |
+
height: 27px;
|
606 |
+
margin: 0 5px 5px 0;
|
607 |
+
width: auto;
|
608 |
+
border-radius: 2px;
|
609 |
+
-webkit-border-radius: 2px;
|
610 |
+
-moz-border-radius: 2px;
|
611 |
+
-moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
612 |
+
-webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
613 |
+
box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
614 |
+
}
|
615 |
+
.select-wrapper:hover {
|
616 |
+
background-image: url(../images/ot-select-hover.png);
|
617 |
+
border-color: #bbb;
|
618 |
+
}
|
619 |
+
select.option-tree-ui-select {
|
620 |
+
cursor: pointer;
|
621 |
+
filter: alpha(opacity: 0);
|
622 |
+
font-size: 14px;
|
623 |
+
height: 29px;
|
624 |
+
margin: 0;
|
625 |
+
-moz-opacity: 0;
|
626 |
+
opacity: 0;
|
627 |
+
padding: 0 !important;
|
628 |
+
position: relative;
|
629 |
+
width: inherit;
|
630 |
+
z-index: 4;
|
631 |
+
min-width: 118px;
|
632 |
+
}
|
633 |
|
634 |
+
select.option-tree-ui-select option {
|
635 |
+
padding: 3px 15px !important;
|
636 |
+
}
|
637 |
+
.select-wrapper span {
|
638 |
+
height: 27px;
|
639 |
+
line-height: 27px;
|
640 |
+
padding-left: 7px;
|
641 |
+
position: absolute;
|
642 |
+
z-index: 2;
|
643 |
+
}
|
644 |
+
#option-tree-options-layouts-form .select-wrapper {
|
645 |
+
margin: 0px;
|
646 |
+
}
|
647 |
+
#option-tree-options-layouts-form select.option-tree-ui-select {
|
648 |
+
min-width: 124px;
|
649 |
+
}
|
650 |
+
.type-measurement select.option-tree-ui-select {
|
651 |
+
min-width: 68px !important;
|
652 |
+
}
|
653 |
+
.type-measurement .select-wrapper {
|
654 |
+
position: absolute;
|
655 |
+
right: 0px;
|
656 |
+
top: 0px;
|
657 |
+
}
|
658 |
|
659 |
/* FireFox */
|
660 |
@-moz-document url-prefix() {
|
661 |
+
#option-tree-options-layouts-form .select-wrapper {
|
662 |
+
left: 250px;
|
663 |
+
};
|
664 |
}
|
665 |
|
666 |
/* Webkit */
|
667 |
+
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
668 |
+
|
669 |
.select-wrapper span {
|
670 |
height: 26px;
|
671 |
line-height: 26px;
|
672 |
+
};
|
673 |
}
|
674 |
|
675 |
/* Opera 11 */
|
676 |
@media not screen and (1) {
|
677 |
+
.select-wrapper {
|
678 |
height: 26px;
|
679 |
+
};
|
680 |
}
|
681 |
|
682 |
/* --------------------------------------------------
|
683 |
:: Measurement
|
684 |
---------------------------------------------------*/
|
685 |
+
.option-tree-ui-measurement-input-wrap {
|
686 |
+
margin-right: 80px;
|
687 |
+
}
|
688 |
|
689 |
/* --------------------------------------------------
|
690 |
:: Checkbox & Radio
|
691 |
---------------------------------------------------*/
|
692 |
.format-setting.type-checkbox input,
|
693 |
+
.format-setting.type-radio input {
|
694 |
+
float: left;
|
695 |
+
margin: 2px 5px 0 1px;
|
696 |
+
}
|
697 |
.format-setting.type-checkbox label,
|
698 |
+
.format-setting.type-radio label {
|
699 |
+
float: left;
|
700 |
+
max-width: 90%;
|
701 |
+
padding: 0px;
|
702 |
+
}
|
703 |
#option-tree-settings-api .format-setting.type-checkbox p,
|
704 |
+
#option-tree-settings-api .format-setting.type-radio p {
|
705 |
+
float: left;
|
706 |
+
margin: 0.5em 0 !important;
|
707 |
+
width: 100%;
|
708 |
+
}
|
709 |
|
710 |
/* --------------------------------------------------
|
711 |
:: Radio Images
|
712 |
---------------------------------------------------*/
|
713 |
+
.type-radio-image .option-tree-ui-radio-images {
|
714 |
+
float: left;
|
715 |
+
margin: 0 10px 10px 0px;
|
716 |
+
}
|
717 |
+
.type-radio-image .option-tree-ui-radio-images img {
|
718 |
+
background: #fff;
|
719 |
+
border: 1px solid #ccc;
|
720 |
+
cursor: pointer;
|
721 |
+
padding: 5px;
|
722 |
+
border-radius: 3px;
|
723 |
+
-webkit-border-radius: 3px;
|
724 |
+
-moz-border-radius: 3px;
|
725 |
+
}
|
726 |
.type-radio-image .option-tree-ui-radio-images img.option-tree-ui-radio-image-selected,
|
727 |
+
.type-radio-image .option-tree-ui-radio-images img:hover {
|
728 |
+
border-color: #464646;
|
729 |
+
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
730 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
731 |
+
}
|
732 |
+
|
733 |
+
/* --------------------------------------------------
|
734 |
+
:: Numeric Slider
|
735 |
+
---------------------------------------------------*/
|
736 |
+
.type-numeric-slider .format-setting-inner {
|
737 |
+
background: #fcfcfc;
|
738 |
+
border: 1px solid #ccc;
|
739 |
+
min-height: 41px;
|
740 |
+
padding: 5px;
|
741 |
+
-webkit-box-sizing: border-box;
|
742 |
+
-moz-box-sizing: border-box;
|
743 |
+
box-sizing: border-box;
|
744 |
+
-webkit-border-radius: 3px;
|
745 |
+
-moz-border-radius: 3px;
|
746 |
+
border-radius: 3px;
|
747 |
+
}
|
748 |
+
.ot-numeric-slider-wrap {
|
749 |
+
margin: 0 96px 0 0;
|
750 |
+
}
|
751 |
+
.ot-numeric-slider-wrap .ot-numeric-slider-helper-input {
|
752 |
+
position: absolute;
|
753 |
+
right: 5px;
|
754 |
+
text-align: center;
|
755 |
+
top: 5px;
|
756 |
+
width: 90px;
|
757 |
+
}
|
758 |
+
.ot-numeric-slider.ui-slider {
|
759 |
+
background: #fff;
|
760 |
+
border: 1px solid #ccc;
|
761 |
+
margin: 8px 8px 0 8px;
|
762 |
+
position: relative;
|
763 |
+
-webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
764 |
+
-moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
765 |
+
box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.05);
|
766 |
+
-webkit-border-radius: 2px;
|
767 |
+
-moz-border-radius: 2px;
|
768 |
+
border-radius: 2px;
|
769 |
+
}
|
770 |
+
.ot-numeric-slider.ui-slider-horizontal {
|
771 |
+
height: 11px;
|
772 |
+
}
|
773 |
+
.ot-numeric-slider.ui-slider .ui-slider-handle {
|
774 |
+
background-color: #21759b;
|
775 |
+
border: 1px solid #21759b;
|
776 |
+
border-bottom-color: #1e6a8d;
|
777 |
+
cursor: pointer;
|
778 |
+
display: block;
|
779 |
+
height: 27px;
|
780 |
+
margin: -9px -8px;
|
781 |
+
outline: 0;
|
782 |
+
position: absolute;
|
783 |
+
width: 16px;
|
784 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#2a95c5),to(#21759b));
|
785 |
+
background-image: -webkit-linear-gradient(top,#2a95c5,#21759b);
|
786 |
+
background-image: -moz-linear-gradient(top,#2a95c5,#21759b);
|
787 |
+
background-image: -ms-linear-gradient(top,#2a95c5,#21759b);
|
788 |
+
background-image: -o-linear-gradient(top,#2a95c5,#21759b);
|
789 |
+
background-image: linear-gradient(to bottom,#2a95c5,#21759b);
|
790 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
791 |
+
-moz-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
792 |
+
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
793 |
+
-webkit-border-radius: 3px;
|
794 |
+
-moz-border-radius: 3px;
|
795 |
+
border-radius: 3px;
|
796 |
+
}
|
797 |
+
.ot-numeric-slider.ui-slider .ui-slider-handle:hover {
|
798 |
+
background-color: #278ab7;
|
799 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#2e9fd2),to(#21759b));
|
800 |
+
background-image: -webkit-linear-gradient(top,#2e9fd2,#21759b);
|
801 |
+
background-image: -moz-linear-gradient(top,#2e9fd2,#21759b);
|
802 |
+
background-image: -ms-linear-gradient(top,#2e9fd2,#21759b);
|
803 |
+
background-image: -o-linear-gradient(top,#2e9fd2,#21759b);
|
804 |
+
background-image: linear-gradient(to bottom,#2e9fd2,#21759b);
|
805 |
+
border-color: #1b607f;
|
806 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
807 |
+
-moz-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
808 |
+
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
809 |
+
}
|
810 |
+
|
811 |
/* --------------------------------------------------
|
812 |
:: Colorpicker
|
813 |
---------------------------------------------------*/
|
814 |
+
.option-tree-ui-colorpicker-input-wrap {
|
815 |
+
margin-right: 53px;
|
816 |
+
position: relative;
|
817 |
+
width: auto;
|
818 |
+
}
|
819 |
+
.format-settings .cp_box {
|
820 |
+
background: #f1f1f1;
|
821 |
+
border: 1px solid #ccc;
|
822 |
+
bottom: 5px;
|
823 |
+
height: 27px;
|
824 |
+
position: absolute;
|
825 |
+
right: -53px;
|
826 |
+
width: 46px;
|
827 |
+
-moz-border-radius: 2px;
|
828 |
+
-webkit-border-radius: 2px;
|
829 |
+
border-radius: 2px;
|
830 |
+
}
|
831 |
+
.ot_colorpicker {
|
832 |
+
width: 342px;
|
833 |
+
height: 170px;
|
834 |
+
overflow: hidden;
|
835 |
+
position: absolute;
|
836 |
+
background: #fafafa url(../images/colorpicker/color_bg.png);
|
837 |
+
font-family: Arial, Helvetica, sans-serif;
|
838 |
+
display: none;
|
839 |
+
border: 1px solid #bbb;
|
840 |
+
-moz-border-radius: 2px;
|
841 |
+
-webkit-border-radius: 2px;
|
842 |
+
border-radius: 2px;
|
843 |
+
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
844 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
845 |
+
z-index: 100;
|
846 |
+
}
|
847 |
+
.ot_colorpicker .colorpicker_color {
|
848 |
+
width: 150px;
|
849 |
+
height: 150px;
|
850 |
+
left: 10px;
|
851 |
+
top: 10px;
|
852 |
+
position: absolute;
|
853 |
+
background: #f00;
|
854 |
+
overflow: hidden;
|
855 |
+
cursor: crosshair;
|
856 |
+
}
|
857 |
+
.ot_colorpicker .colorpicker_color div {
|
858 |
+
position: absolute;
|
859 |
+
top: 0;
|
860 |
+
left: 0;
|
861 |
+
width: 150px;
|
862 |
+
height: 150px;
|
863 |
+
background: url(../images/colorpicker/color_overlay.png);
|
864 |
+
}
|
865 |
+
.ot_colorpicker .colorpicker_color div div {
|
866 |
+
position: absolute;
|
867 |
+
top: 0;
|
868 |
+
left: 0;
|
869 |
+
width: 11px;
|
870 |
+
height: 11px;
|
871 |
+
overflow: hidden;
|
872 |
+
background: url(../images/colorpicker/color_select.gif);
|
873 |
+
margin: -5px 0 0 -5px;
|
874 |
+
}
|
875 |
+
.ot_colorpicker .colorpicker_hue {
|
876 |
+
position: absolute;
|
877 |
+
top: 10px;
|
878 |
+
left: 164px;
|
879 |
+
width: 35px;
|
880 |
+
height: 150px;
|
881 |
+
cursor: n-resize;
|
882 |
+
}
|
883 |
+
.ot_colorpicker .colorpicker_hue div {
|
884 |
+
position: absolute;
|
885 |
+
width: 35px;
|
886 |
+
height: 9px;
|
887 |
+
overflow: hidden;
|
888 |
+
background: url(../images/colorpicker/color_indicator.png) left top;
|
889 |
+
margin: -5px 0 0 0;
|
890 |
+
}
|
891 |
+
.ot_colorpicker .colorpicker_new_color {
|
892 |
+
position: absolute;
|
893 |
+
width: 60px;
|
894 |
+
height: 30px;
|
895 |
+
right: 80px;
|
896 |
+
top: 10px;
|
897 |
+
background: #f00;
|
898 |
+
}
|
899 |
+
.ot_colorpicker .colorpicker_current_color {
|
900 |
+
position: absolute;
|
901 |
+
width: 60px;
|
902 |
+
height: 30px;
|
903 |
+
right: 10px;
|
904 |
+
top: 10px;
|
905 |
+
background: #f00;
|
906 |
+
}
|
907 |
+
.ot_colorpicker input {
|
908 |
+
background-color: transparent !important;
|
909 |
+
border: 1px solid transparent !important;
|
910 |
+
position: absolute !important;
|
911 |
+
font-size: 10px !important;
|
912 |
+
font-family: Arial, Helvetica, sans-serif !important;
|
913 |
+
color: #666 !important;
|
914 |
+
top: 0px !important;
|
915 |
+
right: 12px !important;
|
916 |
+
text-align: right !important;
|
917 |
+
margin: 0 !important;
|
918 |
+
padding: 0 !important;
|
919 |
+
height: 22px !important;
|
920 |
+
line-height: 22px !important;
|
921 |
+
}
|
922 |
+
.ot_colorpicker .colorpicker_hex {
|
923 |
+
position: absolute;
|
924 |
+
width: 72px;
|
925 |
+
height: 22px;
|
926 |
+
background: url(../images/colorpicker/color_hex.png) top;
|
927 |
+
left: 201px;
|
928 |
+
bottom: 9px;
|
929 |
+
}
|
930 |
+
.ot_colorpicker .colorpicker_hex input {
|
931 |
+
left: 13px;
|
932 |
+
height: 22px;
|
933 |
+
line-height: 22px;
|
934 |
+
padding: 10px;
|
935 |
+
}
|
936 |
+
.ot_colorpicker .colorpicker_field {
|
937 |
+
height: 22px;
|
938 |
+
width: 62px;
|
939 |
+
background-position: top;
|
940 |
+
position: absolute;
|
941 |
+
}
|
942 |
+
.ot_colorpicker .colorpicker_field span {
|
943 |
+
position: absolute;
|
944 |
+
width: 12px;
|
945 |
+
height: 22px;
|
946 |
+
overflow: hidden;
|
947 |
+
top: 0;
|
948 |
+
right: 0;
|
949 |
+
cursor: n-resize;
|
950 |
+
}
|
951 |
+
.ot_colorpicker .colorpicker_rgb_r {
|
952 |
+
background-image: url(../images/colorpicker/color_rgb_r.png);
|
953 |
+
top: 49px;
|
954 |
+
left: 201px;
|
955 |
+
}
|
956 |
+
.ot_colorpicker .colorpicker_rgb_g {
|
957 |
+
background-image: url(../images/colorpicker/color_rgb_g.png);
|
958 |
+
top: 79px;
|
959 |
+
left: 201px;
|
960 |
+
}
|
961 |
+
.ot_colorpicker .colorpicker_rgb_b {
|
962 |
+
background-image: url(../images/colorpicker/color_rgb_b.png);
|
963 |
+
top: 109px;
|
964 |
+
left: 201px;
|
965 |
+
}
|
966 |
+
.ot_colorpicker .colorpicker_hsb_h {
|
967 |
+
background-image: url(../images/colorpicker/color_hsb_h.png);
|
968 |
+
top: 49px;
|
969 |
+
right: 9px;
|
970 |
+
}
|
971 |
+
.ot_colorpicker .colorpicker_hsb_s {
|
972 |
+
background-image: url(../images/colorpicker/color_hsb_s.png);
|
973 |
+
top: 79px;
|
974 |
+
right: 9px;
|
975 |
+
}
|
976 |
+
.ot_colorpicker .colorpicker_hsb_b {
|
977 |
+
background-image: url(../images/colorpicker/color_hsb_b.png);
|
978 |
+
top: 109px;
|
979 |
+
right: 9px;
|
980 |
+
}
|
981 |
+
.ot_colorpicker .colorpicker_submit {
|
982 |
+
position: absolute;
|
983 |
+
width: 16px;
|
984 |
+
height: 16px;
|
985 |
+
background: url(../images/colorpicker/color_wheel.png) top;
|
986 |
+
right: 10px;
|
987 |
+
bottom: 10px;
|
988 |
+
overflow: hidden;
|
989 |
+
}
|
990 |
+
.ot_colorpicker .colorpicker_focus {
|
991 |
+
background-position: center;
|
992 |
+
}
|
993 |
+
.ot_colorpicker .colorpicker_hex.colorpicker_focus {
|
994 |
+
background-position: bottom;
|
995 |
+
}
|
996 |
+
.ot_colorpicker .colorpicker_submit.colorpicker_focus {
|
997 |
+
background-position: bottom;
|
998 |
+
}
|
999 |
+
.ot_colorpicker .colorpicker_slider {
|
1000 |
+
background-position: bottom;
|
1001 |
+
}
|
1002 |
|
1003 |
@media not screen and (1) {
|
1004 |
+
.format-settings .cp_box {
|
1005 |
+
height: 26px;
|
1006 |
+
};
|
1007 |
}
|
1008 |
|
1009 |
/* --------------------------------------------------
|
1010 |
:: OptionTree UI Buttons
|
1011 |
---------------------------------------------------*/
|
1012 |
+
.option-tree-ui-button,
|
1013 |
+
.option-tree-ui-button.blue,
|
1014 |
+
.option-tree-ui-button.red {
|
1015 |
+
display: inline-block;
|
1016 |
+
text-decoration: none;
|
1017 |
+
float: left;
|
1018 |
+
font-size: 12px;
|
1019 |
+
line-height: 28px;
|
1020 |
+
height: 29px;
|
1021 |
+
margin: 5px;
|
1022 |
+
padding: 0 14px 1px;
|
1023 |
+
cursor: pointer;
|
1024 |
+
border-width: 1px;
|
1025 |
+
border-style: solid;
|
1026 |
+
-webkit-appearance: none;
|
1027 |
+
white-space: nowrap;
|
1028 |
+
-webkit-border-radius: 3px;
|
1029 |
+
-moz-border-radius: 3px;
|
1030 |
+
border-radius: 3px;
|
1031 |
+
-webkit-box-sizing: border-box;
|
1032 |
+
-moz-box-sizing: border-box;
|
1033 |
+
box-sizing: border-box;
|
1034 |
+
}
|
1035 |
+
button.option-tree-ui-button::-moz-focus-inner,
|
1036 |
+
input[type="reset"].option-tree-ui-button::-moz-focus-inner,
|
1037 |
+
input[type="button"].option-tree-ui-button::-moz-focus-inner,
|
1038 |
+
input[type="submit"].option-tree-ui-button::-moz-focus-inner {
|
1039 |
+
border-width: 1px 0;
|
1040 |
+
border-style: solid none;
|
1041 |
+
border-color: transparent;
|
1042 |
+
padding: 0;
|
1043 |
+
}
|
1044 |
+
.option-tree-ui-button:active {
|
1045 |
+
outline: 0;
|
1046 |
+
}
|
1047 |
+
.option-tree-ui-button.hidden {
|
1048 |
+
display: none;
|
1049 |
+
}
|
1050 |
+
.option-tree-ui-button,
|
1051 |
+
.option-tree-ui-button.red {
|
1052 |
+
background: #f3f3f3;
|
1053 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#fefefe),to(#f4f4f4));
|
1054 |
+
background-image: -webkit-linear-gradient(top,#fefefe,#f4f4f4);
|
1055 |
+
background-image: -moz-linear-gradient(top,#fefefe,#f4f4f4);
|
1056 |
+
background-image: -o-linear-gradient(top,#fefefe,#f4f4f4);
|
1057 |
+
background-image: linear-gradient(to bottom,#fefefe,#f4f4f4);
|
1058 |
+
border-color: #bbb;
|
1059 |
+
color: #333;
|
1060 |
+
text-shadow: 0 1px 0 #fff;
|
1061 |
+
}
|
1062 |
+
.option-tree-ui-button.hover,
|
1063 |
.option-tree-ui-button:hover,
|
1064 |
+
.option-tree-ui-button.red:hover,
|
1065 |
+
.option-tree-ui-button.focus,
|
1066 |
+
.option-tree-ui-button:focus,
|
1067 |
+
.option-tree-ui-button.red:focus {
|
1068 |
+
background: #f3f3f3;
|
1069 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#f3f3f3));
|
1070 |
+
background-image: -webkit-linear-gradient(top,#fff,#f3f3f3);
|
1071 |
+
background-image: -moz-linear-gradient(top,#fff,#f3f3f3);
|
1072 |
+
background-image: -ms-linear-gradient(top,#fff,#f3f3f3);
|
1073 |
+
background-image: -o-linear-gradient(top,#fff,#f3f3f3);
|
1074 |
+
background-image: linear-gradient(to bottom,#fff,#f3f3f3);
|
1075 |
+
border-color: #999;
|
1076 |
+
color: #222;
|
1077 |
+
}
|
1078 |
+
.option-tree-ui-button.focus,
|
1079 |
+
.option-tree-ui-button:focus,
|
1080 |
+
.option-tree-ui-button.red:focus {
|
1081 |
+
-webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
1082 |
+
box-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
1083 |
+
}
|
1084 |
.option-tree-ui-button.active,
|
1085 |
.option-tree-ui-button.active:hover,
|
1086 |
+
.option-tree-ui-button.active:focus,
|
1087 |
+
.option-tree-ui-button:active,
|
1088 |
+
.option-tree-ui-button.red:active {
|
1089 |
+
background: #eee;
|
1090 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#f4f4f4),to(#fefefe));
|
1091 |
+
background-image: -webkit-linear-gradient(top,#f4f4f4,#fefefe);
|
1092 |
+
background-image: -moz-linear-gradient(top,#f4f4f4,#fefefe);
|
1093 |
+
background-image: -ms-linear-gradient(top,#f4f4f4,#fefefe);
|
1094 |
+
background-image: -o-linear-gradient(top,#f4f4f4,#fefefe);
|
1095 |
+
background-image: linear-gradient(to bottom,#f4f4f4,#fefefe);
|
1096 |
+
border-color: #999;
|
1097 |
+
color: #333;
|
1098 |
+
text-shadow: 0 -1px 0 #fff;
|
1099 |
+
-webkit-box-shadow: inset 0 2px 5px -3px rgba(0,0,0,0.5);
|
1100 |
+
box-shadow: inset 0 2px 5px -3px rgba(0,0,0,0.5);
|
1101 |
+
}
|
1102 |
+
.option-tree-ui-button[disabled],
|
1103 |
+
.option-tree-ui-button:disabled,
|
1104 |
+
.option-tree-ui-button.red[disabled],
|
1105 |
+
.option-tree-ui-button.red:disabled,
|
1106 |
+
.option-tree-ui-button.disabled {
|
1107 |
+
color: #aaa!important;
|
1108 |
+
border-color: #ddd!important;
|
1109 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#f4f4f4))!important;
|
1110 |
+
background-image: -webkit-linear-gradient(top,#f9f9f9,#f4f4f4)!important;
|
1111 |
+
background-image: -moz-linear-gradient(top,#f9f9f9,#f4f4f4)!important;
|
1112 |
+
background-image: -ms-linear-gradient(top,#f9f9f9,#f4f4f4)!important;
|
1113 |
+
background-image: -o-linear-gradient(top,#f9f9f9,#f4f4f4)!important;
|
1114 |
+
background-image: linear-gradient(to bottom,#f9f9f9,#f4f4f4)!important;
|
1115 |
+
-webkit-box-shadow: none!important;
|
1116 |
+
box-shadow: none!important;
|
1117 |
+
text-shadow: 0 1px 0 #fff!important;
|
1118 |
+
cursor: default;
|
1119 |
+
}
|
1120 |
+
.option-tree-ui-button.blue {
|
1121 |
+
background-color: #21759b;
|
1122 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#2a95c5),to(#21759b));
|
1123 |
+
background-image: -webkit-linear-gradient(top,#2a95c5,#21759b);
|
1124 |
+
background-image: -moz-linear-gradient(top,#2a95c5,#21759b);
|
1125 |
+
background-image: -ms-linear-gradient(top,#2a95c5,#21759b);
|
1126 |
+
background-image: -o-linear-gradient(top,#2a95c5,#21759b);
|
1127 |
+
background-image: linear-gradient(to bottom,#2a95c5,#21759b);
|
1128 |
+
border-color: #21759b;
|
1129 |
+
border-bottom-color: #1e6a8d;
|
1130 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
1131 |
+
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
1132 |
+
color: #fff;
|
1133 |
+
text-decoration: none;
|
1134 |
+
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
1135 |
+
}
|
1136 |
+
.option-tree-ui-button.blue.hover,
|
1137 |
+
.option-tree-ui-button.blue:hover,
|
1138 |
+
.option-tree-ui-button.blue.focus,
|
1139 |
+
.option-tree-ui-button.blue:focus {
|
1140 |
+
background-color: #278ab7;
|
1141 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#2e9fd2),to(#21759b));
|
1142 |
+
background-image: -webkit-linear-gradient(top,#2e9fd2,#21759b);
|
1143 |
+
background-image: -moz-linear-gradient(top,#2e9fd2,#21759b);
|
1144 |
+
background-image: -ms-linear-gradient(top,#2e9fd2,#21759b);
|
1145 |
+
background-image: -o-linear-gradient(top,#2e9fd2,#21759b);
|
1146 |
+
background-image: linear-gradient(to bottom,#2e9fd2,#21759b);
|
1147 |
+
border-color: #1b607f;
|
1148 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
1149 |
+
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
1150 |
+
color: #fff;
|
1151 |
+
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
|
1152 |
+
}
|
1153 |
+
.option-tree-ui-button.blue.focus,
|
1154 |
+
.option-tree-ui-button.blue:focus {
|
1155 |
+
border-color: #0e3950;
|
1156 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6),1px 1px 2px rgba(0,0,0,0.4);
|
1157 |
+
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6),1px 1px 2px rgba(0,0,0,0.4);
|
1158 |
+
}
|
1159 |
+
.option-tree-ui-button.blue.active,
|
1160 |
+
.option-tree-ui-button.blue.active:hover,
|
1161 |
+
.option-tree-ui-button.blue.active:focus,
|
1162 |
+
.option-tree-ui-button.blue:active {
|
1163 |
+
background: #1b607f;
|
1164 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#21759b),to(#278ab7));
|
1165 |
+
background-image: -webkit-linear-gradient(top,#21759b,#278ab7);
|
1166 |
+
background-image: -moz-linear-gradient(top,#21759b,#278ab7);
|
1167 |
+
background-image: -ms-linear-gradient(top,#21759b,#278ab7);
|
1168 |
+
background-image: -o-linear-gradient(top,#21759b,#278ab7);
|
1169 |
+
background-image: linear-gradient(to bottom,#21759b,#278ab7);
|
1170 |
+
border-color: #124560 #2382ae #2382ae #2382ae;
|
1171 |
+
color: rgba(255,255,255,0.95);
|
1172 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
1173 |
+
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
1174 |
+
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
1175 |
+
}
|
1176 |
+
.option-tree-ui-button.blue[disabled],
|
1177 |
+
.option-tree-ui-button.blue:disabled,
|
1178 |
+
.option-tree-ui-button.blue-disabled {
|
1179 |
+
color: #94cde7!important;
|
1180 |
+
background: #298cba!important;
|
1181 |
+
border-color: #1b607f!important;
|
1182 |
+
-webkit-box-shadow: none!important;
|
1183 |
+
box-shadow: none!important;
|
1184 |
+
text-shadow: 0 -1px 0 rgba(0,0,0,0.1)!important;
|
1185 |
+
cursor: default;
|
1186 |
+
}
|
1187 |
+
.option-tree-ui-button.red {
|
1188 |
+
background-color: #9b3221;
|
1189 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#c5402a),to(#9b3221));
|
1190 |
+
background-image: -webkit-linear-gradient(top,#c5402a,#9b3221);
|
1191 |
+
background-image: -moz-linear-gradient(top,#c5402a,#9b3221);
|
1192 |
+
background-image: -ms-linear-gradient(top,#c5402a,#9b3221);
|
1193 |
+
background-image: -o-linear-gradient(top,#c5402a,#9b3221);
|
1194 |
+
background-image: linear-gradient(to bottom,#c5402a,#9b3221);
|
1195 |
+
border-color: #9b3221;
|
1196 |
+
border-bottom-color: #8d2e1e;
|
1197 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(229,134,119,0.5);
|
1198 |
+
box-shadow: inset 0 1px 0 rgba(229,134,119,0.5);
|
1199 |
+
color: #fff;
|
1200 |
+
text-decoration: none;
|
1201 |
+
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
1202 |
+
}
|
1203 |
+
.option-tree-ui-button.red.hover,
|
1204 |
+
.option-tree-ui-button.red:hover,
|
1205 |
+
.option-tree-ui-button.red.focus,
|
1206 |
+
.option-tree-ui-button.red:focus {
|
1207 |
+
background-color: #b73b27;
|
1208 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#d2452e),to(#9b3221));
|
1209 |
+
background-image: -webkit-linear-gradient(top,#d2452e,#9b3221);
|
1210 |
+
background-image: -moz-linear-gradient(top,#d2452e,#9b3221);
|
1211 |
+
background-image: -ms-linear-gradient(top,#d2452e,#9b3221);
|
1212 |
+
background-image: -o-linear-gradient(top,#d2452e,#9b3221);
|
1213 |
+
background-image: linear-gradient(to bottom,#d2452e,#9b3221);
|
1214 |
+
border-color: #7f291b;
|
1215 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(229,134,119,0.6);
|
1216 |
+
box-shadow: inset 0 1px 0 rgba(229,134,119,0.6);
|
1217 |
+
color: #fff;
|
1218 |
+
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
|
1219 |
+
}
|
1220 |
+
.option-tree-ui-button.red.focus,
|
1221 |
+
.option-tree-ui-button.red:focus {
|
1222 |
+
border-color: #4f160d;
|
1223 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(229,134,119,0.6),1px 1px 2px rgba(0,0,0,0.4);
|
1224 |
+
box-shadow: inset 0 1px 0 rgba(229,134,119,0.6),1px 1px 2px rgba(0,0,0,0.4);
|
1225 |
+
}
|
1226 |
+
.option-tree-ui-button.red.active,
|
1227 |
+
.option-tree-ui-button.red.active:hover,
|
1228 |
+
.option-tree-ui-button.red.active:focus,
|
1229 |
+
.option-tree-ui-button.red:active {
|
1230 |
+
background: #7f291b;
|
1231 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#9b3221),to(#b73b27));
|
1232 |
+
background-image: -webkit-linear-gradient(top,#9b3221,#b73b27);
|
1233 |
+
background-image: -moz-linear-gradient(top,#9b3221,#b73b27);
|
1234 |
+
background-image: -ms-linear-gradient(top,#9b3221,#b73b27);
|
1235 |
+
background-image: -o-linear-gradient(top,#9b3221,#b73b27);
|
1236 |
+
background-image: linear-gradient(to bottom,#9b3221,#b73b27);
|
1237 |
+
border-color: #611d12 #ad3523 #ad3523 #ad3523;
|
1238 |
+
color: rgba(255,255,255,0.95);
|
1239 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
1240 |
+
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
1241 |
+
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
1242 |
+
}
|
1243 |
+
.option-tree-ui-button.red[disabled],
|
1244 |
+
.option-tree-ui-button.red:disabled,
|
1245 |
+
.option-tree-ui-button.red-disabled {
|
1246 |
+
color: #94cde7!important;
|
1247 |
+
background: #ba3c29!important;
|
1248 |
+
border-color: #7f291b!important;
|
1249 |
+
-webkit-box-shadow: none!important;
|
1250 |
+
box-shadow: none!important;
|
1251 |
+
text-shadow: 0 -1px 0 rgba(0,0,0,0.1)!important;
|
1252 |
+
cursor: default;
|
1253 |
+
}
|
1254 |
+
.option-tree-ui-button.right {
|
1255 |
+
float: right;
|
1256 |
+
}
|
1257 |
+
.option-tree-ui-button.hug-left {
|
1258 |
+
margin-left: 0px;
|
1259 |
+
}
|
1260 |
+
.option-tree-ui-button.hug-right {
|
1261 |
+
margin-right: 0px;
|
1262 |
+
}
|
1263 |
+
.option-tree-ui-button.pad {
|
1264 |
+
padding: 0px 21px;
|
1265 |
+
}
|
1266 |
+
.option-tree-ui-button.left-item {
|
1267 |
+
margin: 5px 0 5px 5px;
|
1268 |
+
-webkit-border-top-right-radius: 0px;
|
1269 |
+
-webkit-border-bottom-right-radius: 0px;
|
1270 |
+
-moz-border-radius-topright: 0px;
|
1271 |
+
-moz-border-radius-bottomright: 0px;
|
1272 |
+
border-top-right-radius: 0px;
|
1273 |
+
border-bottom-right-radius: 0px;
|
1274 |
+
}
|
1275 |
+
.option-tree-ui-button.center-item {
|
1276 |
+
margin: 5px 0 5px -1px;
|
1277 |
+
-webkit-border-radius: 0px;
|
1278 |
+
-moz-border-radius: 0px;
|
1279 |
+
border-radius: 0px;
|
1280 |
+
}
|
1281 |
+
.option-tree-ui-button.right-item {
|
1282 |
+
margin: 5px 5px 5px -1px;
|
1283 |
+
-webkit-border-top-left-radius: 0px;
|
1284 |
+
-webkit-border-bottom-left-radius: 0px;
|
1285 |
+
-moz-border-radius-topleft: 0px;
|
1286 |
+
-moz-border-radius-bottomleft: 0px;
|
1287 |
+
border-top-left-radius: 0px;
|
1288 |
+
border-bottom-left-radius: 0px;
|
1289 |
+
}
|
1290 |
+
.option-tree-ui-buttons {
|
1291 |
+
background: #fff;
|
1292 |
+
border: 1px solid #ccc;
|
1293 |
+
margin: 11px 5px 0 2px;
|
1294 |
+
min-width: 523px;
|
1295 |
+
overflow: hidden;
|
1296 |
+
padding: 5px;
|
1297 |
+
position: relative;
|
1298 |
+
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
1299 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
1300 |
+
-webkit-border-radius: 4px;
|
1301 |
+
-khtml-border-radius: 4px;
|
1302 |
+
-moz-border-radius: 4px;
|
1303 |
+
-o-border-radius: 4px;
|
1304 |
+
border-radius: 4px;
|
1305 |
+
}
|
1306 |
+
.option-tree-ui-buttons.alt {
|
1307 |
+
background: #f5f5f5;
|
1308 |
+
border-color: #dfdfdf;
|
1309 |
+
}
|
1310 |
+
.option-tree-ui-buttons:before,
|
1311 |
+
.option-tree-ui-buttons:after {
|
1312 |
+
content: "\0020";
|
1313 |
+
display: block;
|
1314 |
+
height: 0;
|
1315 |
+
visibility: hidden;
|
1316 |
+
}
|
1317 |
+
.option-tree-ui-buttons:after {
|
1318 |
+
clear: both;
|
1319 |
+
}
|
1320 |
+
.option-tree-ui-buttons {
|
1321 |
+
zoom: 1;
|
1322 |
+
}
|
1323 |
+
button.reset-settings {
|
1324 |
+
position: relative;
|
1325 |
+
top: -45px;
|
1326 |
+
left: 8px;
|
1327 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1328 |
|
1329 |
/* --------------------------------------------------
|
1330 |
:: OptionTree UI Button Icons
|
1331 |
---------------------------------------------------*/
|
1332 |
+
.option-tree-ui-button .icon {
|
1333 |
+
background: url(../images/ot-ui-sprite.png) no-repeat;
|
1334 |
+
display: inline-block;
|
1335 |
+
float: left;
|
1336 |
+
height: 18px;
|
1337 |
+
margin-top: 4px;
|
1338 |
+
opacity: 0.65;
|
1339 |
+
overflow: hidden;
|
1340 |
+
text-indent: -9999px;
|
1341 |
+
width: 18px;
|
1342 |
+
}
|
1343 |
+
button.option-tree-ui-button .icon {
|
1344 |
+
margin-top: -3px;
|
1345 |
+
}
|
1346 |
+
.option-tree-ui-button.light .icon {
|
1347 |
+
background-image: url(../images/ot-ui-light-sprite.png);
|
1348 |
+
opacity: 0.9;
|
1349 |
+
}
|
1350 |
.option-tree-ui-button.active .icon,
|
1351 |
+
.option-tree-ui-button:hover .icon {
|
1352 |
+
opacity: 1;
|
1353 |
+
}
|
1354 |
+
.option-tree-ui-button .icon.right-label {
|
1355 |
+
margin-right: 10px;
|
1356 |
+
}
|
1357 |
+
.option-tree-ui-button .icon.left-label {
|
1358 |
+
margin-left: 10px;
|
1359 |
+
float: right;
|
1360 |
+
}
|
1361 |
+
.option-tree-ui-button .upload {
|
1362 |
+
background-position: -0px -0px;
|
1363 |
+
}
|
1364 |
+
.option-tree-ui-button .trash-can {
|
1365 |
+
background-position: -18px -0px;
|
1366 |
+
}
|
1367 |
+
.option-tree-ui-button .pencil,
|
1368 |
+
.option-tree-ui-button .check {
|
1369 |
+
background-position: -36px -0px;
|
1370 |
+
}
|
1371 |
+
.option-tree-ui-button:hover .pencil,
|
1372 |
+
.option-tree-ui-button:hover .check,
|
1373 |
+
.option-tree-ui-button.active .pencil,
|
1374 |
+
.option-tree-ui-button.active .check {
|
1375 |
+
background-position: -54px -0px;
|
1376 |
+
}
|
assets/images/ot-ui-light-sprite.png
CHANGED
Binary file
|
assets/images/ot-ui-sprite.png
CHANGED
Binary file
|
assets/js/ot-admin.js
CHANGED
@@ -19,6 +19,7 @@
|
|
19 |
this.init_activate_layout();
|
20 |
this.init_upload();
|
21 |
this.init_upload_remove();
|
|
|
22 |
this.init_tabs();
|
23 |
this.init_radio_image_select();
|
24 |
this.init_select_wrapper();
|
@@ -200,12 +201,14 @@
|
|
200 |
this.processing = true;
|
201 |
var count = parseInt(list.children('li').length);
|
202 |
if ( type == 'list_item' ) {
|
203 |
-
list.find('li input.option-tree-setting-title').each(function(){
|
204 |
-
var
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
209 |
}
|
210 |
});
|
211 |
}
|
@@ -285,40 +288,66 @@
|
|
285 |
});
|
286 |
},
|
287 |
init_upload: function() {
|
288 |
-
$('.ot_upload_media').
|
289 |
var field_id = $(this).parent('.option-tree-ui-upload-parent').find('input').attr('id'),
|
290 |
post_id = $(this).attr('rel'),
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
return false;
|
323 |
});
|
324 |
},
|
@@ -347,7 +376,7 @@
|
|
347 |
if (val.match(image)) {
|
348 |
btnContent += '<div class="option-tree-ui-image-wrap"><img src="'+val+'" alt="" /></div>';
|
349 |
}
|
350 |
-
btnContent += '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button" title="'+option_tree.remove_media_text+'"><span class="icon trash-can">'+option_tree.remove_media_text+'</span></a>';
|
351 |
$('#'+id).val(val);
|
352 |
$('#'+id+'_media').remove();
|
353 |
$('#'+id).parent().parent('div').append('<div class="option-tree-ui-media-wrap" id="'+id+'_media" />');
|
@@ -356,14 +385,47 @@
|
|
356 |
$(elm).parent().next('.option-tree-ui-media-wrap').remove();
|
357 |
}
|
358 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
init_tabs: function() {
|
360 |
$(".wrap.settings-wrap .ui-tabs").tabs({
|
361 |
fx: {
|
362 |
opacity: "toggle",
|
363 |
-
duration: "fast"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
}
|
365 |
-
}).bind("tabsselect", function(event, ui) {
|
366 |
-
$("input[name=\'_wp_http_referer\']").val(ui.tab);
|
367 |
});
|
368 |
},
|
369 |
init_radio_image_select: function() {
|
19 |
this.init_activate_layout();
|
20 |
this.init_upload();
|
21 |
this.init_upload_remove();
|
22 |
+
this.init_numeric_slider();
|
23 |
this.init_tabs();
|
24 |
this.init_radio_image_select();
|
25 |
this.init_select_wrapper();
|
201 |
this.processing = true;
|
202 |
var count = parseInt(list.children('li').length);
|
203 |
if ( type == 'list_item' ) {
|
204 |
+
list.find('li input.option-tree-setting-title', self).each(function(){
|
205 |
+
var setting = $(this).attr('name'),
|
206 |
+
regex = /\[([0-9]+)\]/,
|
207 |
+
matches = setting.match(regex),
|
208 |
+
id = null != matches ? parseInt(matches[1]) : 0;
|
209 |
+
id++;
|
210 |
+
if ( id > count) {
|
211 |
+
count = id;
|
212 |
}
|
213 |
});
|
214 |
}
|
288 |
});
|
289 |
},
|
290 |
init_upload: function() {
|
291 |
+
$('.ot_upload_media').on('click', function() {
|
292 |
var field_id = $(this).parent('.option-tree-ui-upload-parent').find('input').attr('id'),
|
293 |
post_id = $(this).attr('rel'),
|
294 |
+
btnContent = '';
|
295 |
+
if ( window.wp && wp.media ) {
|
296 |
+
window.ot_media_frame = window.ot_media_frame || new wp.media.view.MediaFrame.Select({
|
297 |
+
title: $(this).attr('title'),
|
298 |
+
button: {
|
299 |
+
text: option_tree.upload_text
|
300 |
+
},
|
301 |
+
multiple: false
|
302 |
+
});
|
303 |
+
window.ot_media_frame.on('select', function() {
|
304 |
+
var attachment = window.ot_media_frame.state().get('selection').first(),
|
305 |
+
href = attachment.attributes.url,
|
306 |
+
mime = attachment.attributes.mime,
|
307 |
+
regex = /^image\/(?:jpe?g|png|gif|x-icon)$/i;
|
308 |
+
if ( mime.match(regex) ) {
|
309 |
+
btnContent += '<div class="option-tree-ui-image-wrap"><img src="'+href+'" alt="" /></div>';
|
310 |
+
}
|
311 |
+
btnContent += '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button red light" title="'+option_tree.remove_media_text+'"><span class="icon trash-can">'+option_tree.remove_media_text+'</span></a>';
|
312 |
+
$('#'+field_id).val(href);
|
313 |
+
$('#'+field_id+'_media').remove();
|
314 |
+
$('#'+field_id).parent().parent('div').append('<div class="option-tree-ui-media-wrap" id="'+field_id+'_media" />');
|
315 |
+
$('#'+field_id+'_media').append(btnContent).slideDown();
|
316 |
+
window.ot_media_frame.off('select');
|
317 |
+
}).open();
|
318 |
+
} else {
|
319 |
+
var backup = window.send_to_editor,
|
320 |
+
intval = window.setInterval(
|
321 |
+
function() {
|
322 |
+
if ( $('#TB_iframeContent').length > 0 && $('#TB_iframeContent').attr('src').indexOf( "&field_id=" ) !== -1 ) {
|
323 |
+
$('#TB_iframeContent').contents().find('#tab-type_url').hide();
|
324 |
+
}
|
325 |
+
$('#TB_iframeContent').contents().find('.savesend .button').val(option_tree.upload_text);
|
326 |
+
}, 50);
|
327 |
+
tb_show('', 'media-upload.php?post_id='+post_id+'&field_id='+field_id+'&type=image&TB_iframe=1');
|
328 |
+
window.send_to_editor = function(html) {
|
329 |
+
var href = $(html).find('img').attr('src');
|
330 |
+
if ( typeof href == 'undefined') {
|
331 |
+
href = $(html).attr('src');
|
332 |
+
}
|
333 |
+
if ( typeof href == 'undefined') {
|
334 |
+
href = $(html).attr('href');
|
335 |
+
}
|
336 |
+
var image = /\.(?:jpe?g|png|gif|ico)$/i;
|
337 |
+
if (href.match(image) && OT_UI.url_exists(href)) {
|
338 |
+
btnContent += '<div class="option-tree-ui-image-wrap"><img src="'+href+'" alt="" /></div>';
|
339 |
+
}
|
340 |
+
btnContent += '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button red light" title="'+option_tree.remove_media_text+'"><span class="icon trash-can">'+option_tree.remove_media_text+'</span></a>';
|
341 |
+
$('#'+field_id).val(href);
|
342 |
+
$('#'+field_id+'_media').remove();
|
343 |
+
$('#'+field_id).parent().parent('div').append('<div class="option-tree-ui-media-wrap" id="'+field_id+'_media" />');
|
344 |
+
$('#'+field_id+'_media').append(btnContent).slideDown();
|
345 |
+
OT_UI.fix_upload_parent();
|
346 |
+
tb_remove();
|
347 |
+
window.clearInterval(intval);
|
348 |
+
window.send_to_editor = backup;
|
349 |
+
};
|
350 |
+
}
|
351 |
return false;
|
352 |
});
|
353 |
},
|
376 |
if (val.match(image)) {
|
377 |
btnContent += '<div class="option-tree-ui-image-wrap"><img src="'+val+'" alt="" /></div>';
|
378 |
}
|
379 |
+
btnContent += '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button red light" title="'+option_tree.remove_media_text+'"><span class="icon trash-can">'+option_tree.remove_media_text+'</span></a>';
|
380 |
$('#'+id).val(val);
|
381 |
$('#'+id+'_media').remove();
|
382 |
$('#'+id).parent().parent('div').append('<div class="option-tree-ui-media-wrap" id="'+id+'_media" />');
|
385 |
$(elm).parent().next('.option-tree-ui-media-wrap').remove();
|
386 |
}
|
387 |
},
|
388 |
+
init_numeric_slider: function() {
|
389 |
+
$(".ot-numeric-slider-wrap").each(function() {
|
390 |
+
var hidden = $(".ot-numeric-slider-hidden-input", this),
|
391 |
+
value = hidden.val(),
|
392 |
+
helper = $(".ot-numeric-slider-helper-input", this);
|
393 |
+
if ( ! value ) {
|
394 |
+
value = 0;
|
395 |
+
helper.val(value)
|
396 |
+
}
|
397 |
+
$(".ot-numeric-slider", this).slider({
|
398 |
+
min: hidden.data("min"),
|
399 |
+
max: hidden.data("max"),
|
400 |
+
step: hidden.data("step"),
|
401 |
+
value: value,
|
402 |
+
slide: function(event, ui) {
|
403 |
+
hidden.add(helper).val(ui.value);
|
404 |
+
}
|
405 |
+
});
|
406 |
+
});
|
407 |
+
},
|
408 |
init_tabs: function() {
|
409 |
$(".wrap.settings-wrap .ui-tabs").tabs({
|
410 |
fx: {
|
411 |
opacity: "toggle",
|
412 |
+
duration: "fast"
|
413 |
+
}
|
414 |
+
});
|
415 |
+
$(".wrap.settings-wrap .ui-tabs a.ui-tabs-anchor").on("click", function(event, ui) {
|
416 |
+
var obj = "input[name='_wp_http_referer']";
|
417 |
+
if ( $(obj).length > 0 ) {
|
418 |
+
var url = $(obj).val(),
|
419 |
+
hash = $(this).attr('href');
|
420 |
+
if ( url.indexOf("#") != -1 ) {
|
421 |
+
var o = url.split("#")[1],
|
422 |
+
n = hash.split("#")[1];
|
423 |
+
url = url.replace(o, n);
|
424 |
+
} else {
|
425 |
+
url = url + hash;
|
426 |
+
}
|
427 |
+
$(obj).val(url);
|
428 |
}
|
|
|
|
|
429 |
});
|
430 |
},
|
431 |
init_radio_image_select: function() {
|
includes/ot-functions-admin.php
CHANGED
@@ -7,10 +7,380 @@
|
|
7 |
*
|
8 |
* @package OptionTree
|
9 |
* @author Derek Herman <derek@valendesigns.com>
|
10 |
-
* @copyright Copyright (c)
|
11 |
* @since 2.0
|
12 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* Runs directly after the Theme Options are save.
|
16 |
*
|
@@ -27,7 +397,7 @@ if ( ! function_exists( 'ot_after_theme_options_save' ) ) {
|
|
27 |
$updated = isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ? true : false;
|
28 |
|
29 |
/* only execute after the theme options are saved */
|
30 |
-
if ( 'ot-theme-options' == $page && $updated ) {
|
31 |
|
32 |
/* grab a copy of the theme options */
|
33 |
$options = get_option( 'option_tree' );
|
@@ -52,6 +422,7 @@ if ( ! function_exists( 'ot_after_theme_options_save' ) ) {
|
|
52 |
* @param mixed Setting value
|
53 |
* @param string Setting type
|
54 |
* @param string Setting field ID
|
|
|
55 |
* @return mixed
|
56 |
*
|
57 |
* @access public
|
@@ -59,7 +430,7 @@ if ( ! function_exists( 'ot_after_theme_options_save' ) ) {
|
|
59 |
*/
|
60 |
if ( ! function_exists( 'ot_validate_setting' ) ) {
|
61 |
|
62 |
-
function ot_validate_setting( $input, $type, $field_id ) {
|
63 |
|
64 |
/* exit early if missing data */
|
65 |
if ( ! $input || ! $type || ! $field_id )
|
@@ -67,6 +438,28 @@ if ( ! function_exists( 'ot_validate_setting' ) ) {
|
|
67 |
|
68 |
$input = apply_filters( 'ot_validate_setting', $input, $type, $field_id );
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
if ( 'background' == $type ) {
|
71 |
|
72 |
$input['background-color'] = ot_validate_setting( $input['background-color'], 'colorpicker', $field_id );
|
@@ -148,12 +541,20 @@ if ( ! function_exists( 'ot_admin_scripts' ) ) {
|
|
148 |
|
149 |
function ot_admin_scripts() {
|
150 |
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
/* load the colorpicker */
|
155 |
wp_enqueue_script( 'ot-colorpicker-js', OT_URL . 'assets/js/ot-colorpicker.js', array( 'jquery' ), OT_VERSION );
|
156 |
|
|
|
|
|
|
|
157 |
/* load all the required scripts */
|
158 |
wp_enqueue_script( 'ot-admin-js', OT_URL . 'assets/js/ot-admin.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-sortable', 'media-upload', 'thickbox' ), OT_VERSION );
|
159 |
|
@@ -220,7 +621,7 @@ if ( ! function_exists( 'ot_create_media_post' ) ) {
|
|
220 |
'hierarchical' => false,
|
221 |
'rewrite' => false,
|
222 |
'supports' => array( 'title', 'editor' ),
|
223 |
-
'can_export' =>
|
224 |
'show_in_nav_menus' => false
|
225 |
) );
|
226 |
|
@@ -933,6 +1334,7 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
933 |
$_rows = isset( $value['rows'] ) ? $value['rows'] : '';
|
934 |
$_post_type = isset( $value['post_type'] ) ? $value['post_type'] : '';
|
935 |
$_taxonomy = isset( $value['taxonomy'] ) ? $value['taxonomy'] : '';
|
|
|
936 |
$_class = isset( $value['class'] ) ? $value['class'] : '';
|
937 |
|
938 |
$choices = '';
|
@@ -976,6 +1378,7 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
976 |
$_setting_rows = isset( $setting['rows'] ) ? $setting['rows'] : '';
|
977 |
$_setting_post_type = isset( $setting['post_type'] ) ? $setting['post_type'] : '';
|
978 |
$_setting_taxonomy = isset( $setting['taxonomy'] ) ? $setting['taxonomy'] : '';
|
|
|
979 |
$_setting_class = isset( $setting['class'] ) ? $setting['class'] : '';
|
980 |
|
981 |
$setting_choices = '';
|
@@ -1018,6 +1421,7 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
1018 |
'rows' => '$_setting_rows',
|
1019 |
'post_type' => '$_setting_post_type',
|
1020 |
'taxonomy' => '$_setting_taxonomy',
|
|
|
1021 |
'class' => '$_setting_class'$setting_choices
|
1022 |
),";
|
1023 |
}
|
@@ -1038,6 +1442,7 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
1038 |
'rows' => '$_rows',
|
1039 |
'post_type' => '$_post_type',
|
1040 |
'taxonomy' => '$_taxonomy',
|
|
|
1041 |
'class' => '$_class'$choices$setting_settings
|
1042 |
),";
|
1043 |
}
|
@@ -1117,7 +1522,7 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
1117 |
foreach( $settings['sections'] as $k => $section ) {
|
1118 |
|
1119 |
/* remove from array if missing values */
|
1120 |
-
if ( ! $section['title'] && ! $section['id'] ) {
|
1121 |
|
1122 |
unset( $settings['sections'][$k] );
|
1123 |
|
@@ -1131,12 +1536,12 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
1131 |
}
|
1132 |
|
1133 |
/* missing title set to unfiltered ID */
|
1134 |
-
if ( ! $section['title'] ) {
|
1135 |
|
1136 |
$settings['sections'][$k]['title'] = wp_kses_post( $section['id'] );
|
1137 |
|
1138 |
/* missing ID set to title */
|
1139 |
-
} else if ( ! $section['id'] ) {
|
1140 |
|
1141 |
$section['id'] = wp_kses_post( $section['title'] );
|
1142 |
|
@@ -1170,7 +1575,7 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
1170 |
foreach( $settings['contextual_help']['content'] as $k => $content ) {
|
1171 |
|
1172 |
/* remove from array if missing values */
|
1173 |
-
if ( ! $content['title'] && ! $content['id'] ) {
|
1174 |
|
1175 |
unset( $settings['contextual_help']['content'][$k] );
|
1176 |
|
@@ -1184,12 +1589,12 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
1184 |
}
|
1185 |
|
1186 |
/* missing title set to unfiltered ID */
|
1187 |
-
if ( ! $content['title'] ) {
|
1188 |
|
1189 |
$settings['contextual_help']['content'][$k]['title'] = wp_kses_post( $content['id'] );
|
1190 |
|
1191 |
/* missing ID set to title */
|
1192 |
-
} else if ( ! $content['id'] ) {
|
1193 |
|
1194 |
$content['id'] = wp_kses_post( $content['title'] );
|
1195 |
|
@@ -1218,7 +1623,6 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
1218 |
|
1219 |
}
|
1220 |
|
1221 |
-
|
1222 |
$settings['contextual_help'] = ot_stripslashes( $settings['contextual_help'] );
|
1223 |
|
1224 |
/* default message */
|
@@ -1227,6 +1631,59 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
1227 |
/* is array: save & show success message */
|
1228 |
if ( is_array( $settings ) ) {
|
1229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1230 |
update_option( 'option_tree_settings', $settings );
|
1231 |
$message = 'success';
|
1232 |
|
@@ -1271,7 +1728,7 @@ if ( ! function_exists( 'ot_validate_settings_array' ) ) {
|
|
1271 |
|
1272 |
|
1273 |
/* remove from array if missing values */
|
1274 |
-
if ( ! $setting['label'] && ! $setting['id'] ) {
|
1275 |
|
1276 |
unset( $settings[$k] );
|
1277 |
|
@@ -1285,12 +1742,12 @@ if ( ! function_exists( 'ot_validate_settings_array' ) ) {
|
|
1285 |
}
|
1286 |
|
1287 |
/* missing label set to unfiltered ID */
|
1288 |
-
if ( ! $setting['label'] ) {
|
1289 |
|
1290 |
$settings[$k]['label'] = $setting['id'];
|
1291 |
|
1292 |
/* missing ID set to label */
|
1293 |
-
} else if ( ! $setting['id'] ) {
|
1294 |
|
1295 |
$setting['id'] = wp_kses_post( $setting['label'] );
|
1296 |
|
@@ -1315,19 +1772,19 @@ if ( ! function_exists( 'ot_validate_settings_array' ) ) {
|
|
1315 |
foreach( $setting['choices'] as $ck => $choice ) {
|
1316 |
|
1317 |
/* remove from array if missing values */
|
1318 |
-
if ( ! $choice['label'] && ! $choice['value'] ) {
|
1319 |
|
1320 |
unset( $setting['choices'][$ck] );
|
1321 |
|
1322 |
} else {
|
1323 |
|
1324 |
/* missing label set to unfiltered ID */
|
1325 |
-
if ( ! $choice['label'] ) {
|
1326 |
|
1327 |
$setting['choices'][$ck]['label'] = wp_kses_post( $choice['value'] );
|
1328 |
|
1329 |
/* missing value set to label */
|
1330 |
-
} else if ( ! $choice['value'] ) {
|
1331 |
|
1332 |
$setting['choices'][$ck]['value'] = ot_sanitize_option_id( wp_kses_post( $choice['label'] ) );
|
1333 |
|
@@ -1388,12 +1845,12 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
|
|
1388 |
if ( is_array( $layouts ) && ! empty( $layouts ) ) {
|
1389 |
|
1390 |
/* setup active layout */
|
1391 |
-
if ( isset( $layouts['active_layout'] ) &&
|
1392 |
$rebuild['active_layout'] = $layouts['active_layout'];
|
1393 |
}
|
1394 |
|
1395 |
/* add new and overwrite active layout */
|
1396 |
-
if ( isset( $layouts['_add_new_layout_'] ) &&
|
1397 |
$rebuild['active_layout'] = ot_sanitize_layout_id( $layouts['_add_new_layout_'] );
|
1398 |
$rebuild[$rebuild['active_layout']] = ot_encode( serialize( get_option( 'option_tree' ) ) );
|
1399 |
}
|
@@ -1408,7 +1865,7 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
|
|
1408 |
continue;
|
1409 |
|
1410 |
/* check if the key exists then set value */
|
1411 |
-
if ( isset( $option_tree_layouts[$key] ) ) {
|
1412 |
$rebuild[$key] = $option_tree_layouts[$key];
|
1413 |
if ( '' == $first_layout ) {
|
1414 |
$first_layout = $key;
|
@@ -1417,8 +1874,7 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
|
|
1417 |
|
1418 |
}
|
1419 |
|
1420 |
-
|
1421 |
-
if ( ! isset( $rebuild[$rebuild['active_layout']] ) && '' != $first_layout ) {
|
1422 |
$rebuild['active_layout'] = $first_layout;
|
1423 |
}
|
1424 |
|
@@ -1429,7 +1885,7 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
|
|
1429 |
|
1430 |
/* is array: save & show success message */
|
1431 |
if ( count( $rebuild ) > 1 ) {
|
1432 |
-
|
1433 |
/* rebuild the theme options */
|
1434 |
$rebuild_option_tree = unserialize( ot_decode( $rebuild[$rebuild['active_layout']] ) );
|
1435 |
if ( is_array( $rebuild_option_tree ) ) {
|
@@ -1448,7 +1904,7 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
|
|
1448 |
$message = 'success';
|
1449 |
|
1450 |
} else if ( count( $rebuild ) <= 1 ) {
|
1451 |
-
|
1452 |
/* delete layouts option */
|
1453 |
delete_option( 'option_tree_layouts' );
|
1454 |
|
@@ -1458,7 +1914,7 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
|
|
1458 |
}
|
1459 |
|
1460 |
/* redirect */
|
1461 |
-
if ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'ot-theme-options' ) {
|
1462 |
$query_args = add_query_arg( array( 'settings-updated' => 'layout' ), remove_query_arg( array( 'action', 'message' ), $_POST['_wp_http_referer'] ) );
|
1463 |
} else {
|
1464 |
$query_args = add_query_arg( array( 'action' => 'save-layouts', 'message' => $message ), $_POST['_wp_http_referer'] );
|
@@ -1490,96 +1946,93 @@ if ( ! function_exists( 'ot_alert_message' ) ) {
|
|
1490 |
if ( empty( $page ) )
|
1491 |
return false;
|
1492 |
|
1493 |
-
$current_page = isset( $_REQUEST['page'] ) ? $_REQUEST['page'] : '';
|
1494 |
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
|
1495 |
$message = isset( $_REQUEST['message'] ) ? $_REQUEST['message'] : '';
|
|
|
1496 |
|
1497 |
-
|
1498 |
-
if ( $current_page == 'ot-theme-options' ) {
|
1499 |
|
1500 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1501 |
|
1502 |
-
|
|
|
|
|
1503 |
|
1504 |
-
|
1505 |
-
|
1506 |
-
return '<div id="message" class="updated fade below-h2"><p>' . $page['updated_message'] . '</p></div>';
|
1507 |
|
1508 |
-
} else if (
|
1509 |
-
|
1510 |
-
return '<div id="message" class="
|
1511 |
|
1512 |
}
|
|
|
1513 |
|
1514 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1515 |
|
1516 |
-
|
1517 |
-
if ( $current_page == 'ot-settings' ) {
|
1518 |
|
1519 |
-
if ( $
|
1520 |
-
|
1521 |
-
if ( $message == 'success' ) {
|
1522 |
-
|
1523 |
-
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Settings updated.', 'option-tree' ) . '</p></div>';
|
1524 |
-
|
1525 |
-
} else if ( $message == 'failed' ) {
|
1526 |
-
|
1527 |
-
return '<div id="message" class="error fade below-h2"><p>' . __( 'Settings could not be saved.', 'option-tree' ) . '</p></div>';
|
1528 |
-
|
1529 |
-
}
|
1530 |
|
1531 |
-
|
1532 |
|
1533 |
-
|
1534 |
-
|
1535 |
-
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Settings Imported.', 'option-tree' ) . '</p></div>';
|
1536 |
-
|
1537 |
-
} else if ( $message == 'failed' ) {
|
1538 |
-
|
1539 |
-
return '<div id="message" class="error fade below-h2"><p>' . __( 'Settings could not be imported.', 'option-tree' ) . '</p></div>';
|
1540 |
-
|
1541 |
-
}
|
1542 |
-
} else if ( $action == 'import-data' ) {
|
1543 |
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
return '<div id="message" class="error fade below-h2"><p>' . __( 'Data could not be imported.', 'option-tree' ) . '</p></div>';
|
1551 |
-
|
1552 |
-
}
|
1553 |
|
1554 |
-
|
1555 |
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
} else if ( $action == 'save-layouts' ) {
|
1567 |
|
1568 |
-
if ( $message == 'success' ) {
|
1569 |
-
|
1570 |
-
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Layouts Updated.', 'option-tree' ) . '</p></div>';
|
1571 |
-
|
1572 |
-
} else if ( $message == 'failed' ) {
|
1573 |
-
|
1574 |
-
return '<div id="message" class="error fade below-h2"><p>' . __( 'Layouts could not be updated.', 'option-tree' ) . '</p></div>';
|
1575 |
-
|
1576 |
-
}
|
1577 |
-
|
1578 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1579 |
|
|
|
|
|
1580 |
}
|
1581 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1582 |
return false;
|
|
|
1583 |
}
|
1584 |
|
1585 |
}
|
@@ -1611,6 +2064,7 @@ if ( ! function_exists( 'ot_option_types_array' ) ) {
|
|
1611 |
'custom-post-type-select' => 'Custom Post Type Select',
|
1612 |
'list-item' => 'List Item',
|
1613 |
'measurement' => 'Measurement',
|
|
|
1614 |
'page-checkbox' => 'Page Checkbox',
|
1615 |
'page-select' => 'Page Select',
|
1616 |
'post-checkbox' => 'Post Checkbox',
|
@@ -1618,6 +2072,7 @@ if ( ! function_exists( 'ot_option_types_array' ) ) {
|
|
1618 |
'radio' => 'Radio',
|
1619 |
'radio-image' => 'Radio Image',
|
1620 |
'select' => 'Select',
|
|
|
1621 |
'slider' => 'Slider',
|
1622 |
'tag-checkbox' => 'Tag Checkbox',
|
1623 |
'tag-select' => 'Tag Select',
|
@@ -2723,9 +3178,9 @@ if ( ! function_exists( 'ot_sections_view' ) ) {
|
|
2723 |
<div class="open">' . ( isset( $section['title'] ) ? esc_attr( $section['title'] ) : 'Section ' . ( $key + 1 ) ) . '</div>
|
2724 |
<div class="button-section">
|
2725 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'edit', 'option-tree' ) . '">
|
2726 |
-
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
2727 |
</a>
|
2728 |
-
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
2729 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
2730 |
</a>
|
2731 |
</div>
|
@@ -2793,7 +3248,7 @@ if ( ! function_exists( 'ot_settings_view' ) ) {
|
|
2793 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
2794 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
2795 |
</a>
|
2796 |
-
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
2797 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
2798 |
</a>
|
2799 |
</div>
|
@@ -2887,6 +3342,14 @@ if ( ! function_exists( 'ot_settings_view' ) ) {
|
|
2887 |
</div>
|
2888 |
</div>
|
2889 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2890 |
<div class="format-settings">
|
2891 |
<div class="format-setting type-text wide-desc">
|
2892 |
<div class="description">' . __( '<strong>CSS Class</strong>: Add and optional class to this option type.', 'option-tree' ) . '</div>
|
@@ -2929,7 +3392,7 @@ if ( ! function_exists( 'ot_choices_view' ) ) {
|
|
2929 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
2930 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
2931 |
</a>
|
2932 |
-
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
2933 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
2934 |
</a>
|
2935 |
</div>
|
@@ -2960,7 +3423,7 @@ if ( ! function_exists( 'ot_choices_view' ) ) {
|
|
2960 |
</div>
|
2961 |
<div class="format-setting type-text wide-desc">
|
2962 |
<div class="format-setting-inner">
|
2963 |
-
<input type="text" name="' . esc_attr( $name ) . '[choices][' . esc_attr( $key ) . '][src]" value="' . ( isset( $choice['src'] ) ?
|
2964 |
</div>
|
2965 |
</div>
|
2966 |
</div>
|
@@ -2995,7 +3458,7 @@ if ( ! function_exists( 'ot_contextual_help_view' ) ) {
|
|
2995 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
2996 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
2997 |
</a>
|
2998 |
-
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
2999 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3000 |
</a>
|
3001 |
</div>
|
@@ -3054,7 +3517,7 @@ if ( ! function_exists( 'ot_layouts_view' ) ) {
|
|
3054 |
<a href="javascript:void(0);" class="option-tree-layout-activate option-tree-ui-button left-item' . ( $active_layout == $key ? ' active' : '' ) . '" title="' . __( 'Activate', 'option-tree' ) . '">
|
3055 |
<span class="icon check">' . __( 'Activate', 'option-tree' ) . '</span>
|
3056 |
</a>
|
3057 |
-
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button right-item" title="'. __( 'Delete', 'option-tree' ) . '">
|
3058 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3059 |
</a>
|
3060 |
</div>
|
@@ -3118,12 +3581,12 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
3118 |
|
3119 |
echo '
|
3120 |
<div class="option-tree-setting">
|
3121 |
-
<div class="open">' . ( isset( $list_item['title'] ) ? esc_attr( $list_item['title'] ) : '
|
3122 |
<div class="button-section">
|
3123 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
3124 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
3125 |
</a>
|
3126 |
-
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
3127 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3128 |
</a>
|
3129 |
</div>
|
@@ -3153,6 +3616,7 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
3153 |
'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10,
|
3154 |
'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
|
3155 |
'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
|
|
|
3156 |
'field_class' => isset( $field['class'] ) ? $field['class'] : '',
|
3157 |
'field_choices' => isset( $field['choices'] ) && ! empty( $field['choices'] ) ? $field['choices'] : array(),
|
3158 |
'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(),
|
@@ -3164,7 +3628,7 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
3164 |
echo '<div class="format-settings">';
|
3165 |
|
3166 |
/* don't show title with textblocks */
|
3167 |
-
if ( $_args['type'] != 'textblock' ) {
|
3168 |
echo '<div class="format-setting-label">';
|
3169 |
echo '<h3 class="label">' . esc_attr( $field['label'] ) . '</h3>';
|
3170 |
echo '</div>';
|
@@ -3201,7 +3665,7 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
3201 |
*/
|
3202 |
if ( ! function_exists( 'ot_theme_options_layouts_form' ) ) {
|
3203 |
|
3204 |
-
function ot_theme_options_layouts_form() {
|
3205 |
|
3206 |
echo '<form method="post" id="option-tree-options-layouts-form">';
|
3207 |
|
@@ -3213,34 +3677,28 @@ if ( ! function_exists( 'ot_theme_options_layouts_form' ) ) {
|
|
3213 |
|
3214 |
/* set active layout */
|
3215 |
$active_layout = isset( $layouts['active_layout'] ) ? $layouts['active_layout'] : '';
|
3216 |
-
|
3217 |
-
/* new layout wrapper */
|
3218 |
-
echo '<div class="option-tree-save-layout">';
|
3219 |
-
|
3220 |
-
/* add new layout */
|
3221 |
-
echo '<input type="text" name="option_tree_layouts[_add_new_layout_]" value="" class="widefat option-tree-ui-input" autocomplete="off" />';
|
3222 |
-
|
3223 |
-
echo '<button type="submit" class="option-tree-ui-button blue light save-layout" title="' . __( 'New Layout', 'option-tree' ) . '">' . __( 'New Layout', 'option-tree' ) . '</button>';
|
3224 |
-
|
3225 |
-
echo '</div>';
|
3226 |
-
|
3227 |
if ( is_array( $layouts ) && count( $layouts ) > 1 ) {
|
3228 |
|
3229 |
$active_layout = esc_attr( $layouts['active_layout'] );
|
3230 |
|
3231 |
echo '<input type="hidden" id="the_current_layout" value="' . $active_layout . '" />';
|
3232 |
|
3233 |
-
echo '<
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
|
|
|
|
|
|
|
|
3244 |
|
3245 |
foreach( $layouts as $key => $data ) {
|
3246 |
|
@@ -3253,6 +3711,16 @@ if ( ! function_exists( 'ot_theme_options_layouts_form' ) ) {
|
|
3253 |
|
3254 |
}
|
3255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3256 |
echo '</form>';
|
3257 |
|
3258 |
}
|
@@ -3613,7 +4081,7 @@ function ot_filter_std_value( $value = '', $std = '' ) {
|
|
3613 |
|
3614 |
foreach( $value as $k => $v ) {
|
3615 |
|
3616 |
-
if (
|
3617 |
|
3618 |
$value[$k] = $std[$k];
|
3619 |
|
@@ -3621,7 +4089,7 @@ function ot_filter_std_value( $value = '', $std = '' ) {
|
|
3621 |
|
3622 |
}
|
3623 |
|
3624 |
-
} else if (
|
3625 |
|
3626 |
$value = $std;
|
3627 |
|
@@ -3631,5 +4099,37 @@ function ot_filter_std_value( $value = '', $std = '' ) {
|
|
3631 |
|
3632 |
}
|
3633 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3634 |
/* End of file ot-functions-admin.php */
|
3635 |
-
/* Location: ./includes/ot-functions-admin.php */
|
7 |
*
|
8 |
* @package OptionTree
|
9 |
* @author Derek Herman <derek@valendesigns.com>
|
10 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
11 |
* @since 2.0
|
12 |
*/
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Registers the Theme Option page
|
16 |
+
*
|
17 |
+
* @uses ot_register_settings()
|
18 |
+
*
|
19 |
+
* @return void
|
20 |
+
*
|
21 |
+
* @access public
|
22 |
+
* @since 2.1
|
23 |
+
*/
|
24 |
+
if ( ! function_exists( 'ot_register_theme_options_page' ) ) {
|
25 |
+
|
26 |
+
function ot_register_theme_options_page() {
|
27 |
+
|
28 |
+
/* get the settings array */
|
29 |
+
$get_settings = get_option( 'option_tree_settings' );
|
30 |
+
|
31 |
+
/* sections array */
|
32 |
+
$sections = isset( $get_settings['sections'] ) ? $get_settings['sections'] : array();
|
33 |
+
|
34 |
+
/* settings array */
|
35 |
+
$settings = isset( $get_settings['settings'] ) ? $get_settings['settings'] : array();
|
36 |
+
|
37 |
+
/* contexual_help array */
|
38 |
+
$contextual_help = isset( $get_settings['contextual_help'] ) ? $get_settings['contextual_help'] : array();
|
39 |
+
|
40 |
+
/* build the Theme Options */
|
41 |
+
if ( function_exists( 'ot_register_settings' ) && OT_USE_THEME_OPTIONS ) {
|
42 |
+
|
43 |
+
ot_register_settings( array(
|
44 |
+
array(
|
45 |
+
'id' => 'option_tree',
|
46 |
+
'pages' => array(
|
47 |
+
array(
|
48 |
+
'id' => 'ot_theme_options',
|
49 |
+
'parent_slug' => apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ),
|
50 |
+
'page_title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
|
51 |
+
'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'Theme Options', 'option-tree' ) ),
|
52 |
+
'capability' => $caps = apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ),
|
53 |
+
'menu_slug' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ),
|
54 |
+
'icon_url' => apply_filters( 'ot_theme_options_icon_url', null ),
|
55 |
+
'position' => apply_filters( 'ot_theme_options_position', null ),
|
56 |
+
'updated_message' => apply_filters( 'ot_theme_options_updated_message', __( 'Theme Options updated.', 'option-tree' ) ),
|
57 |
+
'reset_message' => apply_filters( 'ot_theme_options_reset_message', __( 'Theme Options reset.', 'option-tree' ) ),
|
58 |
+
'button_text' => apply_filters( 'ot_theme_options_button_text', __( 'Save Changes', 'option-tree' ) ),
|
59 |
+
'screen_icon' => 'themes',
|
60 |
+
'contextual_help' => $contextual_help,
|
61 |
+
'sections' => $sections,
|
62 |
+
'settings' => $settings
|
63 |
+
)
|
64 |
+
)
|
65 |
+
)
|
66 |
+
)
|
67 |
+
);
|
68 |
+
|
69 |
+
// Filters the options.php to add the minimum user capabilities.
|
70 |
+
add_filter( 'option_page_capability_option_tree', create_function( '$caps', "return '$caps';" ), 999 );
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
75 |
+
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Registers the Settings page
|
80 |
+
*
|
81 |
+
* @uses ot_register_settings()
|
82 |
+
*
|
83 |
+
* @return void
|
84 |
+
*
|
85 |
+
* @access public
|
86 |
+
* @since 2.1
|
87 |
+
*/
|
88 |
+
if ( ! function_exists( 'ot_register_settings_page' ) ) {
|
89 |
+
|
90 |
+
function ot_register_settings_page() {
|
91 |
+
|
92 |
+
// Create the filterable pages array
|
93 |
+
$ot_register_pages_array = array(
|
94 |
+
array(
|
95 |
+
'id' => 'ot',
|
96 |
+
'page_title' => __( 'OptionTree', 'option-tree' ),
|
97 |
+
'menu_title' => __( 'OptionTree', 'option-tree' ),
|
98 |
+
'capability' => 'edit_theme_options',
|
99 |
+
'menu_slug' => 'ot-settings',
|
100 |
+
'icon_url' => OT_URL . '/assets/images/ot-logo-mini.png',
|
101 |
+
'position' => 61,
|
102 |
+
'hidden_page' => true
|
103 |
+
),
|
104 |
+
array(
|
105 |
+
'id' => 'settings',
|
106 |
+
'parent_slug' => 'ot-settings',
|
107 |
+
'page_title' => __( 'Settings', 'option-tree' ),
|
108 |
+
'menu_title' => __( 'Settings', 'option-tree' ),
|
109 |
+
'capability' => 'edit_theme_options',
|
110 |
+
'menu_slug' => 'ot-settings',
|
111 |
+
'icon_url' => null,
|
112 |
+
'position' => null,
|
113 |
+
'updated_message' => __( 'Theme Options updated.', 'option-tree' ),
|
114 |
+
'reset_message' => __( 'Theme Options reset.', 'option-tree' ),
|
115 |
+
'button_text' => __( 'Save Settings', 'option-tree' ),
|
116 |
+
'show_buttons' => false,
|
117 |
+
'screen_icon' => 'themes',
|
118 |
+
'sections' => array(
|
119 |
+
array(
|
120 |
+
'id' => 'create_setting',
|
121 |
+
'title' => __( 'Theme Options UI', 'option-tree' )
|
122 |
+
),
|
123 |
+
array(
|
124 |
+
'id' => 'import',
|
125 |
+
'title' => __( 'Import', 'option-tree' )
|
126 |
+
),
|
127 |
+
array(
|
128 |
+
'id' => 'export',
|
129 |
+
'title' => __( 'Export', 'option-tree' )
|
130 |
+
),
|
131 |
+
array(
|
132 |
+
'id' => 'layouts',
|
133 |
+
'title' => __( 'Layouts', 'option-tree' )
|
134 |
+
)
|
135 |
+
),
|
136 |
+
'settings' => array(
|
137 |
+
array(
|
138 |
+
'id' => 'theme_options_ui_text',
|
139 |
+
'label' => __( 'Theme Options UI Builder', 'option-tree' ),
|
140 |
+
'type' => 'theme_options_ui',
|
141 |
+
'section' => 'create_setting'
|
142 |
+
),
|
143 |
+
array(
|
144 |
+
'id' => 'import_xml_text',
|
145 |
+
'label' => __( 'Settings XML', 'option-tree' ),
|
146 |
+
'type' => 'import-xml',
|
147 |
+
'section' => 'import'
|
148 |
+
),
|
149 |
+
array(
|
150 |
+
'id' => 'import_settings_text',
|
151 |
+
'label' => __( 'Settings', 'option-tree' ),
|
152 |
+
'type' => 'import-settings',
|
153 |
+
'section' => 'import'
|
154 |
+
),
|
155 |
+
array(
|
156 |
+
'id' => 'import_data_text',
|
157 |
+
'label' => __( 'Theme Options', 'option-tree' ),
|
158 |
+
'type' => 'import-data',
|
159 |
+
'section' => 'import'
|
160 |
+
),
|
161 |
+
array(
|
162 |
+
'id' => 'import_layouts_text',
|
163 |
+
'label' => __( 'Layouts', 'option-tree' ),
|
164 |
+
'type' => 'import-layouts',
|
165 |
+
'section' => 'import'
|
166 |
+
),
|
167 |
+
array(
|
168 |
+
'id' => 'export_settings_file_text',
|
169 |
+
'label' => __( 'Settings PHP File', 'option-tree' ),
|
170 |
+
'type' => 'export-settings-file',
|
171 |
+
'section' => 'export'
|
172 |
+
),
|
173 |
+
array(
|
174 |
+
'id' => 'export_settings_text',
|
175 |
+
'label' => __( 'Settings', 'option-tree' ),
|
176 |
+
'type' => 'export-settings',
|
177 |
+
'section' => 'export'
|
178 |
+
),
|
179 |
+
array(
|
180 |
+
'id' => 'export_data_text',
|
181 |
+
'label' => __( 'Theme Options', 'option-tree' ),
|
182 |
+
'type' => 'export-data',
|
183 |
+
'section' => 'export'
|
184 |
+
),
|
185 |
+
array(
|
186 |
+
'id' => 'export_layout_text',
|
187 |
+
'label' => __( 'Layouts', 'option-tree' ),
|
188 |
+
'type' => 'export-layouts',
|
189 |
+
'section' => 'export'
|
190 |
+
),
|
191 |
+
array(
|
192 |
+
'id' => 'modify_layouts_text',
|
193 |
+
'label' => __( 'Layout Management', 'option-tree' ),
|
194 |
+
'type' => 'modify-layouts',
|
195 |
+
'section' => 'layouts'
|
196 |
+
)
|
197 |
+
)
|
198 |
+
),
|
199 |
+
array(
|
200 |
+
'id' => 'documentation',
|
201 |
+
'parent_slug' => 'ot-settings',
|
202 |
+
'page_title' => __( 'Documentation', 'option-tree' ),
|
203 |
+
'menu_title' => __( 'Documentation', 'option-tree' ),
|
204 |
+
'capability' => 'edit_theme_options',
|
205 |
+
'menu_slug' => 'ot-documentation',
|
206 |
+
'icon_url' => null,
|
207 |
+
'position' => null,
|
208 |
+
'updated_message' => __( 'Theme Options updated.', 'option-tree' ),
|
209 |
+
'reset_message' => __( 'Theme Options reset.', 'option-tree' ),
|
210 |
+
'button_text' => __( 'Save Settings', 'option-tree' ),
|
211 |
+
'show_buttons' => false,
|
212 |
+
'screen_icon' => 'themes',
|
213 |
+
'sections' => array(
|
214 |
+
array(
|
215 |
+
'id' => 'creating_options',
|
216 |
+
'title' => __( 'Creating Options', 'option-tree' )
|
217 |
+
),
|
218 |
+
array(
|
219 |
+
'id' => 'option_types',
|
220 |
+
'title' => __( 'Option Types', 'option-tree' )
|
221 |
+
),
|
222 |
+
array(
|
223 |
+
'id' => 'functions',
|
224 |
+
'title' => __( 'Function References', 'option-tree' )
|
225 |
+
),
|
226 |
+
array(
|
227 |
+
'id' => 'theme_mode',
|
228 |
+
'title' => __( 'Theme Mode', 'option-tree' )
|
229 |
+
),
|
230 |
+
array(
|
231 |
+
'id' => 'meta_boxes',
|
232 |
+
'title' => __( 'Meta Boxes', 'option-tree' )
|
233 |
+
),
|
234 |
+
array(
|
235 |
+
'id' => 'examples',
|
236 |
+
'title' => __( 'Code Examples', 'option-tree' )
|
237 |
+
),
|
238 |
+
array(
|
239 |
+
'id' => 'layouts_overview',
|
240 |
+
'title' => __( 'Layouts Overview', 'option-tree' )
|
241 |
+
)
|
242 |
+
),
|
243 |
+
'settings' => array(
|
244 |
+
array(
|
245 |
+
'id' => 'creating_options_text',
|
246 |
+
'label' => __( 'Overview of available Theme Option fields.', 'option-tree' ),
|
247 |
+
'type' => 'creating-options',
|
248 |
+
'section' => 'creating_options'
|
249 |
+
),
|
250 |
+
array(
|
251 |
+
'id' => 'option_types_text',
|
252 |
+
'label' => __( 'Option types in alphabetical order & hooks to filter them.', 'option-tree' ),
|
253 |
+
'type' => 'option-types',
|
254 |
+
'section' => 'option_types'
|
255 |
+
),
|
256 |
+
array(
|
257 |
+
'id' => 'functions_ot_get_option',
|
258 |
+
'label' => __( 'Function Reference:ot_get_option()', 'option-tree' ),
|
259 |
+
'type' => 'ot-get-option',
|
260 |
+
'section' => 'functions'
|
261 |
+
),
|
262 |
+
array(
|
263 |
+
'id' => 'functions_get_option_tree',
|
264 |
+
'label' => __( 'Function Reference:get_option_tree()', 'option-tree' ),
|
265 |
+
'type' => 'get-option-tree',
|
266 |
+
'section' => 'functions'
|
267 |
+
),
|
268 |
+
array(
|
269 |
+
'id' => 'theme_mode_text',
|
270 |
+
'label' => __( 'Theme Mode', 'option-tree' ),
|
271 |
+
'type' => 'theme-mode',
|
272 |
+
'section' => 'theme_mode'
|
273 |
+
),
|
274 |
+
array(
|
275 |
+
'id' => 'meta_boxes_text',
|
276 |
+
'label' => __( 'Meta Boxes', 'option-tree' ),
|
277 |
+
'type' => 'meta-boxes',
|
278 |
+
'section' => 'meta_boxes'
|
279 |
+
),
|
280 |
+
array(
|
281 |
+
'id' => 'example_text',
|
282 |
+
'label' => __( 'Code examples for front-end development.', 'option-tree' ),
|
283 |
+
'type' => 'examples',
|
284 |
+
'section' => 'examples'
|
285 |
+
),
|
286 |
+
array(
|
287 |
+
'id' => 'layouts_overview_text',
|
288 |
+
'label' => __( 'What\'s a layout anyhow?', 'option-tree' ),
|
289 |
+
'type' => 'layouts-overview',
|
290 |
+
'section' => 'layouts_overview'
|
291 |
+
)
|
292 |
+
)
|
293 |
+
)
|
294 |
+
);
|
295 |
+
|
296 |
+
// Loop over the settings and remove as needed.
|
297 |
+
foreach( $ot_register_pages_array as $key => $page ) {
|
298 |
+
|
299 |
+
// Remove various options from the Settings UI.
|
300 |
+
if ( $page['id'] == 'settings' ) {
|
301 |
+
|
302 |
+
// Remove the Theme Options UI
|
303 |
+
if ( OT_SHOW_OPTIONS_UI == false ) {
|
304 |
+
|
305 |
+
foreach( $page['sections'] as $section_key => $section ) {
|
306 |
+
if ( $section['id'] == 'create_setting' ) {
|
307 |
+
unset($ot_register_pages_array[$key]['sections'][$section_key]);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
+
foreach( $page['settings'] as $setting_key => $setting ) {
|
312 |
+
if ( $setting['section'] == 'create_setting' ) {
|
313 |
+
unset($ot_register_pages_array[$key]['settings'][$setting_key]);
|
314 |
+
}
|
315 |
+
}
|
316 |
+
|
317 |
+
}
|
318 |
+
|
319 |
+
// Remove parts of the Imports UI
|
320 |
+
if ( OT_SHOW_SETTINGS_IMPORT == false ) {
|
321 |
+
|
322 |
+
foreach( $page['settings'] as $setting_key => $setting ) {
|
323 |
+
if ( $setting['section'] == 'import' && in_array( $setting['id'], array('import_xml_text', 'import_settings_text' ) ) ) {
|
324 |
+
unset($ot_register_pages_array[$key]['settings'][$setting_key]);
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
}
|
329 |
+
|
330 |
+
// Remove parts of the Export UI
|
331 |
+
if ( OT_SHOW_SETTINGS_EXPORT == false ) {
|
332 |
+
|
333 |
+
foreach( $page['settings'] as $setting_key => $setting ) {
|
334 |
+
if ( $setting['section'] == 'export' && in_array( $setting['id'], array('export_settings_file_text', 'export_settings_text' ) ) ) {
|
335 |
+
unset($ot_register_pages_array[$key]['settings'][$setting_key]);
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
}
|
340 |
+
|
341 |
+
// Remove the Layouts UI
|
342 |
+
if ( OT_SHOW_NEW_LAYOUT == false ) {
|
343 |
+
|
344 |
+
foreach( $page['sections'] as $section_key => $section ) {
|
345 |
+
if ( $section['id'] == 'layouts' ) {
|
346 |
+
unset($ot_register_pages_array[$key]['sections'][$section_key]);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
foreach( $page['settings'] as $setting_key => $setting ) {
|
351 |
+
if ( $setting['section'] == 'layouts' ) {
|
352 |
+
unset($ot_register_pages_array[$key]['settings'][$setting_key]);
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
}
|
357 |
+
|
358 |
+
}
|
359 |
+
|
360 |
+
// Remove the Documentation UI.
|
361 |
+
if ( OT_SHOW_DOCS == false && $page['id'] == 'documentation' ) {
|
362 |
+
|
363 |
+
unset( $ot_register_pages_array[$key] );
|
364 |
+
|
365 |
+
}
|
366 |
+
|
367 |
+
}
|
368 |
|
369 |
+
$ot_register_pages_array = apply_filters( 'ot_register_pages_array', $ot_register_pages_array );
|
370 |
+
|
371 |
+
// Register the pages.
|
372 |
+
ot_register_settings( array(
|
373 |
+
array(
|
374 |
+
'id' => 'option_tree_settings',
|
375 |
+
'pages' => $ot_register_pages_array
|
376 |
+
)
|
377 |
+
)
|
378 |
+
);
|
379 |
+
|
380 |
+
}
|
381 |
+
|
382 |
+
}
|
383 |
+
|
384 |
/**
|
385 |
* Runs directly after the Theme Options are save.
|
386 |
*
|
397 |
$updated = isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ? true : false;
|
398 |
|
399 |
/* only execute after the theme options are saved */
|
400 |
+
if ( apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) == $page && $updated ) {
|
401 |
|
402 |
/* grab a copy of the theme options */
|
403 |
$options = get_option( 'option_tree' );
|
422 |
* @param mixed Setting value
|
423 |
* @param string Setting type
|
424 |
* @param string Setting field ID
|
425 |
+
* @param string WPML field ID
|
426 |
* @return mixed
|
427 |
*
|
428 |
* @access public
|
430 |
*/
|
431 |
if ( ! function_exists( 'ot_validate_setting' ) ) {
|
432 |
|
433 |
+
function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) {
|
434 |
|
435 |
/* exit early if missing data */
|
436 |
if ( ! $input || ! $type || ! $field_id )
|
438 |
|
439 |
$input = apply_filters( 'ot_validate_setting', $input, $type, $field_id );
|
440 |
|
441 |
+
/* WPML Register and Unregister strings */
|
442 |
+
if ( ! empty( $wmpl_id ) ) {
|
443 |
+
|
444 |
+
/* Allow filtering on the WPML option types */
|
445 |
+
$single_string_types = apply_filters( 'ot_wpml_option_types', array( 'text', 'textarea', 'textarea-simple' ) );
|
446 |
+
|
447 |
+
if ( in_array( $type, $single_string_types ) ) {
|
448 |
+
|
449 |
+
if ( ! empty( $input ) ) {
|
450 |
+
|
451 |
+
ot_wpml_register_string( $wmpl_id, $input );
|
452 |
+
|
453 |
+
} else {
|
454 |
+
|
455 |
+
ot_wpml_unregister_string( $wmpl_id );
|
456 |
+
|
457 |
+
}
|
458 |
+
|
459 |
+
}
|
460 |
+
|
461 |
+
}
|
462 |
+
|
463 |
if ( 'background' == $type ) {
|
464 |
|
465 |
$input['background-color'] = ot_validate_setting( $input['background-color'], 'colorpicker', $field_id );
|
541 |
|
542 |
function ot_admin_scripts() {
|
543 |
|
544 |
+
if ( function_exists( 'wp_enqueue_media' ) ) {
|
545 |
+
/* WP 3.5 Media Uploader */
|
546 |
+
wp_enqueue_media();
|
547 |
+
} else {
|
548 |
+
/* Legacy Thickbox */
|
549 |
+
add_thickbox();
|
550 |
+
}
|
551 |
|
552 |
/* load the colorpicker */
|
553 |
wp_enqueue_script( 'ot-colorpicker-js', OT_URL . 'assets/js/ot-colorpicker.js', array( 'jquery' ), OT_VERSION );
|
554 |
|
555 |
+
/* load jQuery-ui slider */
|
556 |
+
wp_enqueue_script( 'jquery-ui-slider' );
|
557 |
+
|
558 |
/* load all the required scripts */
|
559 |
wp_enqueue_script( 'ot-admin-js', OT_URL . 'assets/js/ot-admin.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-ui-sortable', 'media-upload', 'thickbox' ), OT_VERSION );
|
560 |
|
621 |
'hierarchical' => false,
|
622 |
'rewrite' => false,
|
623 |
'supports' => array( 'title', 'editor' ),
|
624 |
+
'can_export' => false,
|
625 |
'show_in_nav_menus' => false
|
626 |
) );
|
627 |
|
1334 |
$_rows = isset( $value['rows'] ) ? $value['rows'] : '';
|
1335 |
$_post_type = isset( $value['post_type'] ) ? $value['post_type'] : '';
|
1336 |
$_taxonomy = isset( $value['taxonomy'] ) ? $value['taxonomy'] : '';
|
1337 |
+
$_min_max_step = isset( $value['min_max_step'] ) ? $value['min_max_step'] : '';
|
1338 |
$_class = isset( $value['class'] ) ? $value['class'] : '';
|
1339 |
|
1340 |
$choices = '';
|
1378 |
$_setting_rows = isset( $setting['rows'] ) ? $setting['rows'] : '';
|
1379 |
$_setting_post_type = isset( $setting['post_type'] ) ? $setting['post_type'] : '';
|
1380 |
$_setting_taxonomy = isset( $setting['taxonomy'] ) ? $setting['taxonomy'] : '';
|
1381 |
+
$_setting_min_max_step = isset( $setting['min_max_step'] ) ? $setting['min_max_step'] : '';
|
1382 |
$_setting_class = isset( $setting['class'] ) ? $setting['class'] : '';
|
1383 |
|
1384 |
$setting_choices = '';
|
1421 |
'rows' => '$_setting_rows',
|
1422 |
'post_type' => '$_setting_post_type',
|
1423 |
'taxonomy' => '$_setting_taxonomy',
|
1424 |
+
'min_max_step'=> '$_setting_min_max_step',
|
1425 |
'class' => '$_setting_class'$setting_choices
|
1426 |
),";
|
1427 |
}
|
1442 |
'rows' => '$_rows',
|
1443 |
'post_type' => '$_post_type',
|
1444 |
'taxonomy' => '$_taxonomy',
|
1445 |
+
'min_max_step'=> '$_min_max_step',
|
1446 |
'class' => '$_class'$choices$setting_settings
|
1447 |
),";
|
1448 |
}
|
1522 |
foreach( $settings['sections'] as $k => $section ) {
|
1523 |
|
1524 |
/* remove from array if missing values */
|
1525 |
+
if ( ( ! isset( $section['title'] ) && ! isset( $section['id'] ) ) || ( '' == $section['title'] && '' == $section['id'] ) ) {
|
1526 |
|
1527 |
unset( $settings['sections'][$k] );
|
1528 |
|
1536 |
}
|
1537 |
|
1538 |
/* missing title set to unfiltered ID */
|
1539 |
+
if ( ! isset( $section['title'] ) || '' == $section['title'] ) {
|
1540 |
|
1541 |
$settings['sections'][$k]['title'] = wp_kses_post( $section['id'] );
|
1542 |
|
1543 |
/* missing ID set to title */
|
1544 |
+
} else if ( ! isset( $section['id'] ) || '' == $section['id'] ) {
|
1545 |
|
1546 |
$section['id'] = wp_kses_post( $section['title'] );
|
1547 |
|
1575 |
foreach( $settings['contextual_help']['content'] as $k => $content ) {
|
1576 |
|
1577 |
/* remove from array if missing values */
|
1578 |
+
if ( ( ! isset( $content['title'] ) && ! isset( $content['id'] ) ) || ( '' == $content['title'] && '' == $content['id'] ) ) {
|
1579 |
|
1580 |
unset( $settings['contextual_help']['content'][$k] );
|
1581 |
|
1589 |
}
|
1590 |
|
1591 |
/* missing title set to unfiltered ID */
|
1592 |
+
if ( ! isset( $content['title'] ) || '' == $content['title'] ) {
|
1593 |
|
1594 |
$settings['contextual_help']['content'][$k]['title'] = wp_kses_post( $content['id'] );
|
1595 |
|
1596 |
/* missing ID set to title */
|
1597 |
+
} else if ( ! isset( $content['id'] ) || '' == $content['id'] ) {
|
1598 |
|
1599 |
$content['id'] = wp_kses_post( $content['title'] );
|
1600 |
|
1623 |
|
1624 |
}
|
1625 |
|
|
|
1626 |
$settings['contextual_help'] = ot_stripslashes( $settings['contextual_help'] );
|
1627 |
|
1628 |
/* default message */
|
1631 |
/* is array: save & show success message */
|
1632 |
if ( is_array( $settings ) ) {
|
1633 |
|
1634 |
+
/* WPML unregister ID's that have been removed */
|
1635 |
+
if ( function_exists( 'icl_unregister_string' ) ) {
|
1636 |
+
|
1637 |
+
$current = get_option( 'option_tree_settings' );
|
1638 |
+
$options = get_option( 'option_tree' );
|
1639 |
+
|
1640 |
+
if ( isset( $current['settings'] ) ) {
|
1641 |
+
|
1642 |
+
/* Empty ID array */
|
1643 |
+
$new_ids = array();
|
1644 |
+
|
1645 |
+
/* Build the WPML IDs array */
|
1646 |
+
foreach( $settings['settings'] as $setting ) {
|
1647 |
+
|
1648 |
+
if ( $setting['id'] ) {
|
1649 |
+
|
1650 |
+
$new_ids[] = $setting['id'];
|
1651 |
+
|
1652 |
+
}
|
1653 |
+
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
/* Remove missing IDs from WPML */
|
1657 |
+
foreach( $current['settings'] as $current_setting ) {
|
1658 |
+
|
1659 |
+
if ( ! in_array( $current_setting['id'], $new_ids ) ) {
|
1660 |
+
|
1661 |
+
if ( ! empty( $options[$current_setting['id']] ) && in_array( $current_setting['type'], array( 'list-item', 'slider' ) ) ) {
|
1662 |
+
|
1663 |
+
foreach( $options[$current_setting['id']] as $key => $value ) {
|
1664 |
+
|
1665 |
+
foreach( $value as $ckey => $cvalue ) {
|
1666 |
+
|
1667 |
+
ot_wpml_unregister_string( $current_setting['id'] . '_' . $ckey . '_' . $key );
|
1668 |
+
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
}
|
1672 |
+
|
1673 |
+
} else {
|
1674 |
+
|
1675 |
+
ot_wpml_unregister_string( $current_setting['id'] );
|
1676 |
+
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
}
|
1682 |
+
|
1683 |
+
}
|
1684 |
+
|
1685 |
+
}
|
1686 |
+
|
1687 |
update_option( 'option_tree_settings', $settings );
|
1688 |
$message = 'success';
|
1689 |
|
1728 |
|
1729 |
|
1730 |
/* remove from array if missing values */
|
1731 |
+
if ( ( ! isset( $setting['label'] ) && ! isset( $setting['id'] ) ) || ( '' == $setting['label'] && '' == $setting['id'] ) ) {
|
1732 |
|
1733 |
unset( $settings[$k] );
|
1734 |
|
1742 |
}
|
1743 |
|
1744 |
/* missing label set to unfiltered ID */
|
1745 |
+
if ( ! isset( $setting['label'] ) || '' == $setting['label'] ) {
|
1746 |
|
1747 |
$settings[$k]['label'] = $setting['id'];
|
1748 |
|
1749 |
/* missing ID set to label */
|
1750 |
+
} else if ( ! isset( $setting['id'] ) || '' == $setting['id'] ) {
|
1751 |
|
1752 |
$setting['id'] = wp_kses_post( $setting['label'] );
|
1753 |
|
1772 |
foreach( $setting['choices'] as $ck => $choice ) {
|
1773 |
|
1774 |
/* remove from array if missing values */
|
1775 |
+
if ( ( ! isset( $choice['label'] ) && ! isset( $choice['value'] ) ) || ( '' == $choice['label'] && '' == $choice['value'] ) ) {
|
1776 |
|
1777 |
unset( $setting['choices'][$ck] );
|
1778 |
|
1779 |
} else {
|
1780 |
|
1781 |
/* missing label set to unfiltered ID */
|
1782 |
+
if ( ! isset( $choice['label'] ) || '' == $choice['label'] ) {
|
1783 |
|
1784 |
$setting['choices'][$ck]['label'] = wp_kses_post( $choice['value'] );
|
1785 |
|
1786 |
/* missing value set to label */
|
1787 |
+
} else if ( ! isset( $choice['value'] ) || '' == $choice['value'] ) {
|
1788 |
|
1789 |
$setting['choices'][$ck]['value'] = ot_sanitize_option_id( wp_kses_post( $choice['label'] ) );
|
1790 |
|
1845 |
if ( is_array( $layouts ) && ! empty( $layouts ) ) {
|
1846 |
|
1847 |
/* setup active layout */
|
1848 |
+
if ( isset( $layouts['active_layout'] ) && ! empty( $layouts['active_layout'] ) ) {
|
1849 |
$rebuild['active_layout'] = $layouts['active_layout'];
|
1850 |
}
|
1851 |
|
1852 |
/* add new and overwrite active layout */
|
1853 |
+
if ( isset( $layouts['_add_new_layout_'] ) && ! empty( $layouts['_add_new_layout_'] ) ) {
|
1854 |
$rebuild['active_layout'] = ot_sanitize_layout_id( $layouts['_add_new_layout_'] );
|
1855 |
$rebuild[$rebuild['active_layout']] = ot_encode( serialize( get_option( 'option_tree' ) ) );
|
1856 |
}
|
1865 |
continue;
|
1866 |
|
1867 |
/* check if the key exists then set value */
|
1868 |
+
if ( isset( $option_tree_layouts[$key] ) && ! empty( $option_tree_layouts[$key] ) ) {
|
1869 |
$rebuild[$key] = $option_tree_layouts[$key];
|
1870 |
if ( '' == $first_layout ) {
|
1871 |
$first_layout = $key;
|
1874 |
|
1875 |
}
|
1876 |
|
1877 |
+
if ( isset( $rebuild['active_layout'] ) && ! isset( $rebuild[$rebuild['active_layout']] ) && ! empty( $first_layout ) ) {
|
|
|
1878 |
$rebuild['active_layout'] = $first_layout;
|
1879 |
}
|
1880 |
|
1885 |
|
1886 |
/* is array: save & show success message */
|
1887 |
if ( count( $rebuild ) > 1 ) {
|
1888 |
+
|
1889 |
/* rebuild the theme options */
|
1890 |
$rebuild_option_tree = unserialize( ot_decode( $rebuild[$rebuild['active_layout']] ) );
|
1891 |
if ( is_array( $rebuild_option_tree ) ) {
|
1904 |
$message = 'success';
|
1905 |
|
1906 |
} else if ( count( $rebuild ) <= 1 ) {
|
1907 |
+
|
1908 |
/* delete layouts option */
|
1909 |
delete_option( 'option_tree_layouts' );
|
1910 |
|
1914 |
}
|
1915 |
|
1916 |
/* redirect */
|
1917 |
+
if ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) ) {
|
1918 |
$query_args = add_query_arg( array( 'settings-updated' => 'layout' ), remove_query_arg( array( 'action', 'message' ), $_POST['_wp_http_referer'] ) );
|
1919 |
} else {
|
1920 |
$query_args = add_query_arg( array( 'action' => 'save-layouts', 'message' => $message ), $_POST['_wp_http_referer'] );
|
1946 |
if ( empty( $page ) )
|
1947 |
return false;
|
1948 |
|
|
|
1949 |
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
|
1950 |
$message = isset( $_REQUEST['message'] ) ? $_REQUEST['message'] : '';
|
1951 |
+
$updated = isset( $_REQUEST['settings-updated'] ) ? $_REQUEST['settings-updated'] : '';
|
1952 |
|
1953 |
+
if ( $action == 'save-settings' ) {
|
|
|
1954 |
|
1955 |
+
if ( $message == 'success' ) {
|
1956 |
+
|
1957 |
+
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Settings updated.', 'option-tree' ) . '</p></div>';
|
1958 |
+
|
1959 |
+
} else if ( $message == 'failed' ) {
|
1960 |
+
|
1961 |
+
return '<div id="message" class="error fade below-h2"><p>' . __( 'Settings could not be saved.', 'option-tree' ) . '</p></div>';
|
1962 |
+
|
1963 |
+
}
|
1964 |
|
1965 |
+
} else if ( $action == 'import-xml' || $action == 'import-settings' ) {
|
1966 |
+
|
1967 |
+
if ( $message == 'success' ) {
|
1968 |
|
1969 |
+
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Settings Imported.', 'option-tree' ) . '</p></div>';
|
|
|
|
|
1970 |
|
1971 |
+
} else if ( $message == 'failed' ) {
|
1972 |
+
|
1973 |
+
return '<div id="message" class="error fade below-h2"><p>' . __( 'Settings could not be imported.', 'option-tree' ) . '</p></div>';
|
1974 |
|
1975 |
}
|
1976 |
+
} else if ( $action == 'import-data' ) {
|
1977 |
|
1978 |
+
if ( $message == 'success' ) {
|
1979 |
+
|
1980 |
+
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Data Imported.', 'option-tree' ) . '</p></div>';
|
1981 |
+
|
1982 |
+
} else if ( $message == 'failed' ) {
|
1983 |
+
|
1984 |
+
return '<div id="message" class="error fade below-h2"><p>' . __( 'Data could not be imported.', 'option-tree' ) . '</p></div>';
|
1985 |
+
|
1986 |
+
}
|
1987 |
|
1988 |
+
} else if ( $action == 'import-layouts' ) {
|
|
|
1989 |
|
1990 |
+
if ( $message == 'success' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1991 |
|
1992 |
+
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Layouts Imported.', 'option-tree' ) . '</p></div>';
|
1993 |
|
1994 |
+
} else if ( $message == 'failed' ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1995 |
|
1996 |
+
return '<div id="message" class="error fade below-h2"><p>' . __( 'Layouts could not be imported.', 'option-tree' ) . '</p></div>';
|
1997 |
+
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
} else if ( $action == 'save-layouts' ) {
|
|
|
|
|
|
|
|
|
2001 |
|
2002 |
+
if ( $message == 'success' ) {
|
2003 |
|
2004 |
+
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Layouts Updated.', 'option-tree' ) . '</p></div>';
|
2005 |
+
|
2006 |
+
} else if ( $message == 'failed' ) {
|
2007 |
+
|
2008 |
+
return '<div id="message" class="error fade below-h2"><p>' . __( 'Layouts could not be updated.', 'option-tree' ) . '</p></div>';
|
2009 |
+
|
2010 |
+
} else if ( $message == 'deleted' ) {
|
2011 |
+
|
2012 |
+
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Layouts have been deleted.', 'option-tree' ) . '</p></div>';
|
|
|
|
|
2013 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014 |
}
|
2015 |
+
|
2016 |
+
} else if ( $updated == 'layout' ) {
|
2017 |
+
|
2018 |
+
return '<div id="message" class="updated fade below-h2"><p>' . __( 'Layout activated.', 'option-tree' ) . '</p></div>';
|
2019 |
+
|
2020 |
+
} else if ( $action == 'reset' ) {
|
2021 |
|
2022 |
+
return '<div id="message" class="updated fade below-h2"><p>' . $page['reset_message'] . '</p></div>';
|
2023 |
+
|
2024 |
}
|
2025 |
|
2026 |
+
do_action( 'ot_custom_page_messages' );
|
2027 |
+
|
2028 |
+
if ( $updated == 'true' ) {
|
2029 |
+
|
2030 |
+
return '<div id="message" class="updated fade below-h2"><p>' . $page['updated_message'] . '</p></div>';
|
2031 |
+
|
2032 |
+
}
|
2033 |
+
|
2034 |
return false;
|
2035 |
+
|
2036 |
}
|
2037 |
|
2038 |
}
|
2064 |
'custom-post-type-select' => 'Custom Post Type Select',
|
2065 |
'list-item' => 'List Item',
|
2066 |
'measurement' => 'Measurement',
|
2067 |
+
'numeric-slider' => 'Numeric Slider',
|
2068 |
'page-checkbox' => 'Page Checkbox',
|
2069 |
'page-select' => 'Page Select',
|
2070 |
'post-checkbox' => 'Post Checkbox',
|
2072 |
'radio' => 'Radio',
|
2073 |
'radio-image' => 'Radio Image',
|
2074 |
'select' => 'Select',
|
2075 |
+
'sidebar-select' => 'Sidebar Select',
|
2076 |
'slider' => 'Slider',
|
2077 |
'tag-checkbox' => 'Tag Checkbox',
|
2078 |
'tag-select' => 'Tag Select',
|
3178 |
<div class="open">' . ( isset( $section['title'] ) ? esc_attr( $section['title'] ) : 'Section ' . ( $key + 1 ) ) . '</div>
|
3179 |
<div class="button-section">
|
3180 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'edit', 'option-tree' ) . '">
|
3181 |
+
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
3182 |
</a>
|
3183 |
+
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button red light right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
3184 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3185 |
</a>
|
3186 |
</div>
|
3248 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
3249 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
3250 |
</a>
|
3251 |
+
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button red light right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
3252 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3253 |
</a>
|
3254 |
</div>
|
3342 |
</div>
|
3343 |
</div>
|
3344 |
</div>
|
3345 |
+
<div class="format-settings">
|
3346 |
+
<div class="format-setting type-text wide-desc">
|
3347 |
+
<div class="description">' . __( '<strong>Min, Max, & Step</strong>: Add a comma separated list of options in the following format <code>0,100,1</code> (slide from <code>0-100</code> in intervals of <code>1</code>). The three values represent the minimum, maximum, and step options and will only affect the Numeric Slider option type.', 'option-tree' ) . '</div>
|
3348 |
+
<div class="format-setting-inner">
|
3349 |
+
<input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][min_max_step]" value="' . ( isset( $setting['min_max_step'] ) ? esc_attr( $setting['min_max_step'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" />
|
3350 |
+
</div>
|
3351 |
+
</div>
|
3352 |
+
</div>
|
3353 |
<div class="format-settings">
|
3354 |
<div class="format-setting type-text wide-desc">
|
3355 |
<div class="description">' . __( '<strong>CSS Class</strong>: Add and optional class to this option type.', 'option-tree' ) . '</div>
|
3392 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
3393 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
3394 |
</a>
|
3395 |
+
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button red light right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
3396 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3397 |
</a>
|
3398 |
</div>
|
3423 |
</div>
|
3424 |
<div class="format-setting type-text wide-desc">
|
3425 |
<div class="format-setting-inner">
|
3426 |
+
<input type="text" name="' . esc_attr( $name ) . '[choices][' . esc_attr( $key ) . '][src]" value="' . ( isset( $choice['src'] ) ? esc_attr( $choice['src'] ) : '' ) . '" class="widefat option-tree-ui-input" autocomplete="off" />
|
3427 |
</div>
|
3428 |
</div>
|
3429 |
</div>
|
3458 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
3459 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
3460 |
</a>
|
3461 |
+
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button red light right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
3462 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3463 |
</a>
|
3464 |
</div>
|
3517 |
<a href="javascript:void(0);" class="option-tree-layout-activate option-tree-ui-button left-item' . ( $active_layout == $key ? ' active' : '' ) . '" title="' . __( 'Activate', 'option-tree' ) . '">
|
3518 |
<span class="icon check">' . __( 'Activate', 'option-tree' ) . '</span>
|
3519 |
</a>
|
3520 |
+
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button red light right-item" title="'. __( 'Delete', 'option-tree' ) . '">
|
3521 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3522 |
</a>
|
3523 |
</div>
|
3581 |
|
3582 |
echo '
|
3583 |
<div class="option-tree-setting">
|
3584 |
+
<div class="open">' . ( isset( $list_item['title'] ) ? esc_attr( $list_item['title'] ) : '' ) . '</div>
|
3585 |
<div class="button-section">
|
3586 |
<a href="javascript:void(0);" class="option-tree-setting-edit option-tree-ui-button left-item" title="' . __( 'Edit', 'option-tree' ) . '">
|
3587 |
<span class="icon pencil">' . __( 'Edit', 'option-tree' ) . '</span>
|
3588 |
</a>
|
3589 |
+
<a href="javascript:void(0);" class="option-tree-setting-remove option-tree-ui-button red light right-item" title="' . __( 'Delete', 'option-tree' ) . '">
|
3590 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3591 |
</a>
|
3592 |
</div>
|
3616 |
'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10,
|
3617 |
'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
|
3618 |
'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
|
3619 |
+
'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1',
|
3620 |
'field_class' => isset( $field['class'] ) ? $field['class'] : '',
|
3621 |
'field_choices' => isset( $field['choices'] ) && ! empty( $field['choices'] ) ? $field['choices'] : array(),
|
3622 |
'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(),
|
3628 |
echo '<div class="format-settings">';
|
3629 |
|
3630 |
/* don't show title with textblocks */
|
3631 |
+
if ( $_args['type'] != 'textblock' && ! empty( $field['label'] ) ) {
|
3632 |
echo '<div class="format-setting-label">';
|
3633 |
echo '<h3 class="label">' . esc_attr( $field['label'] ) . '</h3>';
|
3634 |
echo '</div>';
|
3665 |
*/
|
3666 |
if ( ! function_exists( 'ot_theme_options_layouts_form' ) ) {
|
3667 |
|
3668 |
+
function ot_theme_options_layouts_form( $active = false ) {
|
3669 |
|
3670 |
echo '<form method="post" id="option-tree-options-layouts-form">';
|
3671 |
|
3677 |
|
3678 |
/* set active layout */
|
3679 |
$active_layout = isset( $layouts['active_layout'] ) ? $layouts['active_layout'] : '';
|
3680 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3681 |
if ( is_array( $layouts ) && count( $layouts ) > 1 ) {
|
3682 |
|
3683 |
$active_layout = esc_attr( $layouts['active_layout'] );
|
3684 |
|
3685 |
echo '<input type="hidden" id="the_current_layout" value="' . $active_layout . '" />';
|
3686 |
|
3687 |
+
echo '<div class="option-tree-active-layout">';
|
3688 |
+
|
3689 |
+
echo '<select name="option_tree_layouts[active_layout]" class="option-tree-ui-select">';
|
3690 |
+
|
3691 |
+
foreach( $layouts as $key => $data ) {
|
3692 |
+
|
3693 |
+
if ( $key == 'active_layout' )
|
3694 |
+
continue;
|
3695 |
+
|
3696 |
+
echo '<option' . selected( $key, $active_layout, false ) . ' value="' . esc_attr( $key ) . '">' . esc_attr( $key ) . '</option>';
|
3697 |
+
}
|
3698 |
+
|
3699 |
+
echo '</select>';
|
3700 |
+
|
3701 |
+
echo '</div>';
|
3702 |
|
3703 |
foreach( $layouts as $key => $data ) {
|
3704 |
|
3711 |
|
3712 |
}
|
3713 |
|
3714 |
+
/* new layout wrapper */
|
3715 |
+
echo '<div class="option-tree-save-layout' . ( ! empty( $active_layout ) ? ' active-layout' : '' ) . '">';
|
3716 |
+
|
3717 |
+
/* add new layout */
|
3718 |
+
echo '<input type="text" name="option_tree_layouts[_add_new_layout_]" value="" class="widefat option-tree-ui-input" autocomplete="off" />';
|
3719 |
+
|
3720 |
+
echo '<button type="submit" class="option-tree-ui-button blue save-layout" title="' . __( 'New Layout', 'option-tree' ) . '">' . __( 'New Layout', 'option-tree' ) . '</button>';
|
3721 |
+
|
3722 |
+
echo '</div>';
|
3723 |
+
|
3724 |
echo '</form>';
|
3725 |
|
3726 |
}
|
4081 |
|
4082 |
foreach( $value as $k => $v ) {
|
4083 |
|
4084 |
+
if ( '' == $value[$k] && isset( $std[$k] ) ) {
|
4085 |
|
4086 |
$value[$k] = $std[$k];
|
4087 |
|
4089 |
|
4090 |
}
|
4091 |
|
4092 |
+
} else if ( '' == $value && ! empty( $std ) ) {
|
4093 |
|
4094 |
$value = $std;
|
4095 |
|
4099 |
|
4100 |
}
|
4101 |
|
4102 |
+
/**
|
4103 |
+
* Helper function to register a WPML string
|
4104 |
+
*
|
4105 |
+
* @access public
|
4106 |
+
* @since 2.1
|
4107 |
+
*/
|
4108 |
+
function ot_wpml_register_string( $id, $value ) {
|
4109 |
+
|
4110 |
+
if ( function_exists( 'icl_register_string' ) ) {
|
4111 |
+
|
4112 |
+
icl_register_string( 'Theme Options', $id, $value );
|
4113 |
+
|
4114 |
+
}
|
4115 |
+
|
4116 |
+
}
|
4117 |
+
|
4118 |
+
/**
|
4119 |
+
* Helper function to unregister a WPML string
|
4120 |
+
*
|
4121 |
+
* @access public
|
4122 |
+
* @since 2.1
|
4123 |
+
*/
|
4124 |
+
function ot_wpml_unregister_string( $id ) {
|
4125 |
+
|
4126 |
+
if ( function_exists( 'icl_unregister_string' ) ) {
|
4127 |
+
|
4128 |
+
icl_unregister_string( 'Theme Options', $id );
|
4129 |
+
|
4130 |
+
}
|
4131 |
+
|
4132 |
+
}
|
4133 |
+
|
4134 |
/* End of file ot-functions-admin.php */
|
4135 |
+
/* Location: ./includes/ot-functions-admin.php */
|
includes/ot-functions-compat.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
-
* @copyright Copyright (c)
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
@@ -37,24 +37,42 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
|
|
37 |
$ot_layout = '/option-tree/layouts.txt';
|
38 |
|
39 |
/* XML file path - child theme first then parent */
|
40 |
-
|
41 |
-
|
42 |
-
$xml_file =
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
/* Data file path - child theme first then parent */
|
45 |
-
|
46 |
-
|
47 |
-
$data_file =
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
/* Layout file path - child theme first then parent */
|
50 |
-
|
51 |
-
|
52 |
-
$layout_file =
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
/* check for files */
|
55 |
-
$has_xml = (
|
56 |
-
$has_data = (
|
57 |
-
$has_layout = (
|
58 |
|
59 |
/* auto import XML file */
|
60 |
if ( $has_xml == true && ! get_option( 'option_tree_settings' ) && class_exists( 'SimpleXMLElement' ) ) {
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
37 |
$ot_layout = '/option-tree/layouts.txt';
|
38 |
|
39 |
/* XML file path - child theme first then parent */
|
40 |
+
if ( is_readable( get_stylesheet_directory() . $ot_xml ) ) {
|
41 |
+
|
42 |
+
$xml_file = get_stylesheet_directory_uri() . $ot_xml;
|
43 |
+
|
44 |
+
} else if ( is_readable( get_template_directory() . $ot_xml ) ) {
|
45 |
+
|
46 |
+
$xml_file = get_template_directory_uri() . $ot_xml;
|
47 |
+
|
48 |
+
}
|
49 |
|
50 |
/* Data file path - child theme first then parent */
|
51 |
+
if ( is_readable( get_stylesheet_directory() . $ot_data ) ) {
|
52 |
+
|
53 |
+
$data_file = get_stylesheet_directory_uri() . $ot_data;
|
54 |
+
|
55 |
+
} else if ( is_readable( get_template_directory() . $ot_data ) ) {
|
56 |
+
|
57 |
+
$data_file = get_template_directory_uri() . $ot_data;
|
58 |
+
|
59 |
+
}
|
60 |
|
61 |
/* Layout file path - child theme first then parent */
|
62 |
+
if ( is_readable( get_stylesheet_directory() . $ot_layout ) ) {
|
63 |
+
|
64 |
+
$layout_file = get_stylesheet_directory_uri() . $ot_layout;
|
65 |
+
|
66 |
+
} else if ( is_readable( get_template_directory() . $ot_layout ) ) {
|
67 |
+
|
68 |
+
$layout_file = get_template_directory_uri() . $ot_layout;
|
69 |
+
|
70 |
+
}
|
71 |
|
72 |
/* check for files */
|
73 |
+
$has_xml = isset( $xml_file ) ? true : false;
|
74 |
+
$has_data = isset( $data_file ) ? true : false;
|
75 |
+
$has_layout = isset( $layout_file ) ? true : false;
|
76 |
|
77 |
/* auto import XML file */
|
78 |
if ( $has_xml == true && ! get_option( 'option_tree_settings' ) && class_exists( 'SimpleXMLElement' ) ) {
|
includes/ot-functions-deprecated.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
-
* @copyright Copyright (c)
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
includes/ot-functions-docs-page.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
-
* @copyright Copyright (c)
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
@@ -67,6 +67,12 @@ if ( ! function_exists( 'ot_type_creating_options' ) ) {
|
|
67 |
echo '<h4>'. __( 'Taxonomy', 'option-tree' ) . ':</h4>';
|
68 |
echo '<p>' . __( 'Add a comma separated list of any registered taxonomy like <code>category,post_tag</code>. This will only affect the following option types: Taxonomy Checkbox, & Taxonomy Select.', 'option-tree' ) . '</p>';
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
echo '</div>';
|
71 |
|
72 |
echo '</div>';
|
@@ -168,7 +174,10 @@ add_filter( \'ot_measurement_unit_types\', \'filter_measurement_unit_types\', 10
|
|
168 |
return $array;
|
169 |
}
|
170 |
add_filter( \'ot_measurement_unit_types\', \'filter_measurement_unit_types\', 10, 2 );</code></pre>';
|
171 |
-
|
|
|
|
|
|
|
172 |
echo '<h4>'. __( 'Page Select', 'option-tree' ) . ':</h4>';
|
173 |
echo '<p>' . __( '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.', 'option-tree' ) . '</p>';
|
174 |
|
@@ -214,6 +223,10 @@ add_filter( \'ot_radio_images\', \'filter_radio_images\', 10, 2 );</code></pre>'
|
|
214 |
echo '<h4>'. __( 'Select', 'option-tree' ) . ':</h4>';
|
215 |
echo '<p>' . __( 'The Select option type is used to list anything you want that would be chosen from a select list.', 'option-tree' ) . '</p>';
|
216 |
|
|
|
|
|
|
|
|
|
217 |
echo '<h4>'. __( 'Slider', 'option-tree' ) . ':</h4>';
|
218 |
echo '<p>' . __( 'The Slider option type is technically deprecated. Use the List Item option type instead, as it\'s infinitely more customizable. Typical use is for creating sliding image content.', 'option-tree' ) . '</p>';
|
219 |
|
@@ -807,7 +820,7 @@ load_template( trailingslashit( get_template_directory() ) . \'includes/theme-op
|
|
807 |
echo '<li>' . __( 'Add a variation of the following code to your <code>theme-options.php</code>. You\'ll obviously need to fill it in with all your custom array values for contextual help (optional), sections (required), and settings (required).', 'option-tree' ) . '</li>';
|
808 |
echo '</ul>';
|
809 |
|
810 |
-
echo '<p>' . __( 'The code below is a boilerplate to get your started. For a full list of the available option types click the "Option Types" tab above. Also a quick note, you don\'t need to put OptionTree in theme mode to manually create options but you will want to hide the docs and settings as each time you load the admin area the settings be
|
811 |
|
812 |
echo "<pre><code>/**
|
813 |
* Initialize the options before anything else.
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
67 |
echo '<h4>'. __( 'Taxonomy', 'option-tree' ) . ':</h4>';
|
68 |
echo '<p>' . __( 'Add a comma separated list of any registered taxonomy like <code>category,post_tag</code>. This will only affect the following option types: Taxonomy Checkbox, & Taxonomy Select.', 'option-tree' ) . '</p>';
|
69 |
|
70 |
+
echo '<h4>'. __( 'Min, Max, & Step', 'option-tree' ) . ':</h4>';
|
71 |
+
echo '<p>' . __( 'Add a comma separated list of options in the following format <code>0,100,1</code> (slide from <code>0-100</code> in intervals of <code>1</code>). The three values represent the minimum, maximum, and step options and will only affect the Numeric Slider option type.', 'option-tree' ) . '</p>';
|
72 |
+
|
73 |
+
echo '<h4>'. __( 'CSS Class', 'option-tree' ) . ':</h4>';
|
74 |
+
echo '<p>' . __( 'Add and optional class to any option type.', 'option-tree' ) . '</p>';
|
75 |
+
|
76 |
echo '</div>';
|
77 |
|
78 |
echo '</div>';
|
174 |
return $array;
|
175 |
}
|
176 |
add_filter( \'ot_measurement_unit_types\', \'filter_measurement_unit_types\', 10, 2 );</code></pre>';
|
177 |
+
|
178 |
+
echo '<h4>'. __( 'Numeric Slider', 'option-tree' ) . ':</h4>';
|
179 |
+
echo '<p>' . __( '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.', 'option-tree' ) . '</p>';
|
180 |
+
|
181 |
echo '<h4>'. __( 'Page Select', 'option-tree' ) . ':</h4>';
|
182 |
echo '<p>' . __( '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.', 'option-tree' ) . '</p>';
|
183 |
|
223 |
echo '<h4>'. __( 'Select', 'option-tree' ) . ':</h4>';
|
224 |
echo '<p>' . __( 'The Select option type is used to list anything you want that would be chosen from a select list.', 'option-tree' ) . '</p>';
|
225 |
|
226 |
+
echo '<h4>'. __( 'Sidebar Select', 'option-tree' ) . ':</h4>';
|
227 |
+
echo '<p>' . __( '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, <code>ot_recognized_sidebars</code>, and <code>ot_recognized_sidebars_{$field_id}</code> we can be selective about which sidebars are available on a specific content area.', 'option-tree' ) . '</p>';
|
228 |
+
echo '<p>' . __( '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 <code>footer-sidebar-$i</code>.', 'option-tree' ) . '</p>';
|
229 |
+
|
230 |
echo '<h4>'. __( 'Slider', 'option-tree' ) . ':</h4>';
|
231 |
echo '<p>' . __( 'The Slider option type is technically deprecated. Use the List Item option type instead, as it\'s infinitely more customizable. Typical use is for creating sliding image content.', 'option-tree' ) . '</p>';
|
232 |
|
820 |
echo '<li>' . __( 'Add a variation of the following code to your <code>theme-options.php</code>. You\'ll obviously need to fill it in with all your custom array values for contextual help (optional), sections (required), and settings (required).', 'option-tree' ) . '</li>';
|
821 |
echo '</ul>';
|
822 |
|
823 |
+
echo '<p>' . __( 'The code below is a boilerplate to get your started. For a full list of the available option types click the "Option Types" tab above. Also a quick note, you don\'t need to put OptionTree in theme mode to manually create options but you will want to hide the docs and settings as each time you load the admin area the settings be written over with the code below if they\'ve changed in any way. However, this ensures your settings do not get tampered with by the end-user.', 'option-tree' ) . '</p>';
|
824 |
|
825 |
echo "<pre><code>/**
|
826 |
* Initialize the options before anything else.
|
includes/ot-functions-option-types.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
-
* @copyright Copyright (c)
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
@@ -34,7 +34,7 @@ if ( ! function_exists( 'ot_display_by_type' ) ) {
|
|
34 |
function ot_display_by_type( $args = array() ) {
|
35 |
|
36 |
/* allow filters to be executed on the array */
|
37 |
-
apply_filters( 'ot_display_by_type', $args );
|
38 |
|
39 |
/* build the function name */
|
40 |
$function_name_by_type = str_replace( '-', '_', 'ot_type_' . $args['type'] );
|
@@ -149,7 +149,7 @@ if ( ! function_exists( 'ot_type_background' ) ) {
|
|
149 |
if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value['background-image'] ) )
|
150 |
echo '<div class="option-tree-ui-image-wrap"><img src="' . esc_url( $field_value['background-image'] ) . '" alt="" /></div>';
|
151 |
|
152 |
-
echo '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button" title="' . __( 'Remove Media', 'option-tree' ) . '"><span class="icon trash-can">' . __( 'Remove Media', 'option-tree' ) . '</span></a>';
|
153 |
|
154 |
echo '</div>';
|
155 |
|
@@ -198,13 +198,11 @@ if ( ! function_exists( 'ot_type_category_checkbox' ) ) {
|
|
198 |
|
199 |
/* build categories */
|
200 |
if ( ! empty( $categories ) ) {
|
201 |
-
$count = 0;
|
202 |
foreach ( $categories as $category ) {
|
203 |
echo '<p>';
|
204 |
-
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $
|
205 |
-
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $
|
206 |
echo '</p>';
|
207 |
-
$count++;
|
208 |
}
|
209 |
} else {
|
210 |
echo '<p>' . __( 'No Categories Found', 'option-tree' ) . '</p>';
|
@@ -450,18 +448,16 @@ if ( ! function_exists( 'ot_type_custom_post_type_checkbox' ) ) {
|
|
450 |
$post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' );
|
451 |
|
452 |
/* query posts array */
|
453 |
-
$query = new WP_Query( array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ) );
|
454 |
|
455 |
/* has posts */
|
456 |
if ( $query->have_posts() ) {
|
457 |
-
$count = 0;
|
458 |
while ( $query->have_posts() ) {
|
459 |
$query->the_post();
|
460 |
echo '<p>';
|
461 |
-
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr(
|
462 |
-
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr(
|
463 |
echo '</p>';
|
464 |
-
$count++;
|
465 |
}
|
466 |
} else {
|
467 |
echo '<p>' . __( 'No Posts Found', 'option-tree' ) . '</p>';
|
@@ -512,7 +508,7 @@ if ( ! function_exists( 'ot_type_custom_post_type_select' ) ) {
|
|
512 |
$post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' );
|
513 |
|
514 |
/* query posts array */
|
515 |
-
$query = new WP_Query( array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ) );
|
516 |
|
517 |
/* has posts */
|
518 |
if ( $query->have_posts() ) {
|
@@ -596,7 +592,7 @@ if ( ! function_exists( 'ot_type_list_item' ) ) {
|
|
596 |
echo '<a href="javascript:void(0);" class="option-tree-list-item-add option-tree-ui-button blue right hug-right" title="' . __( 'Add New', 'option-tree' ) . '">' . __( 'Add New', 'option-tree' ) . '</a>';
|
597 |
|
598 |
/* description */
|
599 |
-
echo '<div class="list-item-description">' . __( 'You can re-order with drag & drop, the order will update after saving.', 'option-tree' ) . '</div>';
|
600 |
|
601 |
echo '</div>';
|
602 |
|
@@ -661,6 +657,58 @@ if ( ! function_exists( 'ot_type_measurement' ) ) {
|
|
661 |
|
662 |
}
|
663 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
/**
|
665 |
* Page Checkbox option type.
|
666 |
*
|
@@ -692,18 +740,16 @@ if ( ! function_exists( 'ot_type_page_checkbox' ) ) {
|
|
692 |
echo '<div class="format-setting-inner">';
|
693 |
|
694 |
/* query pages array */
|
695 |
-
$query = new WP_Query( array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ) );
|
696 |
|
697 |
/* has pages */
|
698 |
if ( $query->have_posts() ) {
|
699 |
-
$count = 0;
|
700 |
while ( $query->have_posts() ) {
|
701 |
$query->the_post();
|
702 |
echo '<p>';
|
703 |
-
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr(
|
704 |
-
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr(
|
705 |
echo '</p>';
|
706 |
-
$count++;
|
707 |
}
|
708 |
} else {
|
709 |
echo '<p>' . __( 'No Pages Found', 'option-tree' ) . '</p>';
|
@@ -751,7 +797,7 @@ if ( ! function_exists( 'ot_type_page_select' ) ) {
|
|
751 |
echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">';
|
752 |
|
753 |
/* query pages array */
|
754 |
-
$query = new WP_Query( array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ) );
|
755 |
|
756 |
/* has pages */
|
757 |
if ( $query->have_posts() ) {
|
@@ -876,18 +922,16 @@ if ( ! function_exists( 'ot_type_post_checkbox' ) ) {
|
|
876 |
echo '<div class="format-setting-inner">';
|
877 |
|
878 |
/* query posts array */
|
879 |
-
$query = new WP_Query( array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ) );
|
880 |
|
881 |
/* has posts */
|
882 |
if ( $query->have_posts() ) {
|
883 |
-
$count = 0;
|
884 |
while ( $query->have_posts() ) {
|
885 |
$query->the_post();
|
886 |
echo '<p>';
|
887 |
-
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr(
|
888 |
-
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr(
|
889 |
echo '</p>';
|
890 |
-
$count++;
|
891 |
}
|
892 |
} else {
|
893 |
echo '<p>' . __( 'No Posts Found', 'option-tree' ) . '</p>';
|
@@ -935,7 +979,7 @@ if ( ! function_exists( 'ot_type_post_select' ) ) {
|
|
935 |
echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">';
|
936 |
|
937 |
/* query posts array */
|
938 |
-
$query = new WP_Query( array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ) );
|
939 |
|
940 |
/* has posts */
|
941 |
if ( $query->have_posts() ) {
|
@@ -1039,9 +1083,13 @@ if ( ! function_exists( 'ot_type_radio_image' ) ) {
|
|
1039 |
|
1040 |
/* build radio image */
|
1041 |
foreach ( (array) $field_choices as $key => $choice ) {
|
|
|
|
|
|
|
|
|
1042 |
echo '<div class="option-tree-ui-radio-images">';
|
1043 |
echo '<p style="display:none"><input type="radio" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '"' . checked( $field_value, $choice['value'], false ) . ' class="option-tree-ui-radio option-tree-ui-images" /><label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '">' . esc_attr( $choice['label'] ) . '</label></p>';
|
1044 |
-
echo '<img src="' . esc_url( $
|
1045 |
echo '</div>';
|
1046 |
}
|
1047 |
|
@@ -1100,6 +1148,79 @@ if ( ! function_exists( 'ot_type_select' ) ) {
|
|
1100 |
|
1101 |
}
|
1102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1103 |
/**
|
1104 |
* Tag Checkbox option type.
|
1105 |
*
|
@@ -1135,13 +1256,11 @@ if ( ! function_exists( 'ot_type_tag_checkbox' ) ) {
|
|
1135 |
|
1136 |
/* has tags */
|
1137 |
if ( $tags ) {
|
1138 |
-
$count = 0;
|
1139 |
foreach( $tags as $tag ) {
|
1140 |
echo '<p>';
|
1141 |
-
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $
|
1142 |
-
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $
|
1143 |
echo '</p>';
|
1144 |
-
$count++;
|
1145 |
}
|
1146 |
} else {
|
1147 |
echo '<p>' . __( 'No Tags Found', 'option-tree' ) . '</p>';
|
@@ -1248,13 +1367,11 @@ if ( ! function_exists( 'ot_type_taxonomy_checkbox' ) ) {
|
|
1248 |
|
1249 |
/* has tags */
|
1250 |
if ( $taxonomies ) {
|
1251 |
-
$count = 0;
|
1252 |
foreach( $taxonomies as $taxonomy ) {
|
1253 |
echo '<p>';
|
1254 |
-
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $
|
1255 |
-
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $
|
1256 |
echo '</p>';
|
1257 |
-
$count++;
|
1258 |
}
|
1259 |
} else {
|
1260 |
echo '<p>' . __( 'No Taxonomies Found', 'option-tree' ) . '</p>';
|
@@ -1751,7 +1868,7 @@ if ( ! function_exists( 'ot_type_upload' ) ) {
|
|
1751 |
if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value ) )
|
1752 |
echo '<div class="option-tree-ui-image-wrap"><img src="' . esc_url( $field_value ) . '" alt="" /></div>';
|
1753 |
|
1754 |
-
echo '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button" title="' . __( 'Remove Media', 'option-tree' ) . '"><span class="icon trash-can">' . __( 'Remove Media', 'option-tree' ) . '</span></a>';
|
1755 |
|
1756 |
echo '</div>';
|
1757 |
|
@@ -1766,4 +1883,4 @@ if ( ! function_exists( 'ot_type_upload' ) ) {
|
|
1766 |
}
|
1767 |
|
1768 |
/* End of file ot-functions-option-types.php */
|
1769 |
-
/* Location: ./includes/ot-functions-option-types.php */
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
34 |
function ot_display_by_type( $args = array() ) {
|
35 |
|
36 |
/* allow filters to be executed on the array */
|
37 |
+
$args = apply_filters( 'ot_display_by_type', $args );
|
38 |
|
39 |
/* build the function name */
|
40 |
$function_name_by_type = str_replace( '-', '_', 'ot_type_' . $args['type'] );
|
149 |
if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value['background-image'] ) )
|
150 |
echo '<div class="option-tree-ui-image-wrap"><img src="' . esc_url( $field_value['background-image'] ) . '" alt="" /></div>';
|
151 |
|
152 |
+
echo '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button red light" title="' . __( 'Remove Media', 'option-tree' ) . '"><span class="icon trash-can">' . __( 'Remove Media', 'option-tree' ) . '</span></a>';
|
153 |
|
154 |
echo '</div>';
|
155 |
|
198 |
|
199 |
/* build categories */
|
200 |
if ( ! empty( $categories ) ) {
|
|
|
201 |
foreach ( $categories as $category ) {
|
202 |
echo '<p>';
|
203 |
+
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $category->term_id ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $category->term_id ) . '" value="' . esc_attr( $category->term_id ) . '" ' . ( isset( $field_value[$category->term_id] ) ? checked( $field_value[$category->term_id], $category->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />';
|
204 |
+
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $category->term_id ) . '">' . esc_attr( $category->name ) . '</label>';
|
205 |
echo '</p>';
|
|
|
206 |
}
|
207 |
} else {
|
208 |
echo '<p>' . __( 'No Categories Found', 'option-tree' ) . '</p>';
|
448 |
$post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' );
|
449 |
|
450 |
/* query posts array */
|
451 |
+
$query = new WP_Query( apply_filters( 'ot_type_custom_post_type_checkbox_query', array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
|
452 |
|
453 |
/* has posts */
|
454 |
if ( $query->have_posts() ) {
|
|
|
455 |
while ( $query->have_posts() ) {
|
456 |
$query->the_post();
|
457 |
echo '<p>';
|
458 |
+
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( get_the_ID() ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( get_the_ID() ) . '" value="' . esc_attr( get_the_ID() ) . '" ' . ( isset( $field_value[get_the_ID()] ) ? checked( $field_value[get_the_ID()], get_the_ID(), false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />';
|
459 |
+
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( get_the_ID() ) . '">' . get_the_title() . '</label>';
|
460 |
echo '</p>';
|
|
|
461 |
}
|
462 |
} else {
|
463 |
echo '<p>' . __( 'No Posts Found', 'option-tree' ) . '</p>';
|
508 |
$post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' );
|
509 |
|
510 |
/* query posts array */
|
511 |
+
$query = new WP_Query( apply_filters( 'ot_type_custom_post_type_select_query', array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
|
512 |
|
513 |
/* has posts */
|
514 |
if ( $query->have_posts() ) {
|
592 |
echo '<a href="javascript:void(0);" class="option-tree-list-item-add option-tree-ui-button blue right hug-right" title="' . __( 'Add New', 'option-tree' ) . '">' . __( 'Add New', 'option-tree' ) . '</a>';
|
593 |
|
594 |
/* description */
|
595 |
+
echo '<div class="list-item-description">' . apply_filters( 'ot_list_item_description', __( 'You can re-order with drag & drop, the order will update after saving.', 'option-tree' ), $field_id ) . '</div>';
|
596 |
|
597 |
echo '</div>';
|
598 |
|
657 |
|
658 |
}
|
659 |
|
660 |
+
/**
|
661 |
+
* Numeric Slider option type.
|
662 |
+
*
|
663 |
+
* See @ot_display_by_type to see the full list of available arguments.
|
664 |
+
*
|
665 |
+
* @param array An array of arguments.
|
666 |
+
* @return string
|
667 |
+
*
|
668 |
+
* @access public
|
669 |
+
* @since 2.1
|
670 |
+
*/
|
671 |
+
if( ! function_exists( 'ot_type_numeric_slider' ) ) {
|
672 |
+
|
673 |
+
function ot_type_numeric_slider( $args = array() ) {
|
674 |
+
|
675 |
+
/* turns arguments array into variables */
|
676 |
+
extract( $args );
|
677 |
+
|
678 |
+
/* verify a description */
|
679 |
+
$has_desc = $field_desc ? true : false;
|
680 |
+
|
681 |
+
$_options = explode( ',', $field_min_max_step );
|
682 |
+
$min = isset( $_options[0] ) ? $_options[0] : 0;
|
683 |
+
$max = isset( $_options[1] ) ? $_options[1] : 100;
|
684 |
+
$step = isset( $_options[2] ) ? $_options[2] : 1;
|
685 |
+
|
686 |
+
/* format setting outer wrapper */
|
687 |
+
echo '<div class="format-setting type-numeric-slider ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">';
|
688 |
+
|
689 |
+
/* description */
|
690 |
+
echo $has_desc ? '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>' : '';
|
691 |
+
|
692 |
+
/* format setting inner wrapper */
|
693 |
+
echo '<div class="format-setting-inner">';
|
694 |
+
|
695 |
+
echo '<div class="ot-numeric-slider-wrap">';
|
696 |
+
|
697 |
+
echo '<input type="hidden" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="ot-numeric-slider-hidden-input" value="' . esc_attr( $field_value ) . '" data-min="' . esc_attr( $min ) . '" data-max="' . esc_attr( $max ) . '" data-step="' . esc_attr( $step ) . '">';
|
698 |
+
|
699 |
+
echo '<input type="text" class="ot-numeric-slider-helper-input widefat option-tree-ui-input" value="' . esc_attr( $field_value ) . '" readonly>';
|
700 |
+
|
701 |
+
echo '<div id="ot_numeric_slider_' . esc_attr( $field_id ) . '" class="ot-numeric-slider"></div>';
|
702 |
+
|
703 |
+
echo '</div>';
|
704 |
+
|
705 |
+
echo '</div>';
|
706 |
+
|
707 |
+
echo '</div>';
|
708 |
+
}
|
709 |
+
|
710 |
+
}
|
711 |
+
|
712 |
/**
|
713 |
* Page Checkbox option type.
|
714 |
*
|
740 |
echo '<div class="format-setting-inner">';
|
741 |
|
742 |
/* query pages array */
|
743 |
+
$query = new WP_Query( apply_filters( 'ot_type_page_checkbox_query', array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
|
744 |
|
745 |
/* has pages */
|
746 |
if ( $query->have_posts() ) {
|
|
|
747 |
while ( $query->have_posts() ) {
|
748 |
$query->the_post();
|
749 |
echo '<p>';
|
750 |
+
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( get_the_ID() ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( get_the_ID() ) . '" value="' . esc_attr( get_the_ID() ) . '" ' . ( isset( $field_value[get_the_ID()] ) ? checked( $field_value[get_the_ID()], get_the_ID(), false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />';
|
751 |
+
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( get_the_ID() ) . '">' . get_the_title() . '</label>';
|
752 |
echo '</p>';
|
|
|
753 |
}
|
754 |
} else {
|
755 |
echo '<p>' . __( 'No Pages Found', 'option-tree' ) . '</p>';
|
797 |
echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">';
|
798 |
|
799 |
/* query pages array */
|
800 |
+
$query = new WP_Query( apply_filters( 'ot_type_page_select_query', array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
|
801 |
|
802 |
/* has pages */
|
803 |
if ( $query->have_posts() ) {
|
922 |
echo '<div class="format-setting-inner">';
|
923 |
|
924 |
/* query posts array */
|
925 |
+
$query = new WP_Query( apply_filters( 'ot_type_post_checkbox_query', array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
|
926 |
|
927 |
/* has posts */
|
928 |
if ( $query->have_posts() ) {
|
|
|
929 |
while ( $query->have_posts() ) {
|
930 |
$query->the_post();
|
931 |
echo '<p>';
|
932 |
+
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( get_the_ID() ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( get_the_ID() ) . '" value="' . esc_attr( get_the_ID() ) . '" ' . ( isset( $field_value[get_the_ID()] ) ? checked( $field_value[get_the_ID()], get_the_ID(), false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />';
|
933 |
+
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( get_the_ID() ) . '">' . esc_attr( get_the_title() ) . '</label>';
|
934 |
echo '</p>';
|
|
|
935 |
}
|
936 |
} else {
|
937 |
echo '<p>' . __( 'No Posts Found', 'option-tree' ) . '</p>';
|
979 |
echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">';
|
980 |
|
981 |
/* query posts array */
|
982 |
+
$query = new WP_Query( apply_filters( 'ot_type_post_select_query', array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) );
|
983 |
|
984 |
/* has posts */
|
985 |
if ( $query->have_posts() ) {
|
1083 |
|
1084 |
/* build radio image */
|
1085 |
foreach ( (array) $field_choices as $key => $choice ) {
|
1086 |
+
|
1087 |
+
$src = str_replace( 'OT_URL', OT_URL, $choice['src'] );
|
1088 |
+
$src = str_replace( 'OT_THEME_URL', OT_THEME_URL, $src );
|
1089 |
+
|
1090 |
echo '<div class="option-tree-ui-radio-images">';
|
1091 |
echo '<p style="display:none"><input type="radio" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '"' . checked( $field_value, $choice['value'], false ) . ' class="option-tree-ui-radio option-tree-ui-images" /><label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '">' . esc_attr( $choice['label'] ) . '</label></p>';
|
1092 |
+
echo '<img src="' . esc_url( $src ) . '" alt="' . esc_attr( $choice['label'] ) .'" title="' . esc_attr( $choice['label'] ) .'" class="option-tree-ui-radio-image ' . esc_attr( $field_class ) . ( $field_value == $choice['value'] ? ' option-tree-ui-radio-image-selected' : '' ) . '" />';
|
1093 |
echo '</div>';
|
1094 |
}
|
1095 |
|
1148 |
|
1149 |
}
|
1150 |
|
1151 |
+
/**
|
1152 |
+
* Sidebar Select option type.
|
1153 |
+
*
|
1154 |
+
* This option type makes it possible for users to select a WordPress registered sidebar
|
1155 |
+
* to use on a specific area. By using the two provided filters, 'ot_recognized_sidebars',
|
1156 |
+
* and 'ot_recognized_sidebars_{$field_id}' we can be selective about which sidebars are
|
1157 |
+
* available on a specific content area.
|
1158 |
+
*
|
1159 |
+
* For example, if we create a WordPress theme that provides the ability to change the
|
1160 |
+
* Blog Sidebar and we don't want to have the footer sidebars available on this area,
|
1161 |
+
* we can unset those sidebars either manually or by using a regular expression if we
|
1162 |
+
* have a common name like footer-sidebar-$i.
|
1163 |
+
*
|
1164 |
+
* @param array An array of arguments.
|
1165 |
+
* @return string
|
1166 |
+
*
|
1167 |
+
* @access public
|
1168 |
+
* @since 2.1
|
1169 |
+
*/
|
1170 |
+
if ( ! function_exists( 'ot_type_sidebar_select' ) ) {
|
1171 |
+
|
1172 |
+
function ot_type_sidebar_select( $args = array() ) {
|
1173 |
+
|
1174 |
+
/* turns arguments array into variables */
|
1175 |
+
extract( $args );
|
1176 |
+
|
1177 |
+
/* verify a description */
|
1178 |
+
$has_desc = $field_desc ? true : false;
|
1179 |
+
|
1180 |
+
/* format setting outer wrapper */
|
1181 |
+
echo '<div class="format-setting type-sidebar-select ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '">';
|
1182 |
+
|
1183 |
+
/* description */
|
1184 |
+
echo $has_desc ? '<div class="description">' . htmlspecialchars_decode( $field_desc ) . '</div>' : '';
|
1185 |
+
|
1186 |
+
/* format setting inner wrapper */
|
1187 |
+
echo '<div class="format-setting-inner">';
|
1188 |
+
|
1189 |
+
/* build page select */
|
1190 |
+
echo '<select name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '" class="option-tree-ui-select ' . $field_class . '">';
|
1191 |
+
|
1192 |
+
/* get the registered sidebars */
|
1193 |
+
global $wp_registered_sidebars;
|
1194 |
+
|
1195 |
+
$sidebars = array();
|
1196 |
+
foreach( $wp_registered_sidebars as $id=>$sidebar ) {
|
1197 |
+
$sidebars[ $id ] = $sidebar[ 'name' ];
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
/* filters to restrict which sidebars are allowed to be selected, for example we can restrict footer sidebars to be selectable on a blog page */
|
1201 |
+
$sidebars = apply_filters( 'ot_recognized_sidebars', $sidebars );
|
1202 |
+
$sidebars = apply_filters( 'ot_recognized_sidebars_' . $field_id, $sidebars );
|
1203 |
+
|
1204 |
+
/* has sidebars */
|
1205 |
+
if ( count( $sidebars ) ) {
|
1206 |
+
echo '<option value="">-- ' . __( 'Choose Sidebar', 'option-tree' ) . ' --</option>';
|
1207 |
+
foreach ( $sidebars as $id => $sidebar ) {
|
1208 |
+
echo '<option value="' . esc_attr( $id ) . '"' . selected( $field_value, $id, false ) . '>' . esc_attr( $sidebar ) . '</option>';
|
1209 |
+
}
|
1210 |
+
} else {
|
1211 |
+
echo '<option value="">' . __( 'No Sidebars', 'option-tree' ) . '</option>';
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
echo '</select>';
|
1215 |
+
|
1216 |
+
echo '</div>';
|
1217 |
+
|
1218 |
+
echo '</div>';
|
1219 |
+
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
}
|
1223 |
+
|
1224 |
/**
|
1225 |
* Tag Checkbox option type.
|
1226 |
*
|
1256 |
|
1257 |
/* has tags */
|
1258 |
if ( $tags ) {
|
|
|
1259 |
foreach( $tags as $tag ) {
|
1260 |
echo '<p>';
|
1261 |
+
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $tag->term_id ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $tag->term_id ) . '" value="' . esc_attr( $tag->term_id ) . '" ' . ( isset( $field_value[$tag->term_id] ) ? checked( $field_value[$tag->term_id], $tag->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />';
|
1262 |
+
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $tag->term_id ) . '">' . esc_attr( $tag->name ) . '</label>';
|
1263 |
echo '</p>';
|
|
|
1264 |
}
|
1265 |
} else {
|
1266 |
echo '<p>' . __( 'No Tags Found', 'option-tree' ) . '</p>';
|
1367 |
|
1368 |
/* has tags */
|
1369 |
if ( $taxonomies ) {
|
|
|
1370 |
foreach( $taxonomies as $taxonomy ) {
|
1371 |
echo '<p>';
|
1372 |
+
echo '<input type="checkbox" name="' . esc_attr( $field_name ) . '[' . esc_attr( $taxonomy->term_id ) . ']" id="' . esc_attr( $field_id ) . '-' . esc_attr( $taxonomy->term_id ) . '" value="' . esc_attr( $taxonomy->term_id ) . '" ' . ( isset( $field_value[$taxonomy->term_id] ) ? checked( $field_value[$taxonomy->term_id], $taxonomy->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />';
|
1373 |
+
echo '<label for="' . esc_attr( $field_id ) . '-' . esc_attr( $taxonomy->term_id ) . '">' . esc_attr( $taxonomy->name ) . '</label>';
|
1374 |
echo '</p>';
|
|
|
1375 |
}
|
1376 |
} else {
|
1377 |
echo '<p>' . __( 'No Taxonomies Found', 'option-tree' ) . '</p>';
|
1868 |
if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value ) )
|
1869 |
echo '<div class="option-tree-ui-image-wrap"><img src="' . esc_url( $field_value ) . '" alt="" /></div>';
|
1870 |
|
1871 |
+
echo '<a href="javascript:(void);" class="option-tree-ui-remove-media option-tree-ui-button red light" title="' . __( 'Remove Media', 'option-tree' ) . '"><span class="icon trash-can">' . __( 'Remove Media', 'option-tree' ) . '</span></a>';
|
1872 |
|
1873 |
echo '</div>';
|
1874 |
|
1883 |
}
|
1884 |
|
1885 |
/* End of file ot-functions-option-types.php */
|
1886 |
+
/* Location: ./includes/ot-functions-option-types.php */
|
includes/ot-functions-settings-page.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
-
* @copyright Copyright (c)
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
@@ -89,9 +89,9 @@ if ( ! function_exists( 'ot_type_theme_options_ui' ) ) {
|
|
89 |
echo '</ul>';
|
90 |
|
91 |
/* buttons */
|
92 |
-
echo '<a href="javascript:void(0);" class="option-tree-section-add option-tree-ui-button
|
93 |
-
echo '<a href="javascript:void(0);" class="option-tree-setting-add
|
94 |
-
echo '<button class="option-tree-ui-button
|
95 |
|
96 |
/* sidebar textarea */
|
97 |
echo '
|
@@ -129,8 +129,8 @@ if ( ! function_exists( 'ot_type_theme_options_ui' ) ) {
|
|
129 |
|
130 |
echo '</ul>';
|
131 |
|
132 |
-
echo '<a href="javascript:void(0);" class="option-tree-help-add
|
133 |
-
echo '<button class="option-tree-ui-button
|
134 |
|
135 |
echo '</div>';
|
136 |
|
@@ -170,7 +170,7 @@ if ( ! function_exists( 'ot_type_import_xml' ) ) {
|
|
170 |
echo '<p>' . __( 'If you were given a Theme Options XML file with a premium or free theme, locate it on your hard drive and upload that file by clicking the blue upload button. A popup window will appear, upload the XML file and click "Send to OptionTree". The file URL should be in the upload input, if it is click "Import XML".', 'option-tree' ) . '</p>';
|
171 |
|
172 |
/* button */
|
173 |
-
echo '<button class="option-tree-ui-button
|
174 |
|
175 |
echo '</div>';
|
176 |
|
@@ -226,7 +226,7 @@ if ( ! function_exists( 'ot_type_import_settings' ) ) {
|
|
226 |
echo '<p>' . __( 'To import your Settings copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Settings" button.', 'option-tree' ) . '</p>';
|
227 |
|
228 |
/* button */
|
229 |
-
echo '<button class="option-tree-ui-button
|
230 |
|
231 |
echo '</div>';
|
232 |
|
@@ -268,12 +268,12 @@ if ( ! function_exists( 'ot_type_import_data' ) ) {
|
|
268 |
/* description */
|
269 |
echo '<div class="description">';
|
270 |
|
271 |
-
echo '<p>' . __( 'Only after you\'ve imported the Settings should you try and update your Theme Options.', 'option-tree' ) . '</p>';
|
272 |
|
273 |
echo '<p>' . __( 'To import your Theme Options copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Theme Options" button.', 'option-tree' ) . '</p>';
|
274 |
|
275 |
/* button */
|
276 |
-
echo '<button class="option-tree-ui-button
|
277 |
|
278 |
echo '</div>';
|
279 |
|
@@ -315,12 +315,12 @@ if ( ! function_exists( 'ot_type_import_layouts' ) ) {
|
|
315 |
/* description */
|
316 |
echo '<div class="description">';
|
317 |
|
318 |
-
echo '<p>' . __( 'Only after you\'ve imported the Settings should you try and update your Layouts.', 'option-tree' ) . '</p>';
|
319 |
|
320 |
echo '<p>' . __( 'To import your Layouts copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Layouts" button. Keep in mind that when you import your layouts, the active layout\'s saved data will write over the current data set for your Theme Options.', 'option-tree' ) . '</p>';
|
321 |
|
322 |
/* button */
|
323 |
-
echo '<button class="option-tree-ui-button
|
324 |
|
325 |
echo '</div>';
|
326 |
|
@@ -370,7 +370,7 @@ if ( ! function_exists( 'ot_type_export_settings_file' ) ) {
|
|
370 |
echo '<div class="format-setting-inner">';
|
371 |
|
372 |
/* button */
|
373 |
-
echo '<button class="option-tree-ui-button
|
374 |
|
375 |
echo '</div>';
|
376 |
|
@@ -517,7 +517,7 @@ if ( ! function_exists( 'ot_type_modify_layouts' ) ) {
|
|
517 |
echo '<p>' . __( 'To add a new layout enter a unique lower case alphanumeric string (dashes allowed) in the text field and click "Save Layouts".', 'option-tree' ) . '</p>';
|
518 |
echo '<p>' . __( 'As well, you can activate, remove, and drag & drop the order; all situations require you to click "Save Layouts" for the changes to be applied.', 'option-tree' ) . '</p>';
|
519 |
echo '<p>' . __( 'When you create a new layout it will become active and any changes made to the Theme Options will be applied to it. If you switch back to a different layout immediately after creating a new layout that new layout will have a snapshot of the current Theme Options data attached to it.', 'option-tree' ) . '</p>';
|
520 |
-
echo '<p>' . __( 'Visit <code>OptionTree->Documentation->Layouts Overview</code> to see a more in-depth description of what layouts are and how to use them.', 'option-tree' ) . '</p>';
|
521 |
|
522 |
echo '</div>';
|
523 |
|
@@ -554,7 +554,7 @@ if ( ! function_exists( 'ot_type_modify_layouts' ) ) {
|
|
554 |
|
555 |
echo '</ul>';
|
556 |
|
557 |
-
echo '<button class="option-tree-ui-button
|
558 |
|
559 |
echo '</div>';
|
560 |
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
89 |
echo '</ul>';
|
90 |
|
91 |
/* buttons */
|
92 |
+
echo '<a href="javascript:void(0);" class="option-tree-section-add option-tree-ui-button hug-left">' . __( 'Add Section', 'option-tree' ) . '</a>';
|
93 |
+
echo '<a href="javascript:void(0);" class="option-tree-setting-add option-tree-ui-button">' . __( 'Add Setting', 'option-tree' ) . '</a>';
|
94 |
+
echo '<button class="option-tree-ui-button blue right hug-right">' . __( 'Save Changes', 'option-tree' ) . '</button>';
|
95 |
|
96 |
/* sidebar textarea */
|
97 |
echo '
|
129 |
|
130 |
echo '</ul>';
|
131 |
|
132 |
+
echo '<a href="javascript:void(0);" class="option-tree-help-add option-tree-ui-button hug-left">' . __( 'Add Contextual Help Content', 'option-tree' ) . '</a>';
|
133 |
+
echo '<button class="option-tree-ui-button blue right hug-right">' . __( 'Save Changes', 'option-tree' ) . '</button>';
|
134 |
|
135 |
echo '</div>';
|
136 |
|
170 |
echo '<p>' . __( 'If you were given a Theme Options XML file with a premium or free theme, locate it on your hard drive and upload that file by clicking the blue upload button. A popup window will appear, upload the XML file and click "Send to OptionTree". The file URL should be in the upload input, if it is click "Import XML".', 'option-tree' ) . '</p>';
|
171 |
|
172 |
/* button */
|
173 |
+
echo '<button class="option-tree-ui-button blue right hug-right">' . __( 'Import XML', 'option-tree' ) . '</button>';
|
174 |
|
175 |
echo '</div>';
|
176 |
|
226 |
echo '<p>' . __( 'To import your Settings copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Settings" button.', 'option-tree' ) . '</p>';
|
227 |
|
228 |
/* button */
|
229 |
+
echo '<button class="option-tree-ui-button blue right hug-right">' . __( 'Import Settings', 'option-tree' ) . '</button>';
|
230 |
|
231 |
echo '</div>';
|
232 |
|
268 |
/* description */
|
269 |
echo '<div class="description">';
|
270 |
|
271 |
+
if ( OT_SHOW_SETTINGS_IMPORT ) echo '<p>' . __( 'Only after you\'ve imported the Settings should you try and update your Theme Options.', 'option-tree' ) . '</p>';
|
272 |
|
273 |
echo '<p>' . __( 'To import your Theme Options copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Theme Options" button.', 'option-tree' ) . '</p>';
|
274 |
|
275 |
/* button */
|
276 |
+
echo '<button class="option-tree-ui-button blue right hug-right">' . __( 'Import Theme Options', 'option-tree' ) . '</button>';
|
277 |
|
278 |
echo '</div>';
|
279 |
|
315 |
/* description */
|
316 |
echo '<div class="description">';
|
317 |
|
318 |
+
if ( OT_SHOW_SETTINGS_IMPORT ) echo '<p>' . __( 'Only after you\'ve imported the Settings should you try and update your Layouts.', 'option-tree' ) . '</p>';
|
319 |
|
320 |
echo '<p>' . __( 'To import your Layouts copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Layouts" button. Keep in mind that when you import your layouts, the active layout\'s saved data will write over the current data set for your Theme Options.', 'option-tree' ) . '</p>';
|
321 |
|
322 |
/* button */
|
323 |
+
echo '<button class="option-tree-ui-button blue right hug-right">' . __( 'Import Layouts', 'option-tree' ) . '</button>';
|
324 |
|
325 |
echo '</div>';
|
326 |
|
370 |
echo '<div class="format-setting-inner">';
|
371 |
|
372 |
/* button */
|
373 |
+
echo '<button class="option-tree-ui-button blue hug-left">' . __( 'Export Settings File', 'option-tree' ) . '</button>';
|
374 |
|
375 |
echo '</div>';
|
376 |
|
517 |
echo '<p>' . __( 'To add a new layout enter a unique lower case alphanumeric string (dashes allowed) in the text field and click "Save Layouts".', 'option-tree' ) . '</p>';
|
518 |
echo '<p>' . __( 'As well, you can activate, remove, and drag & drop the order; all situations require you to click "Save Layouts" for the changes to be applied.', 'option-tree' ) . '</p>';
|
519 |
echo '<p>' . __( 'When you create a new layout it will become active and any changes made to the Theme Options will be applied to it. If you switch back to a different layout immediately after creating a new layout that new layout will have a snapshot of the current Theme Options data attached to it.', 'option-tree' ) . '</p>';
|
520 |
+
if ( OT_SHOW_DOCS ) echo '<p>' . __( 'Visit <code>OptionTree->Documentation->Layouts Overview</code> to see a more in-depth description of what layouts are and how to use them.', 'option-tree' ) . '</p>';
|
521 |
|
522 |
echo '</div>';
|
523 |
|
554 |
|
555 |
echo '</ul>';
|
556 |
|
557 |
+
echo '<button class="option-tree-ui-button blue right hug-right">' . __( 'Save Layouts', 'option-tree' ) . '</button>';
|
558 |
|
559 |
echo '</div>';
|
560 |
|
includes/ot-functions.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
-
* @copyright Copyright (c)
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
@@ -31,7 +31,7 @@ if ( ! function_exists( 'ot_get_option' ) ) {
|
|
31 |
/* look for the saved value */
|
32 |
if ( isset( $options[$option_id] ) && '' != $options[$option_id] ) {
|
33 |
|
34 |
-
return $options
|
35 |
|
36 |
}
|
37 |
|
@@ -41,6 +41,74 @@ if ( ! function_exists( 'ot_get_option' ) ) {
|
|
41 |
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* Enqueue the dynamic CSS.
|
46 |
*
|
@@ -96,5 +164,33 @@ if ( ! function_exists( 'ot_load_dynamic_css' ) ) {
|
|
96 |
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
/* End of file ot-functions.php */
|
100 |
/* Location: ./includes/ot-functions.php */
|
4 |
*
|
5 |
* @package OptionTree
|
6 |
* @author Derek Herman <derek@valendesigns.com>
|
7 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
8 |
* @since 2.0
|
9 |
*/
|
10 |
|
31 |
/* look for the saved value */
|
32 |
if ( isset( $options[$option_id] ) && '' != $options[$option_id] ) {
|
33 |
|
34 |
+
return ot_wpml_filter( $options, $option_id );
|
35 |
|
36 |
}
|
37 |
|
41 |
|
42 |
}
|
43 |
|
44 |
+
/**
|
45 |
+
* Filter the return values through WPML
|
46 |
+
*
|
47 |
+
* @param array $options The current options
|
48 |
+
* @param string $option_id The option ID
|
49 |
+
* @return mixed
|
50 |
+
*
|
51 |
+
* @access public
|
52 |
+
* @since 2.1
|
53 |
+
*/
|
54 |
+
if ( ! function_exists( 'ot_wpml_filter' ) ) {
|
55 |
+
|
56 |
+
function ot_wpml_filter( $options, $option_id ) {
|
57 |
+
|
58 |
+
// Return translated strings using WMPL
|
59 |
+
if ( function_exists('icl_t') ) {
|
60 |
+
|
61 |
+
$settings = get_option( 'option_tree_settings' );
|
62 |
+
|
63 |
+
if ( isset( $settings['settings'] ) ) {
|
64 |
+
|
65 |
+
foreach( $settings['settings'] as $setting ) {
|
66 |
+
|
67 |
+
// List Item & Slider
|
68 |
+
if ( $option_id == $setting['id'] && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
|
69 |
+
|
70 |
+
foreach( $options[$option_id] as $key => $value ) {
|
71 |
+
|
72 |
+
foreach( $value as $ckey => $cvalue ) {
|
73 |
+
|
74 |
+
$id = $option_id . '_' . $ckey . '_' . $key;
|
75 |
+
$_string = icl_t( 'Theme Options', $id, $cvalue );
|
76 |
+
|
77 |
+
if ( ! empty( $_string ) ) {
|
78 |
+
|
79 |
+
$options[$option_id][$key][$ckey] = $_string;
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
// All other acceptable option types
|
88 |
+
} else if ( $option_id == $setting['id'] && in_array( $setting['type'], apply_filters( 'ot_wpml_option_types', array( 'text', 'textarea', 'textarea-simple' ) ) ) ) {
|
89 |
+
|
90 |
+
$_string = icl_t( 'Theme Options', $option_id, $options[$option_id] );
|
91 |
+
|
92 |
+
if ( ! empty( $_string ) ) {
|
93 |
+
|
94 |
+
$options[$option_id] = $_string;
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
return $options[$option_id];
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
/**
|
113 |
* Enqueue the dynamic CSS.
|
114 |
*
|
164 |
|
165 |
}
|
166 |
|
167 |
+
/**
|
168 |
+
* Registers the Theme Option page link for the admin bar.
|
169 |
+
*
|
170 |
+
* @uses ot_register_settings()
|
171 |
+
*
|
172 |
+
* @return void
|
173 |
+
*
|
174 |
+
* @access public
|
175 |
+
* @since 2.1
|
176 |
+
*/
|
177 |
+
if ( ! function_exists( 'ot_register_theme_options_admin_bar_menu' ) ) {
|
178 |
+
|
179 |
+
function ot_register_theme_options_admin_bar_menu( $wp_admin_bar ) {
|
180 |
+
|
181 |
+
if ( ! current_user_can( apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ) ) || ! is_admin_bar_showing() )
|
182 |
+
return;
|
183 |
+
|
184 |
+
$wp_admin_bar->add_node( array(
|
185 |
+
'parent' => 'appearance',
|
186 |
+
'id' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ),
|
187 |
+
'title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
|
188 |
+
'href' => admin_url( apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ) . '?page=' . apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) )
|
189 |
+
) );
|
190 |
+
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
/* End of file ot-functions.php */
|
196 |
/* Location: ./includes/ot-functions.php */
|
includes/ot-meta-box-api.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*
|
7 |
* @package OptionTree
|
8 |
* @author Derek Herman <derek@valendesigns.com>
|
9 |
-
* @copyright Copyright (c)
|
10 |
*/
|
11 |
if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
12 |
|
@@ -33,9 +33,9 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
|
33 |
|
34 |
$this->meta_box = $meta_box;
|
35 |
|
36 |
-
add_action( 'add_meta_boxes', array(
|
37 |
|
38 |
-
add_action( 'save_post', array(
|
39 |
|
40 |
}
|
41 |
|
@@ -51,7 +51,7 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
|
51 |
*/
|
52 |
function add_meta_boxes() {
|
53 |
foreach ( (array) $this->meta_box['pages'] as $page ) {
|
54 |
-
add_meta_box( $this->meta_box['id'], $this->meta_box['title'], array(
|
55 |
}
|
56 |
}
|
57 |
|
@@ -71,7 +71,7 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
|
71 |
echo '<input type="hidden" name="' . $this->meta_box['id'] . '_nonce" value="' . wp_create_nonce( $this->meta_box['id'] ) . '" />';
|
72 |
|
73 |
/* meta box description */
|
74 |
-
echo isset( $this->meta_box['desc'] ) ? '<div class="description" style="padding-top:10px;">' . htmlspecialchars_decode( $this->meta_box['desc'] ) . '</div>' : '';
|
75 |
|
76 |
/* loop through meta box fields */
|
77 |
foreach ( $this->meta_box['fields'] as $field ) {
|
@@ -95,6 +95,7 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
|
95 |
'field_rows' => isset( $field['rows'] ) && ! empty( $field['rows'] ) ? $field['rows'] : 10,
|
96 |
'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
|
97 |
'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
|
|
|
98 |
'field_class' => isset( $field['class'] ) ? $field['class'] : '',
|
99 |
'field_choices' => isset( $field['choices'] ) ? $field['choices'] : array(),
|
100 |
'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(),
|
@@ -110,7 +111,7 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
|
110 |
echo '<div class="format-settings">';
|
111 |
|
112 |
/* don't show title with textblocks */
|
113 |
-
if ( $_args['type'] != 'textblock' ) {
|
114 |
echo '<div class="format-setting-label">';
|
115 |
echo '<label for="' . $_args['field_id'] . '" class="label">' . $field['label'] . '</label>';
|
116 |
echo '</div>';
|
@@ -276,7 +277,7 @@ if ( ! function_exists( 'ot_register_meta_box' ) ) {
|
|
276 |
if ( ! $args )
|
277 |
return;
|
278 |
|
279 |
-
$ot_meta_box
|
280 |
}
|
281 |
|
282 |
}
|
6 |
*
|
7 |
* @package OptionTree
|
8 |
* @author Derek Herman <derek@valendesigns.com>
|
9 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
10 |
*/
|
11 |
if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
12 |
|
33 |
|
34 |
$this->meta_box = $meta_box;
|
35 |
|
36 |
+
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
|
37 |
|
38 |
+
add_action( 'save_post', array( $this, 'save_meta_box' ), 1, 2 );
|
39 |
|
40 |
}
|
41 |
|
51 |
*/
|
52 |
function add_meta_boxes() {
|
53 |
foreach ( (array) $this->meta_box['pages'] as $page ) {
|
54 |
+
add_meta_box( $this->meta_box['id'], $this->meta_box['title'], array( $this, 'build_meta_box' ), $page, $this->meta_box['context'], $this->meta_box['priority'], $this->meta_box['fields'] );
|
55 |
}
|
56 |
}
|
57 |
|
71 |
echo '<input type="hidden" name="' . $this->meta_box['id'] . '_nonce" value="' . wp_create_nonce( $this->meta_box['id'] ) . '" />';
|
72 |
|
73 |
/* meta box description */
|
74 |
+
echo isset( $this->meta_box['desc'] ) && ! empty( $this->meta_box['desc'] ) ? '<div class="description" style="padding-top:10px;">' . htmlspecialchars_decode( $this->meta_box['desc'] ) . '</div>' : '';
|
75 |
|
76 |
/* loop through meta box fields */
|
77 |
foreach ( $this->meta_box['fields'] as $field ) {
|
95 |
'field_rows' => isset( $field['rows'] ) && ! empty( $field['rows'] ) ? $field['rows'] : 10,
|
96 |
'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
|
97 |
'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
|
98 |
+
'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1',
|
99 |
'field_class' => isset( $field['class'] ) ? $field['class'] : '',
|
100 |
'field_choices' => isset( $field['choices'] ) ? $field['choices'] : array(),
|
101 |
'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(),
|
111 |
echo '<div class="format-settings">';
|
112 |
|
113 |
/* don't show title with textblocks */
|
114 |
+
if ( $_args['type'] != 'textblock' && ! empty( $field['label'] ) ) {
|
115 |
echo '<div class="format-setting-label">';
|
116 |
echo '<label for="' . $_args['field_id'] . '" class="label">' . $field['label'] . '</label>';
|
117 |
echo '</div>';
|
277 |
if ( ! $args )
|
278 |
return;
|
279 |
|
280 |
+
$ot_meta_box = new OT_Meta_Box( $args );
|
281 |
}
|
282 |
|
283 |
}
|
includes/ot-settings-api.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*
|
7 |
* @package OptionTree
|
8 |
* @author Derek Herman <derek@valendesigns.com>
|
9 |
-
* @copyright Copyright (c)
|
10 |
*/
|
11 |
if ( ! class_exists( 'OT_Settings' ) ) {
|
12 |
|
@@ -51,19 +51,19 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
51 |
public function hooks() {
|
52 |
|
53 |
/* add pages & menu items */
|
54 |
-
add_action( 'admin_menu', array(
|
55 |
|
56 |
/* register sections */
|
57 |
-
add_action( 'admin_init', array(
|
58 |
|
59 |
/* register settings */
|
60 |
-
add_action( 'admin_init', array(
|
61 |
|
62 |
/* reset options */
|
63 |
-
add_action( 'admin_init', array(
|
64 |
|
65 |
/* initialize settings */
|
66 |
-
add_action( 'admin_init', array(
|
67 |
|
68 |
}
|
69 |
|
@@ -97,7 +97,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
97 |
$page['menu_title'],
|
98 |
$page['capability'],
|
99 |
$page['menu_slug'],
|
100 |
-
array(
|
101 |
$page['icon_url'],
|
102 |
$page['position']
|
103 |
);
|
@@ -109,7 +109,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
109 |
$page['menu_title'],
|
110 |
$page['capability'],
|
111 |
$page['menu_slug'],
|
112 |
-
array(
|
113 |
);
|
114 |
}
|
115 |
|
@@ -120,13 +120,13 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
120 |
$this->page_hook[$page['id']] = $page_hook;
|
121 |
|
122 |
/* add scripts */
|
123 |
-
add_action( 'admin_print_scripts-' . $page_hook, array(
|
124 |
|
125 |
/* add styles */
|
126 |
-
add_action( 'admin_print_styles-' . $page_hook, array(
|
127 |
|
128 |
/* add contextual help */
|
129 |
-
add_action( 'load-' . $page_hook, array(
|
130 |
|
131 |
}
|
132 |
|
@@ -287,7 +287,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
287 |
echo '<div id="option-tree-sub-header">';
|
288 |
|
289 |
if ( $show_buttons )
|
290 |
-
echo '<button class="option-tree-ui-button
|
291 |
|
292 |
echo '</div>';
|
293 |
|
@@ -332,7 +332,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
332 |
|
333 |
echo '<div class="option-tree-ui-buttons">';
|
334 |
|
335 |
-
echo '<button class="option-tree-ui-button
|
336 |
|
337 |
echo '</div>';
|
338 |
|
@@ -350,7 +350,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
350 |
|
351 |
echo '<input type="hidden" name="action" value="reset" />';
|
352 |
|
353 |
-
echo '<button type="submit" class="option-tree-ui-button red
|
354 |
|
355 |
echo '</form>';
|
356 |
|
@@ -390,7 +390,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
390 |
add_settings_section(
|
391 |
$section['id'],
|
392 |
$section['title'],
|
393 |
-
array(
|
394 |
$page['menu_slug']
|
395 |
);
|
396 |
|
@@ -428,7 +428,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
428 |
/* loop through options */
|
429 |
foreach( (array) $this->options as $option ) {
|
430 |
|
431 |
-
register_setting( $option['id'], $option['id'], array (
|
432 |
|
433 |
/* loop through pages */
|
434 |
foreach( (array) $this->get_pages( $option ) as $page ) {
|
@@ -447,7 +447,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
447 |
add_settings_field(
|
448 |
$setting['id'],
|
449 |
$setting['label'],
|
450 |
-
array(
|
451 |
$page['menu_slug'],
|
452 |
$setting['section'],
|
453 |
$setting
|
@@ -484,18 +484,19 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
484 |
if ( isset( $std ) ) {
|
485 |
$field_value = ot_filter_std_value( $field_value, $std );
|
486 |
}
|
487 |
-
|
488 |
/* build the arguments array */
|
489 |
$_args = array(
|
490 |
'type' => $type,
|
491 |
'field_id' => $id,
|
492 |
-
'field_name' => '
|
493 |
'field_value' => $field_value,
|
494 |
'field_desc' => isset( $desc ) ? $desc : '',
|
495 |
'field_std' => isset( $std ) ? $std : '',
|
496 |
'field_rows' => isset( $rows ) && ! empty( $rows ) ? $rows : 15,
|
497 |
'field_post_type' => isset( $post_type ) && ! empty( $post_type ) ? $post_type : 'post',
|
498 |
'field_taxonomy' => isset( $taxonomy ) && ! empty( $taxonomy ) ? $taxonomy : 'category',
|
|
|
499 |
'field_class' => isset( $class ) ? $class : '',
|
500 |
'field_choices' => isset( $choices ) && ! empty( $choices ) ? $choices : array(),
|
501 |
'field_settings' => isset( $settings ) && ! empty( $settings ) ? $settings : array(),
|
@@ -568,10 +569,14 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
568 |
|
569 |
/* loop through page settings */
|
570 |
foreach( (array) $this->get_the_settings( $page ) as $setting ) {
|
571 |
-
|
572 |
/* verify setting has a type & value */
|
573 |
if ( isset( $setting['type'] ) && isset( $input[$setting['id']] ) ) {
|
574 |
|
|
|
|
|
|
|
|
|
575 |
/* validate setting */
|
576 |
if ( is_array( $input[$setting['id']] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
|
577 |
|
@@ -603,28 +608,69 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
603 |
/* merge the two settings array */
|
604 |
$settings = array_merge( $required_setting, $settings );
|
605 |
|
|
|
|
|
|
|
606 |
foreach( $input[$setting['id']] as $k => $setting_array ) {
|
607 |
|
608 |
foreach( $settings as $sub_setting ) {
|
609 |
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
/* verify sub setting has a type & value */
|
611 |
if ( isset( $sub_setting['type'] ) && isset( $input[$setting['id']][$k][$sub_setting['id']] ) ) {
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
|
616 |
}
|
617 |
|
618 |
}
|
619 |
|
620 |
-
}
|
621 |
-
|
622 |
} else {
|
623 |
|
624 |
-
$input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'] );
|
625 |
|
626 |
}
|
627 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
}
|
629 |
|
630 |
}
|
@@ -779,7 +825,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
779 |
|
780 |
echo '<div class="format-setting-wrap">';
|
781 |
|
782 |
-
if ( $field['args']['type'] != 'textblock' ) {
|
783 |
|
784 |
echo '<div class="format-setting-label">';
|
785 |
|
6 |
*
|
7 |
* @package OptionTree
|
8 |
* @author Derek Herman <derek@valendesigns.com>
|
9 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
10 |
*/
|
11 |
if ( ! class_exists( 'OT_Settings' ) ) {
|
12 |
|
51 |
public function hooks() {
|
52 |
|
53 |
/* add pages & menu items */
|
54 |
+
add_action( 'admin_menu', array( $this, 'add_page' ) );
|
55 |
|
56 |
/* register sections */
|
57 |
+
add_action( 'admin_init', array( $this, 'add_sections' ) );
|
58 |
|
59 |
/* register settings */
|
60 |
+
add_action( 'admin_init', array( $this, 'add_settings' ) );
|
61 |
|
62 |
/* reset options */
|
63 |
+
add_action( 'admin_init', array( $this, 'reset_options' ), 10 );
|
64 |
|
65 |
/* initialize settings */
|
66 |
+
add_action( 'admin_init', array( $this, 'initialize_settings' ), 11 );
|
67 |
|
68 |
}
|
69 |
|
97 |
$page['menu_title'],
|
98 |
$page['capability'],
|
99 |
$page['menu_slug'],
|
100 |
+
array( $this, 'display_page' ),
|
101 |
$page['icon_url'],
|
102 |
$page['position']
|
103 |
);
|
109 |
$page['menu_title'],
|
110 |
$page['capability'],
|
111 |
$page['menu_slug'],
|
112 |
+
array( $this, 'display_page' )
|
113 |
);
|
114 |
}
|
115 |
|
120 |
$this->page_hook[$page['id']] = $page_hook;
|
121 |
|
122 |
/* add scripts */
|
123 |
+
add_action( 'admin_print_scripts-' . $page_hook, array( $this, 'scripts' ) );
|
124 |
|
125 |
/* add styles */
|
126 |
+
add_action( 'admin_print_styles-' . $page_hook, array( $this, 'styles' ) );
|
127 |
|
128 |
/* add contextual help */
|
129 |
+
add_action( 'load-' . $page_hook, array( $this, 'help' ) );
|
130 |
|
131 |
}
|
132 |
|
287 |
echo '<div id="option-tree-sub-header">';
|
288 |
|
289 |
if ( $show_buttons )
|
290 |
+
echo '<button class="option-tree-ui-button blue right">' . $page['button_text'] . '</button>';
|
291 |
|
292 |
echo '</div>';
|
293 |
|
332 |
|
333 |
echo '<div class="option-tree-ui-buttons">';
|
334 |
|
335 |
+
echo '<button class="option-tree-ui-button blue right">' . $page['button_text'] . '</button>';
|
336 |
|
337 |
echo '</div>';
|
338 |
|
350 |
|
351 |
echo '<input type="hidden" name="action" value="reset" />';
|
352 |
|
353 |
+
echo '<button type="submit" class="option-tree-ui-button red left reset-settings" title="' . __( 'Reset Options', 'option-tree' ) . '">' . __( 'Reset Options', 'option-tree' ) . '</button>';
|
354 |
|
355 |
echo '</form>';
|
356 |
|
390 |
add_settings_section(
|
391 |
$section['id'],
|
392 |
$section['title'],
|
393 |
+
array( $this, 'display_section' ),
|
394 |
$page['menu_slug']
|
395 |
);
|
396 |
|
428 |
/* loop through options */
|
429 |
foreach( (array) $this->options as $option ) {
|
430 |
|
431 |
+
register_setting( $option['id'], $option['id'], array ( $this, 'sanitize_callback' ) );
|
432 |
|
433 |
/* loop through pages */
|
434 |
foreach( (array) $this->get_pages( $option ) as $page ) {
|
447 |
add_settings_field(
|
448 |
$setting['id'],
|
449 |
$setting['label'],
|
450 |
+
array( $this, 'display_setting' ),
|
451 |
$page['menu_slug'],
|
452 |
$setting['section'],
|
453 |
$setting
|
484 |
if ( isset( $std ) ) {
|
485 |
$field_value = ot_filter_std_value( $field_value, $std );
|
486 |
}
|
487 |
+
|
488 |
/* build the arguments array */
|
489 |
$_args = array(
|
490 |
'type' => $type,
|
491 |
'field_id' => $id,
|
492 |
+
'field_name' => $get_option . '[' . $id . ']',
|
493 |
'field_value' => $field_value,
|
494 |
'field_desc' => isset( $desc ) ? $desc : '',
|
495 |
'field_std' => isset( $std ) ? $std : '',
|
496 |
'field_rows' => isset( $rows ) && ! empty( $rows ) ? $rows : 15,
|
497 |
'field_post_type' => isset( $post_type ) && ! empty( $post_type ) ? $post_type : 'post',
|
498 |
'field_taxonomy' => isset( $taxonomy ) && ! empty( $taxonomy ) ? $taxonomy : 'category',
|
499 |
+
'field_min_max_step'=> isset( $min_max_step ) && ! empty( $min_max_step ) ? $min_max_step : '0,100,1',
|
500 |
'field_class' => isset( $class ) ? $class : '',
|
501 |
'field_choices' => isset( $choices ) && ! empty( $choices ) ? $choices : array(),
|
502 |
'field_settings' => isset( $settings ) && ! empty( $settings ) ? $settings : array(),
|
569 |
|
570 |
/* loop through page settings */
|
571 |
foreach( (array) $this->get_the_settings( $page ) as $setting ) {
|
572 |
+
|
573 |
/* verify setting has a type & value */
|
574 |
if ( isset( $setting['type'] ) && isset( $input[$setting['id']] ) ) {
|
575 |
|
576 |
+
/* get the defaults */
|
577 |
+
$current_settings = get_option( 'option_tree_settings' );
|
578 |
+
$current_options = get_option( $option['id'] );
|
579 |
+
|
580 |
/* validate setting */
|
581 |
if ( is_array( $input[$setting['id']] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
|
582 |
|
608 |
/* merge the two settings array */
|
609 |
$settings = array_merge( $required_setting, $settings );
|
610 |
|
611 |
+
/* create an empty WPML id array */
|
612 |
+
$wpml_ids = array();
|
613 |
+
|
614 |
foreach( $input[$setting['id']] as $k => $setting_array ) {
|
615 |
|
616 |
foreach( $settings as $sub_setting ) {
|
617 |
|
618 |
+
/* setup the WPML ID */
|
619 |
+
$wpml_id = $setting['id'] . '_' . $sub_setting['id'] . '_' . $k;
|
620 |
+
|
621 |
+
/* add id to array */
|
622 |
+
$wpml_ids[] = $wpml_id;
|
623 |
+
|
624 |
/* verify sub setting has a type & value */
|
625 |
if ( isset( $sub_setting['type'] ) && isset( $input[$setting['id']][$k][$sub_setting['id']] ) ) {
|
626 |
+
|
627 |
+
/* validate setting */
|
628 |
+
$input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'], $wpml_id );
|
629 |
|
630 |
}
|
631 |
|
632 |
}
|
633 |
|
634 |
+
}
|
635 |
+
|
636 |
} else {
|
637 |
|
638 |
+
$input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'], $setting['id'] );
|
639 |
|
640 |
}
|
641 |
+
|
642 |
+
}
|
643 |
+
|
644 |
+
/* unregister WPML strings that were deleted from lists and sliders */
|
645 |
+
if ( isset( $current_settings['settings'] ) && isset( $setting['type'] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
|
646 |
+
|
647 |
+
if ( ! isset( $wpml_ids ) )
|
648 |
+
$wpml_ids = array();
|
649 |
+
|
650 |
+
foreach( $current_settings['settings'] as $check_setting ) {
|
651 |
+
|
652 |
+
if ( $setting['id'] == $check_setting['id'] && ! empty( $current_options[$setting['id']] ) ) {
|
653 |
+
|
654 |
+
foreach( $current_options[$setting['id']] as $key => $value ) {
|
655 |
+
|
656 |
+
foreach( $value as $ckey => $cvalue ) {
|
657 |
+
|
658 |
+
$id = $setting['id'] . '_' . $ckey . '_' . $key;
|
659 |
+
|
660 |
+
if ( ! in_array( $id, $wpml_ids ) ) {
|
661 |
+
|
662 |
+
ot_wpml_unregister_string( $id );
|
663 |
+
|
664 |
+
}
|
665 |
+
|
666 |
+
}
|
667 |
+
|
668 |
+
}
|
669 |
+
|
670 |
+
}
|
671 |
+
|
672 |
+
}
|
673 |
+
|
674 |
}
|
675 |
|
676 |
}
|
825 |
|
826 |
echo '<div class="format-setting-wrap">';
|
827 |
|
828 |
+
if ( $field['args']['type'] != 'textblock' && ! empty( $field['title'] ) ) {
|
829 |
|
830 |
echo '<div class="format-setting-label">';
|
831 |
|
includes/ot-ui-admin.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php if ( ! defined( 'OT_VERSION') ) exit( 'No direct script access allowed' );
|
2 |
-
/**
|
3 |
-
* Builds the Setting & Documentation UI.
|
4 |
-
*
|
5 |
-
* @uses ot_register_settings()
|
6 |
-
*
|
7 |
-
* @package OptionTree
|
8 |
-
* @author Derek Herman <derek@valendesigns.com>
|
9 |
-
* @copyright Copyright (c) 2012, Derek Herman
|
10 |
-
*/
|
11 |
-
if ( function_exists( 'ot_register_settings' ) ) {
|
12 |
-
|
13 |
-
ot_register_settings( array(
|
14 |
-
array(
|
15 |
-
'id' => 'option_tree_settings',
|
16 |
-
'pages' => apply_filters( 'ot_register_pages_array', array(
|
17 |
-
array(
|
18 |
-
'id' => 'ot',
|
19 |
-
'page_title' => __( 'OptionTree', 'option-tree' ),
|
20 |
-
'menu_title' => __( 'OptionTree', 'option-tree' ),
|
21 |
-
'capability' => 'manage_options',
|
22 |
-
'menu_slug' => 'ot-settings',
|
23 |
-
'icon_url' => OT_URL . '/assets/images/ot-logo-mini.png',
|
24 |
-
'position' => 61,
|
25 |
-
'hidden_page' => true
|
26 |
-
),
|
27 |
-
array(
|
28 |
-
'id' => 'settings',
|
29 |
-
'parent_slug' => 'ot-settings',
|
30 |
-
'page_title' => __( 'Settings', 'option-tree' ),
|
31 |
-
'menu_title' => __( 'Settings', 'option-tree' ),
|
32 |
-
'capability' => 'edit_theme_options',
|
33 |
-
'menu_slug' => 'ot-settings',
|
34 |
-
'icon_url' => null,
|
35 |
-
'position' => null,
|
36 |
-
'updated_message' => __( 'Theme Options updated.', 'option-tree' ),
|
37 |
-
'reset_message' => __( 'Theme Options reset.', 'option-tree' ),
|
38 |
-
'button_text' => __( 'Save Settings', 'option-tree' ),
|
39 |
-
'show_buttons' => false,
|
40 |
-
'screen_icon' => 'themes',
|
41 |
-
'sections' => array(
|
42 |
-
array(
|
43 |
-
'id' => 'create_setting',
|
44 |
-
'title' => __( 'Theme Options UI', 'option-tree' )
|
45 |
-
),
|
46 |
-
array(
|
47 |
-
'id' => 'import',
|
48 |
-
'title' => __( 'Import', 'option-tree' )
|
49 |
-
),
|
50 |
-
array(
|
51 |
-
'id' => 'export',
|
52 |
-
'title' => __( 'Export', 'option-tree' )
|
53 |
-
),
|
54 |
-
array(
|
55 |
-
'id' => 'layouts',
|
56 |
-
'title' => __( 'Layouts', 'option-tree' )
|
57 |
-
)
|
58 |
-
),
|
59 |
-
'settings' => array(
|
60 |
-
array(
|
61 |
-
'id' => 'theme_options_ui_text',
|
62 |
-
'label' => __( 'Theme Options UI Builder', 'option-tree' ),
|
63 |
-
'type' => 'theme_options_ui',
|
64 |
-
'section' => 'create_setting'
|
65 |
-
),
|
66 |
-
array(
|
67 |
-
'id' => 'import_xml_text',
|
68 |
-
'label' => __( 'Settings XML', 'option-tree' ),
|
69 |
-
'type' => 'import-xml',
|
70 |
-
'section' => 'import'
|
71 |
-
),
|
72 |
-
array(
|
73 |
-
'id' => 'import_settings_text',
|
74 |
-
'label' => __( 'Settings', 'option-tree' ),
|
75 |
-
'type' => 'import-settings',
|
76 |
-
'section' => 'import'
|
77 |
-
),
|
78 |
-
array(
|
79 |
-
'id' => 'import_data_text',
|
80 |
-
'label' => __( 'Theme Options', 'option-tree' ),
|
81 |
-
'type' => 'import-data',
|
82 |
-
'section' => 'import'
|
83 |
-
),
|
84 |
-
array(
|
85 |
-
'id' => 'import_layouts_text',
|
86 |
-
'label' => __( 'Layouts', 'option-tree' ),
|
87 |
-
'type' => 'import-layouts',
|
88 |
-
'section' => 'import'
|
89 |
-
),
|
90 |
-
array(
|
91 |
-
'id' => 'export_settings_file_text',
|
92 |
-
'label' => __( 'Settings PHP File', 'option-tree' ),
|
93 |
-
'type' => 'export-settings-file',
|
94 |
-
'section' => 'export'
|
95 |
-
),
|
96 |
-
array(
|
97 |
-
'id' => 'export_settings_text',
|
98 |
-
'label' => __( 'Settings', 'option-tree' ),
|
99 |
-
'type' => 'export-settings',
|
100 |
-
'section' => 'export'
|
101 |
-
),
|
102 |
-
array(
|
103 |
-
'id' => 'export_data_text',
|
104 |
-
'label' => __( 'Theme Options', 'option-tree' ),
|
105 |
-
'type' => 'export-data',
|
106 |
-
'section' => 'export'
|
107 |
-
),
|
108 |
-
array(
|
109 |
-
'id' => 'export_layout_text',
|
110 |
-
'label' => __( 'Layouts', 'option-tree' ),
|
111 |
-
'type' => 'export-layouts',
|
112 |
-
'section' => 'export'
|
113 |
-
),
|
114 |
-
array(
|
115 |
-
'id' => 'modify_layouts_text',
|
116 |
-
'label' => __( 'Add, Activate, & Remove Layouts', 'option-tree' ),
|
117 |
-
'type' => 'modify-layouts',
|
118 |
-
'section' => 'layouts'
|
119 |
-
)
|
120 |
-
)
|
121 |
-
),
|
122 |
-
array(
|
123 |
-
'id' => 'documentation',
|
124 |
-
'parent_slug' => 'ot-settings',
|
125 |
-
'page_title' => __( 'Documentation', 'option-tree' ),
|
126 |
-
'menu_title' => __( 'Documentation', 'option-tree' ),
|
127 |
-
'capability' => 'edit_theme_options',
|
128 |
-
'menu_slug' => 'ot-documentation',
|
129 |
-
'icon_url' => null,
|
130 |
-
'position' => null,
|
131 |
-
'updated_message' => __( 'Theme Options updated.', 'option-tree' ),
|
132 |
-
'reset_message' => __( 'Theme Options reset.', 'option-tree' ),
|
133 |
-
'button_text' => __( 'Save Settings', 'option-tree' ),
|
134 |
-
'show_buttons' => false,
|
135 |
-
'screen_icon' => 'themes',
|
136 |
-
'sections' => array(
|
137 |
-
array(
|
138 |
-
'id' => 'creating_options',
|
139 |
-
'title' => __( 'Creating Options', 'option-tree' )
|
140 |
-
),
|
141 |
-
array(
|
142 |
-
'id' => 'option_types',
|
143 |
-
'title' => __( 'Option Types', 'option-tree' )
|
144 |
-
),
|
145 |
-
array(
|
146 |
-
'id' => 'functions',
|
147 |
-
'title' => __( 'Function References', 'option-tree' )
|
148 |
-
),
|
149 |
-
array(
|
150 |
-
'id' => 'theme_mode',
|
151 |
-
'title' => __( 'Theme Mode', 'option-tree' )
|
152 |
-
),
|
153 |
-
array(
|
154 |
-
'id' => 'meta_boxes',
|
155 |
-
'title' => __( 'Meta Boxes', 'option-tree' )
|
156 |
-
),
|
157 |
-
array(
|
158 |
-
'id' => 'examples',
|
159 |
-
'title' => __( 'Code Examples', 'option-tree' )
|
160 |
-
),
|
161 |
-
array(
|
162 |
-
'id' => 'layouts_overview',
|
163 |
-
'title' => __( 'Layouts Overview', 'option-tree' )
|
164 |
-
)
|
165 |
-
),
|
166 |
-
'settings' => array(
|
167 |
-
array(
|
168 |
-
'id' => 'creating_options_text',
|
169 |
-
'label' => __( 'Overview of available Theme Option fields.', 'option-tree' ),
|
170 |
-
'type' => 'creating-options',
|
171 |
-
'section' => 'creating_options'
|
172 |
-
),
|
173 |
-
array(
|
174 |
-
'id' => 'option_types_text',
|
175 |
-
'label' => __( 'Option types in alphabetical order & hooks to filter them.', 'option-tree' ),
|
176 |
-
'type' => 'option-types',
|
177 |
-
'section' => 'option_types'
|
178 |
-
),
|
179 |
-
array(
|
180 |
-
'id' => 'functions_ot_get_option',
|
181 |
-
'label' => __( 'Function Reference:ot_get_option()', 'option-tree' ),
|
182 |
-
'type' => 'ot-get-option',
|
183 |
-
'section' => 'functions'
|
184 |
-
),
|
185 |
-
array(
|
186 |
-
'id' => 'functions_get_option_tree',
|
187 |
-
'label' => __( 'Function Reference:get_option_tree()', 'option-tree' ),
|
188 |
-
'type' => 'get-option-tree',
|
189 |
-
'section' => 'functions'
|
190 |
-
),
|
191 |
-
array(
|
192 |
-
'id' => 'theme_mode_text',
|
193 |
-
'label' => __( 'Theme Mode', 'option-tree' ),
|
194 |
-
'type' => 'theme-mode',
|
195 |
-
'section' => 'theme_mode'
|
196 |
-
),
|
197 |
-
array(
|
198 |
-
'id' => 'meta_boxes_text',
|
199 |
-
'label' => __( 'Meta Boxes', 'option-tree' ),
|
200 |
-
'type' => 'meta-boxes',
|
201 |
-
'section' => 'meta_boxes'
|
202 |
-
),
|
203 |
-
array(
|
204 |
-
'id' => 'example_text',
|
205 |
-
'label' => __( 'Code examples for front-end development.', 'option-tree' ),
|
206 |
-
'type' => 'examples',
|
207 |
-
'section' => 'examples'
|
208 |
-
),
|
209 |
-
array(
|
210 |
-
'id' => 'layouts_overview_text',
|
211 |
-
'label' => __( 'What\'s a layout anyhow?', 'option-tree' ),
|
212 |
-
'type' => 'layouts-overview',
|
213 |
-
'section' => 'layouts_overview'
|
214 |
-
)
|
215 |
-
)
|
216 |
-
)
|
217 |
-
) )
|
218 |
-
)
|
219 |
-
)
|
220 |
-
);
|
221 |
-
|
222 |
-
}
|
223 |
-
|
224 |
-
/* End of file ot-ui-admin.php */
|
225 |
-
/* Location: ./option-tree/ot-ui-admin.php */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/ot-ui-theme-options.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php if ( ! defined( 'OT_VERSION') ) exit( 'No direct script access allowed' );
|
2 |
-
/**
|
3 |
-
* Builds the Theme Option UI.
|
4 |
-
*
|
5 |
-
* @uses ot_register_settings()
|
6 |
-
*
|
7 |
-
* @package OptionTree
|
8 |
-
* @author Derek Herman <derek@valendesigns.com>
|
9 |
-
* @copyright Copyright (c) 2012, Derek Herman
|
10 |
-
*/
|
11 |
-
|
12 |
-
/* get the settings array */
|
13 |
-
$get_settings = get_option( 'option_tree_settings' );
|
14 |
-
|
15 |
-
/* sections array */
|
16 |
-
$sections = isset( $get_settings['sections'] ) ? $get_settings['sections'] : array();
|
17 |
-
|
18 |
-
/* settings array */
|
19 |
-
$settings = isset( $get_settings['settings'] ) ? $get_settings['settings'] : array();
|
20 |
-
|
21 |
-
/* contexual_help array */
|
22 |
-
$contextual_help = isset( $get_settings['contextual_help'] ) ? $get_settings['contextual_help'] : array();
|
23 |
-
|
24 |
-
/* build the Theme Options */
|
25 |
-
if ( function_exists( 'ot_register_settings' ) ) {
|
26 |
-
|
27 |
-
ot_register_settings( array(
|
28 |
-
array(
|
29 |
-
'id' => 'option_tree',
|
30 |
-
'pages' => array(
|
31 |
-
array(
|
32 |
-
'id' => 'ot_theme_options',
|
33 |
-
'parent_slug' => apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ),
|
34 |
-
'page_title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
|
35 |
-
'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'Theme Options', 'option-tree' ) ),
|
36 |
-
'capability' => apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ),
|
37 |
-
'menu_slug' => 'ot-theme-options',
|
38 |
-
'icon_url' => apply_filters( 'ot_theme_options_icon_url', null ),
|
39 |
-
'position' => apply_filters( 'ot_theme_options_position', null ),
|
40 |
-
'updated_message' => apply_filters( 'ot_theme_options_updated_message', __( 'Theme Options updated.', 'option-tree' ) ),
|
41 |
-
'reset_message' => apply_filters( 'ot_theme_options_reset_message', __( 'Theme Options reset.', 'option-tree' ) ),
|
42 |
-
'button_text' => apply_filters( 'ot_theme_options_button_text', __( 'Save Changes', 'option-tree' ) ),
|
43 |
-
'screen_icon' => 'themes',
|
44 |
-
'contextual_help' => $contextual_help,
|
45 |
-
'sections' => $sections,
|
46 |
-
'settings' => $settings
|
47 |
-
)
|
48 |
-
)
|
49 |
-
)
|
50 |
-
)
|
51 |
-
);
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
/* End of file ot-ui-theme-options.php */
|
56 |
-
/* Location: ./option-tree/ot-ui-theme-options.php */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/option-tree.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
|
7 |
-
"POT-Creation-Date: 2013-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,287 +12,425 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: includes/ot-functions-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
msgid "The Colorpicker only allows valid hexadecimal values."
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: includes/ot-functions-admin.php:
|
20 |
msgid "Send to OptionTree"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: includes/ot-functions-admin.php:
|
24 |
#: includes/ot-functions-option-types.php:152
|
25 |
-
#: includes/ot-functions-option-types.php:
|
26 |
msgid "Remove Media"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: includes/ot-functions-admin.php:
|
30 |
msgid "Are you sure you want to reset back to the defaults?"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/ot-functions-admin.php:
|
34 |
msgid "You can't remove this! But you can edit the values."
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/ot-functions-admin.php:
|
38 |
msgid "Are you sure you want to remove this?"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/ot-functions-admin.php:
|
42 |
msgid "Are you sure you want to activate this layout?"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/ot-functions-admin.php:
|
46 |
msgid "Sorry, you can't have settings three levels deep."
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: includes/ot-functions-admin.php:
|
50 |
msgid "Option Tree"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: includes/ot-functions-admin.php:
|
54 |
msgid "General"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/ot-functions-admin.php:
|
58 |
msgid "Sample Text Field Label"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/ot-functions-admin.php:
|
62 |
msgid "Description for the sample text field."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: includes/ot-functions-admin.php:
|
66 |
-
msgid "Layout activated."
|
67 |
-
msgstr ""
|
68 |
-
|
69 |
-
#: includes/ot-functions-admin.php:1523
|
70 |
msgid "Settings updated."
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: includes/ot-functions-admin.php:
|
74 |
msgid "Settings could not be saved."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/ot-functions-admin.php:
|
78 |
msgid "Settings Imported."
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: includes/ot-functions-admin.php:
|
82 |
msgid "Settings could not be imported."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: includes/ot-functions-admin.php:
|
86 |
msgid "Data Imported."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: includes/ot-functions-admin.php:
|
90 |
msgid "Data could not be imported."
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: includes/ot-functions-admin.php:
|
94 |
msgid "Layouts Imported."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: includes/ot-functions-admin.php:
|
98 |
msgid "Layouts could not be imported."
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/ot-functions-admin.php:
|
102 |
msgid "Layouts Updated."
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: includes/ot-functions-admin.php:
|
106 |
msgid "Layouts could not be updated."
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: includes/ot-functions-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
msgid "Left Sidebar"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/ot-functions-admin.php:
|
114 |
msgid "Right Sidebar"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/ot-functions-admin.php:
|
118 |
msgid "Full Width (no sidebar)"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/ot-functions-admin.php:
|
122 |
msgid "Dual Sidebar"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: includes/ot-functions-admin.php:
|
126 |
msgid "Left Dual Sidebar"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: includes/ot-functions-admin.php:
|
130 |
msgid "Right Dual Sidebar"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/ot-functions-admin.php:
|
134 |
msgid "Image"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: includes/ot-functions-admin.php:
|
138 |
msgid "Link"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: includes/ot-functions-admin.php:
|
142 |
#: includes/ot-functions-docs-page.php:43
|
143 |
-
#: includes/ot-functions-docs-page.php:
|
144 |
-
#: includes/ot-functions-docs-page.php:
|
145 |
msgid "Description"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/ot-functions-admin.php:
|
149 |
msgid "edit"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/ot-functions-admin.php:
|
153 |
-
#: includes/ot-functions-admin.php:
|
154 |
-
#: includes/ot-functions-admin.php:
|
155 |
-
#: includes/ot-functions-admin.php:
|
156 |
-
#: includes/ot-functions-admin.php:
|
157 |
msgid "Edit"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: includes/ot-functions-admin.php:
|
161 |
-
#: includes/ot-functions-admin.php:
|
162 |
-
#: includes/ot-functions-admin.php:
|
163 |
-
#: includes/ot-functions-admin.php:
|
164 |
-
#: includes/ot-functions-admin.php:
|
165 |
-
#: includes/ot-functions-admin.php:
|
166 |
msgid "Delete"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/ot-functions-admin.php:
|
170 |
msgid ""
|
171 |
"<strong>Section Title</strong>: Displayed as a menu item on the Theme "
|
172 |
"Options page."
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: includes/ot-functions-admin.php:
|
176 |
msgid ""
|
177 |
"<strong>Section ID</strong>: A unique lower case alphanumeric string, "
|
178 |
"underscores allowed."
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: includes/ot-functions-admin.php:
|
182 |
msgid ""
|
183 |
"<strong>Label</strong>: Displayed as the label of a form element on the "
|
184 |
"Theme Options page."
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: includes/ot-functions-admin.php:
|
188 |
msgid ""
|
189 |
"<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
|
190 |
"allowed."
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: includes/ot-functions-admin.php:
|
194 |
msgid ""
|
195 |
"<strong>Type</strong>: Choose one of the available option types from the "
|
196 |
"dropdown."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: includes/ot-functions-admin.php:
|
200 |
msgid ""
|
201 |
"<strong>Description</strong>: Enter a detailed description for the users to "
|
202 |
"read on the Theme Options page, HTML is allowed. This is also where you "
|
203 |
"enter content for both the Textblock & Textblock Titled option types."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/ot-functions-admin.php:
|
207 |
msgid ""
|
208 |
"<strong>Choices</strong>: This will only affect the following option types: "
|
209 |
"Checkbox, Radio, Select & Select Image."
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: includes/ot-functions-admin.php:
|
213 |
msgid "Add Choice"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: includes/ot-functions-admin.php:
|
217 |
msgid ""
|
218 |
"<strong>Settings</strong>: This will only affect the List Item option type."
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: includes/ot-functions-admin.php:
|
222 |
#: includes/ot-functions-settings-page.php:93
|
223 |
msgid "Add Setting"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/ot-functions-admin.php:
|
227 |
msgid ""
|
228 |
"<strong>Standard</strong>: Setting the standard value for your option only "
|
229 |
"works for some option types. Read the <code>OptionTree->Documentation</code> "
|
230 |
"for more information on which ones."
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: includes/ot-functions-admin.php:
|
234 |
msgid ""
|
235 |
"<strong>Rows</strong>: Enter a numeric value for the number of rows in your "
|
236 |
"textarea. This will only affect the following option types: CSS, Textarea, & "
|
237 |
"Textarea Simple."
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: includes/ot-functions-admin.php:
|
241 |
msgid ""
|
242 |
"<strong>Post Type</strong>: Add a comma separated list of post type like "
|
243 |
"'post,page'. This will only affect the following option types: Custom Post "
|
244 |
"Type Checkbox, & Custom Post Type Select."
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: includes/ot-functions-admin.php:
|
248 |
msgid ""
|
249 |
"<strong>Taxonomy</strong>: Add a comma separated list of any registered "
|
250 |
"taxonomy like 'category,post_tag'. This will only affect the following "
|
251 |
"option types: Taxonomy Checkbox, & Taxonomy Select."
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: includes/ot-functions-admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: includes/ot-functions-admin.php:
|
259 |
msgid "Label"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: includes/ot-functions-admin.php:
|
263 |
msgid "Value"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: includes/ot-functions-admin.php:
|
267 |
msgid "Image Source (Radio Image only)"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: includes/ot-functions-admin.php:
|
271 |
msgid ""
|
272 |
"<strong>Title</strong>: Displayed as a contextual help menu item on the "
|
273 |
"Theme Options page."
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: includes/ot-functions-admin.php:
|
277 |
msgid ""
|
278 |
"<strong>Content</strong>: Enter the HTML content about this contextual help "
|
279 |
"item displayed on the Theme Option page for end users to read."
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: includes/ot-functions-admin.php:
|
283 |
msgid "Layout"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: includes/ot-functions-admin.php:
|
287 |
msgid "Activate"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: includes/ot-functions-admin.php:
|
291 |
-
#: includes/ot-settings-api.php:
|
292 |
msgid "Title"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: includes/ot-functions-admin.php:
|
296 |
msgid "New Layout"
|
297 |
msgstr ""
|
298 |
|
@@ -344,12 +482,6 @@ msgid ""
|
|
344 |
"Select Image."
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: includes/ot-functions-docs-page.php:49 includes/ot-ui-admin.php:30
|
348 |
-
#: includes/ot-ui-admin.php:31 includes/ot-ui-admin.php:74
|
349 |
-
#: includes/ot-ui-admin.php:98
|
350 |
-
msgid "Settings"
|
351 |
-
msgstr ""
|
352 |
-
|
353 |
#: includes/ot-functions-docs-page.php:50
|
354 |
msgid ""
|
355 |
"Click the \"Add Setting\" button found inside a newly created setting to add "
|
@@ -402,11 +534,31 @@ msgid ""
|
|
402 |
"Checkbox, & Taxonomy Select."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/ot-functions-docs-page.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
msgid "Background"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/ot-functions-docs-page.php:
|
410 |
msgid ""
|
411 |
"The Background option type is for adding background styles to your theme "
|
412 |
"either dynamically via the CSS option type below or manually with "
|
@@ -418,33 +570,33 @@ msgid ""
|
|
418 |
"fine tune the select lists for your specific CSS needs."
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: includes/ot-functions-docs-page.php:
|
422 |
msgid "Category Select"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/ot-functions-docs-page.php:
|
426 |
msgid ""
|
427 |
"The Category Select option type displays a list of category IDs. It allows "
|
428 |
"the user to select only one category ID and will return that value for use "
|
429 |
"in a custom function or loop."
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: includes/ot-functions-docs-page.php:
|
433 |
msgid "Category Checkbox"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: includes/ot-functions-docs-page.php:
|
437 |
msgid ""
|
438 |
"The Category Checkbox option type displays a list of category IDs. It allows "
|
439 |
"the user to check multiple category IDs and will return that value as an "
|
440 |
"array for use in a custom function or loop."
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: includes/ot-functions-docs-page.php:
|
444 |
msgid "Checkbox"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: includes/ot-functions-docs-page.php:
|
448 |
msgid ""
|
449 |
"The Checkbox option type is fairly self explanatory. Typically used to ask "
|
450 |
"questions. For example, \"Do you want to activate asynchronous Google "
|
@@ -455,21 +607,21 @@ msgid ""
|
|
455 |
"nothing if it doesn't."
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: includes/ot-functions-docs-page.php:
|
459 |
msgid "Colorpicker"
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: includes/ot-functions-docs-page.php:
|
463 |
msgid ""
|
464 |
"The Colorpicker option type saves a hexadecimal color code for use in CSS. "
|
465 |
"Use it to modify the color of something in your theme."
|
466 |
msgstr ""
|
467 |
|
468 |
-
#: includes/ot-functions-docs-page.php:
|
469 |
msgid "CSS"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: includes/ot-functions-docs-page.php:
|
473 |
msgid ""
|
474 |
"The CSS option type is a textarea that when used properly can add dynamic "
|
475 |
"CSS to your theme from within OptionTree. Unfortunately, due server "
|
@@ -482,26 +634,26 @@ msgid ""
|
|
482 |
"theme options."
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: includes/ot-functions-docs-page.php:
|
486 |
msgid ""
|
487 |
"An example of the CSS option type: This assumes you have an option with the "
|
488 |
"ID of <code>custom_background_css</code> which will display the saved values "
|
489 |
"for that option."
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: includes/ot-functions-docs-page.php:
|
493 |
msgid "Input"
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: includes/ot-functions-docs-page.php:
|
497 |
msgid "Output"
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: includes/ot-functions-docs-page.php:
|
501 |
msgid "Custom Post Type Select"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: includes/ot-functions-docs-page.php:
|
505 |
msgid ""
|
506 |
"The Custom Post Type Select option type displays a list of IDs from any "
|
507 |
"available WordPress post type or custom post type. It will return a single "
|
@@ -511,11 +663,11 @@ msgid ""
|
|
511 |
"version."
|
512 |
msgstr ""
|
513 |
|
514 |
-
#: includes/ot-functions-docs-page.php:
|
515 |
msgid "Custom Post Type Checkbox"
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: includes/ot-functions-docs-page.php:
|
519 |
msgid ""
|
520 |
"The Custom Post Type Select option type displays a list of IDs from any "
|
521 |
"available WordPress post type or custom post type. It allows the user to "
|
@@ -525,11 +677,11 @@ msgid ""
|
|
525 |
"future version."
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: includes/ot-functions-docs-page.php:
|
529 |
msgid "List Item"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: includes/ot-functions-docs-page.php:
|
533 |
msgid ""
|
534 |
"The list Item replaced the old Slider option type. It allows for a great "
|
535 |
"deal of customization. You can add settings to the List Item and those "
|
@@ -538,11 +690,11 @@ msgid ""
|
|
538 |
"layouts."
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: includes/ot-functions-docs-page.php:
|
542 |
msgid "Measurement"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: includes/ot-functions-docs-page.php:
|
546 |
msgid ""
|
547 |
"The Measurement option type is a mix of input and select fields. The text "
|
548 |
"input excepts a value and the select lets you choose the unit of measurement "
|
@@ -551,63 +703,73 @@ msgid ""
|
|
551 |
"with the <code>ot_measurement_unit_types</code> filter."
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: includes/ot-functions-docs-page.php:
|
555 |
msgid ""
|
556 |
"Example filter to add new units to the Measurement option type. Added to "
|
557 |
"<code>functions.php</code>."
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: includes/ot-functions-docs-page.php:
|
561 |
msgid ""
|
562 |
"Example filter to completely change the units in the Measurement option "
|
563 |
"type. Added to <code>functions.php</code>."
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: includes/ot-functions-docs-page.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
msgid "Page Select"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: includes/ot-functions-docs-page.php:
|
571 |
msgid ""
|
572 |
"The Page Select option type displays a list of page IDs. It will return a "
|
573 |
"single page ID for use in a custom function or loop."
|
574 |
msgstr ""
|
575 |
|
576 |
-
#: includes/ot-functions-docs-page.php:
|
577 |
msgid "Page Checkbox"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: includes/ot-functions-docs-page.php:
|
581 |
msgid ""
|
582 |
"The Page Select option type displays a list of page IDs. It allows the user "
|
583 |
"to check multiple page IDs for use in a custom function or loop."
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: includes/ot-functions-docs-page.php:
|
587 |
msgid "Post Select"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: includes/ot-functions-docs-page.php:
|
591 |
msgid ""
|
592 |
"The Post Select option type displays a list of post IDs. It will return a "
|
593 |
"single post ID for use in a custom function or loop."
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: includes/ot-functions-docs-page.php:
|
597 |
msgid "Post Checkbox"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: includes/ot-functions-docs-page.php:
|
601 |
msgid ""
|
602 |
"The Post Select option type displays a list of post IDs. It allows the user "
|
603 |
"to check multiple post IDs for use in a custom function or loop."
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: includes/ot-functions-docs-page.php:
|
607 |
msgid "Radio"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: includes/ot-functions-docs-page.php:
|
611 |
msgid ""
|
612 |
"The Radio option type could ask a question. For example, \"Do you want to "
|
613 |
"activate the custom navigation?\" could require a yes or no answer with a "
|
@@ -616,94 +778,116 @@ msgid ""
|
|
616 |
"of code."
|
617 |
msgstr ""
|
618 |
|
619 |
-
#: includes/ot-functions-docs-page.php:
|
620 |
msgid "Radio Image"
|
621 |
msgstr ""
|
622 |
|
623 |
-
#: includes/ot-functions-docs-page.php:
|
624 |
msgid ""
|
625 |
"the Radio Images option type is primarily used for layouts. However, you can "
|
626 |
"filter the image list using <code>ot_radio_images</code>. As well, you can "
|
627 |
"add your own custom images using the choices array."
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: includes/ot-functions-docs-page.php:
|
631 |
msgid ""
|
632 |
"This example executes the <code>ot_radio_images</code> filter on layout "
|
633 |
"images attached to the <code>my_radio_images</code> field. Added to "
|
634 |
"<code>functions.php</code>."
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: includes/ot-functions-docs-page.php:
|
638 |
msgid "Select"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: includes/ot-functions-docs-page.php:
|
642 |
msgid ""
|
643 |
"The Select option type is used to list anything you want that would be "
|
644 |
"chosen from a select list."
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: includes/ot-functions-docs-page.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
msgid "Slider"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: includes/ot-functions-docs-page.php:
|
652 |
msgid ""
|
653 |
"The Slider option type is technically deprecated. Use the List Item option "
|
654 |
"type instead, as it's infinitely more customizable. Typical use is for "
|
655 |
"creating sliding image content."
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: includes/ot-functions-docs-page.php:
|
659 |
msgid "Tag Checkbox"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: includes/ot-functions-docs-page.php:
|
663 |
msgid ""
|
664 |
"The Tag Checkbox option type displays a list of tag IDs. It allows the user "
|
665 |
"to check multiple tag IDs and will return that value as an array for use in "
|
666 |
"a custom function or loop."
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: includes/ot-functions-docs-page.php:
|
670 |
msgid "Tag Select"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: includes/ot-functions-docs-page.php:
|
674 |
msgid ""
|
675 |
"The Tag Select option type displays a list of tag IDs. It allows the user to "
|
676 |
"select only one tag ID and will return that value for use in a custom "
|
677 |
"function or loop."
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: includes/ot-functions-docs-page.php:
|
681 |
msgid "Taxonomy Checkbox"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: includes/ot-functions-docs-page.php:
|
685 |
msgid ""
|
686 |
"The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows "
|
687 |
"the user to check multiple taxonomy IDs and will return that value as an "
|
688 |
"array for use in a custom function or loop."
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: includes/ot-functions-docs-page.php:
|
692 |
msgid "Taxonomy Select"
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: includes/ot-functions-docs-page.php:
|
696 |
msgid ""
|
697 |
"The Taxonomy Select option type displays a list of taxonomy IDs. It allows "
|
698 |
"the user to select only one taxonomy ID and will return that value for use "
|
699 |
"in a custom function or loop."
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: includes/ot-functions-docs-page.php:
|
703 |
msgid "Text (Input)"
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: includes/ot-functions-docs-page.php:
|
707 |
msgid ""
|
708 |
"The Text option type would be used to save a string value. For example, a "
|
709 |
"link to feedburner, your Twitter username, or Google Analytics ID are all "
|
@@ -711,11 +895,11 @@ msgid ""
|
|
711 |
"character length."
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: includes/ot-functions-docs-page.php:
|
715 |
msgid "Textarea"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: includes/ot-functions-docs-page.php:
|
719 |
msgid ""
|
720 |
"The Textarea option type is a large string value used for custom code or "
|
721 |
"text in the theme. The new Textarea has a WYSIWYG editor that can be "
|
@@ -724,34 +908,34 @@ msgid ""
|
|
724 |
"<code>quicktags</code>."
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: includes/ot-functions-docs-page.php:
|
728 |
msgid ""
|
729 |
"Example filters to alter the Textarea option type. Added to <code>functions."
|
730 |
"php</code>."
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/ot-functions-docs-page.php:
|
734 |
msgid ""
|
735 |
"This example keeps WordPress from executing the <code>wpautop</code> filter "
|
736 |
"on the line breaks. The default is <code>true</code> which means it wraps "
|
737 |
"line breaks with an HTML <code>p</code> tag."
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: includes/ot-functions-docs-page.php:
|
741 |
msgid ""
|
742 |
"This example keeps WordPress from executing the <code>media_buttons</code> "
|
743 |
"filter on the textarea WYSIWYG. The default is <code>true</code> which means "
|
744 |
"show the buttons."
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: includes/ot-functions-docs-page.php:
|
748 |
msgid ""
|
749 |
"This example keeps WordPress from executing the <code>tinymce</code> filter "
|
750 |
"on the textarea WYSIWYG. The default is <code>true</code> which means show "
|
751 |
"the tinymce."
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: includes/ot-functions-docs-page.php:
|
755 |
msgid ""
|
756 |
"This example alters the <code>quicktags</code> filter on the textarea "
|
757 |
"WYSIWYG. The default is <code>array( 'buttons' => 'strong,em,link,block,del,"
|
@@ -759,18 +943,18 @@ msgid ""
|
|
759 |
"quicktags. It also means you can filter in your own custom quicktags."
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: includes/ot-functions-docs-page.php:
|
763 |
msgid "Textarea Simple"
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: includes/ot-functions-docs-page.php:
|
767 |
msgid ""
|
768 |
"The Textarea Simple option type is a large string value used for custom code "
|
769 |
"or text in the theme. The new Textarea Simple does not have a WYSIWYG "
|
770 |
"editor. But you can still filter on <code>wpautop</code>."
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: includes/ot-functions-docs-page.php:
|
774 |
msgid ""
|
775 |
"This example tells WordPress to execute the <code>wpautop</code> filter on "
|
776 |
"the line breaks. The default is <code>false</code> which means it does not "
|
@@ -778,11 +962,11 @@ msgid ""
|
|
778 |
"php</code>."
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: includes/ot-functions-docs-page.php:
|
782 |
msgid "Textblock"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: includes/ot-functions-docs-page.php:
|
786 |
msgid ""
|
787 |
"The Textblock option type is used only on the Theme Option page. It will "
|
788 |
"allow you to create & display HTML on your Theme Options page but has no "
|
@@ -792,11 +976,11 @@ msgid ""
|
|
792 |
"value."
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: includes/ot-functions-docs-page.php:
|
796 |
msgid "Textblock Titled"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: includes/ot-functions-docs-page.php:
|
800 |
msgid ""
|
801 |
"The Textblock Titled option type is used only on the Theme Option page. It "
|
802 |
"will allow you to create & display HTML on your Theme Options page and has a "
|
@@ -806,11 +990,11 @@ msgid ""
|
|
806 |
"value."
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: includes/ot-functions-docs-page.php:
|
810 |
msgid "Typography"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: includes/ot-functions-docs-page.php:
|
814 |
msgid ""
|
815 |
"The Typography option type is for adding typographic styles to your theme "
|
816 |
"either dynamically via the CSS option type below or manually with "
|
@@ -824,17 +1008,17 @@ msgid ""
|
|
824 |
"Google Fonts to create custom font stacks."
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: includes/ot-functions-docs-page.php:
|
828 |
msgid ""
|
829 |
"This example would filter <code>ot_recognized_font_families</code> to build "
|
830 |
"your own font stack. Added to <code>functions.php</code>."
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: includes/ot-functions-docs-page.php:
|
834 |
msgid "Upload"
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: includes/ot-functions-docs-page.php:
|
838 |
msgid ""
|
839 |
"The Upload option type is used to upload any WordPress supported media. "
|
840 |
"After uploading, users are required to press the \"Send to OptionTree\" "
|
@@ -845,128 +1029,128 @@ msgid ""
|
|
845 |
"change the URIs if necessary."
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: includes/ot-functions-docs-page.php:
|
849 |
msgid ""
|
850 |
"This function returns a value from the \"option_tree\" array of saved values "
|
851 |
"or the default value supplied. The returned value would be mixed. Meaning it "
|
852 |
"could be a string, integer, boolean, or array."
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: includes/ot-functions-docs-page.php:
|
856 |
-
#: includes/ot-functions-docs-page.php:
|
857 |
msgid "Usage"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: includes/ot-functions-docs-page.php:
|
861 |
-
#: includes/ot-functions-docs-page.php:
|
862 |
msgid "Parameters"
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: includes/ot-functions-docs-page.php:
|
866 |
-
#: includes/ot-functions-docs-page.php:
|
867 |
-
#: includes/ot-functions-docs-page.php:
|
868 |
msgid "string"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: includes/ot-functions-docs-page.php:
|
872 |
-
#: includes/ot-functions-docs-page.php:
|
873 |
msgid "required"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: includes/ot-functions-docs-page.php:
|
877 |
msgid "Enter the options unique identifier."
|
878 |
msgstr ""
|
879 |
|
880 |
-
#: includes/ot-functions-docs-page.php:
|
881 |
-
#: includes/ot-functions-docs-page.php:
|
882 |
msgid "Default:"
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: includes/ot-functions-docs-page.php:
|
886 |
-
#: includes/ot-functions-docs-page.php:
|
887 |
-
#: includes/ot-functions-docs-page.php:
|
888 |
-
#: includes/ot-functions-docs-page.php:
|
889 |
msgid "None"
|
890 |
msgstr ""
|
891 |
|
892 |
-
#: includes/ot-functions-docs-page.php:
|
893 |
-
#: includes/ot-functions-docs-page.php:
|
894 |
-
#: includes/ot-functions-docs-page.php:
|
895 |
-
#: includes/ot-functions-docs-page.php:
|
896 |
-
#: includes/ot-functions-docs-page.php:
|
897 |
msgid "optional"
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: includes/ot-functions-docs-page.php:
|
901 |
msgid ""
|
902 |
"Enter a default return value. This is just incase the request returns null."
|
903 |
msgstr ""
|
904 |
|
905 |
-
#: includes/ot-functions-docs-page.php:
|
906 |
-
#: includes/ot-functions-docs-page.php:
|
907 |
-
#: includes/ot-functions-docs-page.php:
|
908 |
-
#: includes/ot-functions-docs-page.php:
|
909 |
-
#: includes/ot-functions-docs-page.php:
|
910 |
msgid "Default"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: includes/ot-functions-docs-page.php:
|
914 |
msgid ""
|
915 |
"This function has been deprecated. That means it has been replaced by a new "
|
916 |
"function or is no longer supported, and may be removed from future versions. "
|
917 |
"All code that uses this function should be converted to use its replacement."
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: includes/ot-functions-docs-page.php:
|
921 |
msgid "Use"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: includes/ot-functions-docs-page.php:
|
925 |
msgid "instead"
|
926 |
msgstr ""
|
927 |
|
928 |
-
#: includes/ot-functions-docs-page.php:
|
929 |
msgid ""
|
930 |
"This function returns, or echos if asked, a value from the \"option_tree\" "
|
931 |
"array of saved values."
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: includes/ot-functions-docs-page.php:
|
935 |
msgid "Enter a unique Option Key to get a returned value or array."
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: includes/ot-functions-docs-page.php:
|
939 |
msgid "array"
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: includes/ot-functions-docs-page.php:
|
943 |
msgid "Used to cut down on database queries in template files."
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: includes/ot-functions-docs-page.php:
|
947 |
-
#: includes/ot-functions-docs-page.php:
|
948 |
msgid "boolean"
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: includes/ot-functions-docs-page.php:
|
952 |
msgid "Echo the output."
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: includes/ot-functions-docs-page.php:
|
956 |
msgid "Used to indicate the $item_id is an array of values."
|
957 |
msgstr ""
|
958 |
|
959 |
-
#: includes/ot-functions-docs-page.php:
|
960 |
msgid "integer"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: includes/ot-functions-docs-page.php:
|
964 |
msgid ""
|
965 |
"Numeric offset key for the $item_id array, -1 will return all values (an "
|
966 |
"array starts at 0)."
|
967 |
msgstr ""
|
968 |
|
969 |
-
#: includes/ot-functions-docs-page.php:
|
970 |
msgid ""
|
971 |
"If you're using the plugin version of OptionTree it is highly recommended to "
|
972 |
"include a <code>function_exists</code> check in your code, as described in "
|
@@ -976,32 +1160,32 @@ msgid ""
|
|
976 |
"<code>ot_get_option()</code> function available."
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: includes/ot-functions-docs-page.php:
|
980 |
msgid "String Examples"
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: includes/ot-functions-docs-page.php:
|
984 |
msgid "Returns the value of <code>test_input</code>."
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: includes/ot-functions-docs-page.php:
|
988 |
msgid ""
|
989 |
"Returns the value of <code>test_input</code>, but also has a default value "
|
990 |
"if it returns empty."
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: includes/ot-functions-docs-page.php:
|
994 |
msgid "Array Examples"
|
995 |
msgstr ""
|
996 |
|
997 |
-
#: includes/ot-functions-docs-page.php:
|
998 |
msgid ""
|
999 |
"Assigns the value of <code>navigation_ids</code> to the variable <code>$ids</"
|
1000 |
"code>. It then echos an unordered list of links (navigation) using "
|
1001 |
"<code>wp_list_pages()</code>."
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: includes/ot-functions-docs-page.php:
|
1005 |
msgid ""
|
1006 |
"The next two examples demonstrate how to use the <strong>Measurement</"
|
1007 |
"strong> option type. The Measurement option type is an array with two key/"
|
@@ -1009,15 +1193,15 @@ msgid ""
|
|
1009 |
"unit of measurement."
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: includes/ot-functions-docs-page.php:
|
1013 |
msgid "This example displays a very basic slider loop."
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: includes/ot-functions-docs-page.php:
|
1017 |
msgid "It's Super Simple"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: includes/ot-functions-docs-page.php:
|
1021 |
msgid ""
|
1022 |
"Layouts make your theme awesome! With theme options data that you can save/"
|
1023 |
"import/export you can package themes with different color variations, or "
|
@@ -1025,7 +1209,7 @@ msgid ""
|
|
1025 |
"a snapshot of your data as a layout."
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: includes/ot-functions-docs-page.php:
|
1029 |
msgid ""
|
1030 |
"Once you have created all your different layouts, or theme variations, you "
|
1031 |
"can save them to a separate text file for repackaging with your theme. "
|
@@ -1034,117 +1218,117 @@ msgid ""
|
|
1034 |
"previous options data."
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: includes/ot-functions-docs-page.php:
|
1038 |
msgid ""
|
1039 |
" Adding a layout is ridiculously easy, follow these steps and you'll be on "
|
1040 |
"your way to having a WordPress super theme."
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: includes/ot-functions-docs-page.php:
|
1044 |
msgid "For Developers"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: includes/ot-functions-docs-page.php:
|
1048 |
-
#: includes/ot-functions-docs-page.php:
|
1049 |
msgid "Creating a Layout"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: includes/ot-functions-docs-page.php:595
|
1053 |
-
#: includes/ot-functions-docs-page.php:602
|
1054 |
#: includes/ot-functions-docs-page.php:608
|
|
|
|
|
1055 |
msgid "Go to the <code>OptionTre->Settings->Layouts</code> tab."
|
1056 |
msgstr ""
|
1057 |
|
1058 |
-
#: includes/ot-functions-docs-page.php:
|
1059 |
msgid ""
|
1060 |
"Enter a name for your layout in the text field and hit \"Save Layouts\", "
|
1061 |
"you've created your first layout."
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: includes/ot-functions-docs-page.php:
|
1065 |
-
#: includes/ot-functions-docs-page.php:
|
1066 |
msgid "Adding a new layout is as easy as repeating the steps above."
|
1067 |
msgstr ""
|
1068 |
|
1069 |
-
#: includes/ot-functions-docs-page.php:
|
1070 |
-
#: includes/ot-functions-docs-page.php:
|
1071 |
msgid "Activating a Layout"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
-
#: includes/ot-functions-docs-page.php:
|
1075 |
msgid "Click on the activate layout button in the actions list."
|
1076 |
msgstr ""
|
1077 |
|
1078 |
-
#: includes/ot-functions-docs-page.php:
|
1079 |
-
#: includes/ot-functions-docs-page.php:
|
1080 |
msgid "Deleting a Layout"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
-
#: includes/ot-functions-docs-page.php:
|
1084 |
msgid "Click on the delete layout button in the actions list."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#: includes/ot-functions-docs-page.php:
|
1088 |
-
#: includes/ot-functions-docs-page.php:
|
1089 |
msgid "Edit Layout Data"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: includes/ot-functions-docs-page.php:
|
1093 |
-
#: includes/ot-functions-docs-page.php:
|
1094 |
-
#: includes/ot-functions-docs-page.php:
|
1095 |
msgid "Go to the <code>Appearance->Theme Options</code> page."
|
1096 |
msgstr ""
|
1097 |
|
1098 |
-
#: includes/ot-functions-docs-page.php:
|
1099 |
-
#: includes/ot-functions-docs-page.php:
|
1100 |
msgid ""
|
1101 |
"Modify and save your theme options and the layout will be updated "
|
1102 |
"automatically."
|
1103 |
msgstr ""
|
1104 |
|
1105 |
-
#: includes/ot-functions-docs-page.php:
|
1106 |
-
#: includes/ot-functions-docs-page.php:
|
1107 |
msgid ""
|
1108 |
"Saving theme options data will update the currently active layout, so before "
|
1109 |
"you start saving make sure you want to modify the current layout."
|
1110 |
msgstr ""
|
1111 |
|
1112 |
-
#: includes/ot-functions-docs-page.php:
|
1113 |
msgid ""
|
1114 |
"If you want to edit a new layout, first create it then save your theme "
|
1115 |
"options."
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: includes/ot-functions-docs-page.php:
|
1119 |
msgid "End-Users Mode"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
-
#: includes/ot-functions-docs-page.php:
|
1123 |
msgid ""
|
1124 |
"Enter a name for your layout in the text field and hit \"New Layout\", "
|
1125 |
"you've created your first layout."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: includes/ot-functions-docs-page.php:
|
1129 |
msgid ""
|
1130 |
"Choose a layout from the select list and click the \"Activate Layout\" "
|
1131 |
"button."
|
1132 |
msgstr ""
|
1133 |
|
1134 |
-
#: includes/ot-functions-docs-page.php:
|
1135 |
msgid "End-Users mode does not allow deleting layouts."
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: includes/ot-functions-docs-page.php:
|
1139 |
msgid "Go to the <code>Appearance->Theme Options</code> tab."
|
1140 |
msgstr ""
|
1141 |
|
1142 |
-
#: includes/ot-functions-docs-page.php:
|
1143 |
-
#: includes/ot-functions-docs-page.php:
|
1144 |
msgid "How-to-guide"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: includes/ot-functions-docs-page.php:
|
1148 |
msgid ""
|
1149 |
"There are a few simple steps you need to take in order to use OptionTree's "
|
1150 |
"built in Meta Box API. In the code below I'll show you a basic demo of how "
|
@@ -1155,7 +1339,7 @@ msgid ""
|
|
1155 |
"can reference."
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: includes/ot-functions-docs-page.php:
|
1159 |
msgid ""
|
1160 |
"It's important to note that Meta Boxes do not support WYSIWYG editors at "
|
1161 |
"this time and if you set one of your options to Textarea it will "
|
@@ -1163,36 +1347,36 @@ msgid ""
|
|
1163 |
"WordPress released this statement regarding the wp_editor() function:"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
-
#: includes/ot-functions-docs-page.php:
|
1167 |
msgid ""
|
1168 |
"Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. "
|
1169 |
"What this means in practical terms, is that you cannot put it in meta-boxes "
|
1170 |
"that can be dragged and placed elsewhere on the page."
|
1171 |
msgstr ""
|
1172 |
|
1173 |
-
#: includes/ot-functions-docs-page.php:
|
1174 |
msgid "Create and include your custom meta boxes file."
|
1175 |
msgstr ""
|
1176 |
|
1177 |
-
#: includes/ot-functions-docs-page.php:
|
1178 |
msgid ""
|
1179 |
"Create a file and name it anything you want, maybe <code>meta-boxes.php</"
|
1180 |
"code>."
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: includes/ot-functions-docs-page.php:
|
1184 |
msgid ""
|
1185 |
"As well, you'll probably want to create a directory named <code>includes</"
|
1186 |
"code> to put your <code>meta-boxes.php</code> into which will help keep you "
|
1187 |
"file structure nice and tidy."
|
1188 |
msgstr ""
|
1189 |
|
1190 |
-
#: includes/ot-functions-docs-page.php:
|
1191 |
-
#: includes/ot-functions-docs-page.php:
|
1192 |
msgid "Add the following code to your <code>functions.php</code>."
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: includes/ot-functions-docs-page.php:
|
1196 |
msgid ""
|
1197 |
"Add a variation of the following code to your <code>meta-boxes.php</code>. "
|
1198 |
"You'll obviously need to fill it in with all your custom array values. It's "
|
@@ -1201,7 +1385,7 @@ msgid ""
|
|
1201 |
"before OptionTree was loaded the sky would fall on your head."
|
1202 |
msgstr ""
|
1203 |
|
1204 |
-
#: includes/ot-functions-docs-page.php:
|
1205 |
msgid ""
|
1206 |
"There are a few simple steps you need to take in order to use OptionTree as "
|
1207 |
"a theme included module. In the code below I'll show you a basic demo of how "
|
@@ -1212,71 +1396,71 @@ msgid ""
|
|
1212 |
"contains a file named <code>demo-theme-options.php</code> you can reference."
|
1213 |
msgstr ""
|
1214 |
|
1215 |
-
#: includes/ot-functions-docs-page.php:
|
1216 |
msgid "Step 1: Include the plugin & turn on theme mode."
|
1217 |
msgstr ""
|
1218 |
|
1219 |
-
#: includes/ot-functions-docs-page.php:
|
1220 |
msgid ""
|
1221 |
"Download the latest version of <a href=\"http://wordpress.org/extend/plugins/"
|
1222 |
"option-tree/\" rel=\"nofollow\" target=\"_blank\">OptionTree</a>."
|
1223 |
msgstr ""
|
1224 |
|
1225 |
-
#: includes/ot-functions-docs-page.php:
|
1226 |
msgid "Unpack the ZIP archive."
|
1227 |
msgstr ""
|
1228 |
|
1229 |
-
#: includes/ot-functions-docs-page.php:
|
1230 |
msgid ""
|
1231 |
"Put the <code>option-tree</code> directory in the root of your theme. For "
|
1232 |
"example, the server path would be <code>/wp-content/themes/theme-name/option-"
|
1233 |
"tree/</code>."
|
1234 |
msgstr ""
|
1235 |
|
1236 |
-
#: includes/ot-functions-docs-page.php:
|
1237 |
msgid ""
|
1238 |
"Add the following code to the beginning of your <code>functions.php</code>."
|
1239 |
msgstr ""
|
1240 |
|
1241 |
-
#: includes/ot-functions-docs-page.php:
|
1242 |
msgid ""
|
1243 |
"It's that simple! You now have OptionTree built into your theme and anytime "
|
1244 |
"there's an update to the plugin you just replace the old version and you're "
|
1245 |
"good to go.."
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: includes/ot-functions-docs-page.php:
|
1249 |
msgid "Step 2: Create Theme Options without using the UI Builder."
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: includes/ot-functions-docs-page.php:
|
1253 |
msgid ""
|
1254 |
"Create a file and name it anything you want, maybe <code>theme-options.php</"
|
1255 |
"code>, or use the built in file export to create it for you. Remember, you "
|
1256 |
"should always check the file for errors before including it in your theme."
|
1257 |
msgstr ""
|
1258 |
|
1259 |
-
#: includes/ot-functions-docs-page.php:
|
1260 |
msgid ""
|
1261 |
"As well, you'll probably want to create a directory named <code>includes</"
|
1262 |
"code> to put your <code>theme-options.php</code> into which will help keep "
|
1263 |
"you file structure nice and tidy."
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: includes/ot-functions-docs-page.php:
|
1267 |
msgid ""
|
1268 |
"Add a variation of the following code to your <code>theme-options.php</"
|
1269 |
"code>. You'll obviously need to fill it in with all your custom array values "
|
1270 |
"for contextual help (optional), sections (required), and settings (required)."
|
1271 |
msgstr ""
|
1272 |
|
1273 |
-
#: includes/ot-functions-docs-page.php:
|
1274 |
msgid ""
|
1275 |
"The code below is a boilerplate to get your started. For a full list of the "
|
1276 |
"available option types click the \"Option Types\" tab above. Also a quick "
|
1277 |
"note, you don't need to put OptionTree in theme mode to manually create "
|
1278 |
"options but you will want to hide the docs and settings as each time you "
|
1279 |
-
"load the admin area the settings be
|
1280 |
"they've changed in any way. However, this ensures your settings do not get "
|
1281 |
"tampered with by the end-user."
|
1282 |
msgstr ""
|
@@ -1298,53 +1482,61 @@ msgid "background-position"
|
|
1298 |
msgstr ""
|
1299 |
|
1300 |
#: includes/ot-functions-option-types.php:140
|
1301 |
-
#: includes/ot-functions-option-types.php:
|
1302 |
msgid "Add Media"
|
1303 |
msgstr ""
|
1304 |
|
1305 |
-
#: includes/ot-functions-option-types.php:
|
1306 |
-
#: includes/ot-functions-option-types.php:
|
1307 |
msgid "No Categories Found"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
-
#: includes/ot-functions-option-types.php:
|
1311 |
-
#: includes/ot-functions-option-types.php:
|
1312 |
-
#: includes/ot-functions-option-types.php:
|
1313 |
-
#: includes/ot-functions-option-types.php:
|
1314 |
-
#: includes/ot-functions-option-types.php:
|
1315 |
-
#: includes/ot-functions-option-types.php:
|
1316 |
msgid "Choose One"
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: includes/ot-functions-option-types.php:
|
1320 |
-
#: includes/ot-functions-option-types.php:
|
1321 |
-
#: includes/ot-functions-option-types.php:
|
1322 |
-
#: includes/ot-functions-option-types.php:
|
1323 |
msgid "No Posts Found"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
-
#: includes/ot-functions-option-types.php:
|
1327 |
-
#: includes/ot-functions-option-types.php:
|
1328 |
msgid "Add New"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
-
#: includes/ot-functions-option-types.php:
|
1332 |
-
#: includes/ot-functions-option-types.php:
|
1333 |
msgid "You can re-order with drag & drop, the order will update after saving."
|
1334 |
msgstr ""
|
1335 |
|
1336 |
-
#: includes/ot-functions-option-types.php:
|
1337 |
-
#: includes/ot-functions-option-types.php:
|
1338 |
msgid "No Pages Found"
|
1339 |
msgstr ""
|
1340 |
|
1341 |
-
#: includes/ot-functions-option-types.php:
|
1342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1343 |
msgid "No Tags Found"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
-
#: includes/ot-functions-option-types.php:
|
1347 |
-
#: includes/ot-functions-option-types.php:
|
1348 |
msgid "No Taxonomies Found"
|
1349 |
msgstr ""
|
1350 |
|
@@ -1396,12 +1588,6 @@ msgstr ""
|
|
1396 |
msgid "Add Section"
|
1397 |
msgstr ""
|
1398 |
|
1399 |
-
#: includes/ot-functions-settings-page.php:94
|
1400 |
-
#: includes/ot-functions-settings-page.php:133
|
1401 |
-
#: includes/ot-ui-theme-options.php:42
|
1402 |
-
msgid "Save Changes"
|
1403 |
-
msgstr ""
|
1404 |
-
|
1405 |
#: includes/ot-functions-settings-page.php:99
|
1406 |
msgid "Contextual Help"
|
1407 |
msgstr ""
|
@@ -1565,115 +1751,3 @@ msgstr ""
|
|
1565 |
#: includes/ot-settings-api.php:353
|
1566 |
msgid "Reset Options"
|
1567 |
msgstr ""
|
1568 |
-
|
1569 |
-
#: includes/ot-ui-admin.php:19 includes/ot-ui-admin.php:20
|
1570 |
-
msgid "OptionTree"
|
1571 |
-
msgstr ""
|
1572 |
-
|
1573 |
-
#: includes/ot-ui-admin.php:36 includes/ot-ui-admin.php:131
|
1574 |
-
#: includes/ot-ui-theme-options.php:40
|
1575 |
-
msgid "Theme Options updated."
|
1576 |
-
msgstr ""
|
1577 |
-
|
1578 |
-
#: includes/ot-ui-admin.php:37 includes/ot-ui-admin.php:132
|
1579 |
-
#: includes/ot-ui-theme-options.php:41
|
1580 |
-
msgid "Theme Options reset."
|
1581 |
-
msgstr ""
|
1582 |
-
|
1583 |
-
#: includes/ot-ui-admin.php:38 includes/ot-ui-admin.php:133
|
1584 |
-
msgid "Save Settings"
|
1585 |
-
msgstr ""
|
1586 |
-
|
1587 |
-
#: includes/ot-ui-admin.php:44
|
1588 |
-
msgid "Theme Options UI"
|
1589 |
-
msgstr ""
|
1590 |
-
|
1591 |
-
#: includes/ot-ui-admin.php:48
|
1592 |
-
msgid "Import"
|
1593 |
-
msgstr ""
|
1594 |
-
|
1595 |
-
#: includes/ot-ui-admin.php:52
|
1596 |
-
msgid "Export"
|
1597 |
-
msgstr ""
|
1598 |
-
|
1599 |
-
#: includes/ot-ui-admin.php:56 includes/ot-ui-admin.php:86
|
1600 |
-
#: includes/ot-ui-admin.php:110
|
1601 |
-
msgid "Layouts"
|
1602 |
-
msgstr ""
|
1603 |
-
|
1604 |
-
#: includes/ot-ui-admin.php:62
|
1605 |
-
msgid "Theme Options UI Builder"
|
1606 |
-
msgstr ""
|
1607 |
-
|
1608 |
-
#: includes/ot-ui-admin.php:68
|
1609 |
-
msgid "Settings XML"
|
1610 |
-
msgstr ""
|
1611 |
-
|
1612 |
-
#: includes/ot-ui-admin.php:80 includes/ot-ui-admin.php:104
|
1613 |
-
#: includes/ot-ui-theme-options.php:34 includes/ot-ui-theme-options.php:35
|
1614 |
-
msgid "Theme Options"
|
1615 |
-
msgstr ""
|
1616 |
-
|
1617 |
-
#: includes/ot-ui-admin.php:92
|
1618 |
-
msgid "Settings PHP File"
|
1619 |
-
msgstr ""
|
1620 |
-
|
1621 |
-
#: includes/ot-ui-admin.php:116
|
1622 |
-
msgid "Add, Activate, & Remove Layouts"
|
1623 |
-
msgstr ""
|
1624 |
-
|
1625 |
-
#: includes/ot-ui-admin.php:125 includes/ot-ui-admin.php:126
|
1626 |
-
msgid "Documentation"
|
1627 |
-
msgstr ""
|
1628 |
-
|
1629 |
-
#: includes/ot-ui-admin.php:139
|
1630 |
-
msgid "Creating Options"
|
1631 |
-
msgstr ""
|
1632 |
-
|
1633 |
-
#: includes/ot-ui-admin.php:143
|
1634 |
-
msgid "Option Types"
|
1635 |
-
msgstr ""
|
1636 |
-
|
1637 |
-
#: includes/ot-ui-admin.php:147
|
1638 |
-
msgid "Function References"
|
1639 |
-
msgstr ""
|
1640 |
-
|
1641 |
-
#: includes/ot-ui-admin.php:151 includes/ot-ui-admin.php:193
|
1642 |
-
msgid "Theme Mode"
|
1643 |
-
msgstr ""
|
1644 |
-
|
1645 |
-
#: includes/ot-ui-admin.php:155 includes/ot-ui-admin.php:199
|
1646 |
-
msgid "Meta Boxes"
|
1647 |
-
msgstr ""
|
1648 |
-
|
1649 |
-
#: includes/ot-ui-admin.php:159
|
1650 |
-
msgid "Code Examples"
|
1651 |
-
msgstr ""
|
1652 |
-
|
1653 |
-
#: includes/ot-ui-admin.php:163
|
1654 |
-
msgid "Layouts Overview"
|
1655 |
-
msgstr ""
|
1656 |
-
|
1657 |
-
#: includes/ot-ui-admin.php:169
|
1658 |
-
msgid "Overview of available Theme Option fields."
|
1659 |
-
msgstr ""
|
1660 |
-
|
1661 |
-
#: includes/ot-ui-admin.php:175
|
1662 |
-
msgid "Option types in alphabetical order & hooks to filter them."
|
1663 |
-
msgstr ""
|
1664 |
-
|
1665 |
-
#: includes/ot-ui-admin.php:181
|
1666 |
-
msgid "Function Reference:ot_get_option()"
|
1667 |
-
msgstr ""
|
1668 |
-
|
1669 |
-
#: includes/ot-ui-admin.php:187
|
1670 |
-
msgid "Function Reference:get_option_tree()"
|
1671 |
-
msgstr ""
|
1672 |
-
|
1673 |
-
#: includes/ot-ui-admin.php:205
|
1674 |
-
msgid "Code examples for front-end development."
|
1675 |
-
msgstr ""
|
1676 |
-
|
1677 |
-
#: includes/ot-ui-admin.php:211
|
1678 |
-
msgid "What's a layout anyhow?"
|
1679 |
-
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
|
7 |
+
"POT-Creation-Date: 2013-08-11 08:44:35+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: includes/ot-functions-admin.php:50 includes/ot-functions-admin.php:51
|
16 |
+
#: includes/ot-functions-admin.php:157 includes/ot-functions-admin.php:181
|
17 |
+
#: includes/ot-functions.php:187
|
18 |
+
msgid "Theme Options"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#: includes/ot-functions-admin.php:56 includes/ot-functions-admin.php:113
|
22 |
+
#: includes/ot-functions-admin.php:208
|
23 |
+
msgid "Theme Options updated."
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: includes/ot-functions-admin.php:57 includes/ot-functions-admin.php:114
|
27 |
+
#: includes/ot-functions-admin.php:209
|
28 |
+
msgid "Theme Options reset."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: includes/ot-functions-admin.php:58
|
32 |
+
#: includes/ot-functions-settings-page.php:94
|
33 |
+
#: includes/ot-functions-settings-page.php:133
|
34 |
+
msgid "Save Changes"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: includes/ot-functions-admin.php:96 includes/ot-functions-admin.php:97
|
38 |
+
msgid "OptionTree"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: includes/ot-functions-admin.php:107 includes/ot-functions-admin.php:108
|
42 |
+
#: includes/ot-functions-admin.php:151 includes/ot-functions-admin.php:175
|
43 |
+
#: includes/ot-functions-docs-page.php:49
|
44 |
+
msgid "Settings"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: includes/ot-functions-admin.php:115 includes/ot-functions-admin.php:210
|
48 |
+
msgid "Save Settings"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: includes/ot-functions-admin.php:121
|
52 |
+
msgid "Theme Options UI"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: includes/ot-functions-admin.php:125
|
56 |
+
msgid "Import"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: includes/ot-functions-admin.php:129
|
60 |
+
msgid "Export"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: includes/ot-functions-admin.php:133 includes/ot-functions-admin.php:163
|
64 |
+
#: includes/ot-functions-admin.php:187
|
65 |
+
msgid "Layouts"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: includes/ot-functions-admin.php:139
|
69 |
+
msgid "Theme Options UI Builder"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: includes/ot-functions-admin.php:145
|
73 |
+
msgid "Settings XML"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: includes/ot-functions-admin.php:169
|
77 |
+
msgid "Settings PHP File"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: includes/ot-functions-admin.php:193
|
81 |
+
msgid "Layout Management"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: includes/ot-functions-admin.php:202 includes/ot-functions-admin.php:203
|
85 |
+
msgid "Documentation"
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
#: includes/ot-functions-admin.php:216
|
89 |
+
msgid "Creating Options"
|
90 |
+
msgstr ""
|
91 |
+
|
92 |
+
#: includes/ot-functions-admin.php:220
|
93 |
+
msgid "Option Types"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
+
#: includes/ot-functions-admin.php:224
|
97 |
+
msgid "Function References"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: includes/ot-functions-admin.php:228 includes/ot-functions-admin.php:270
|
101 |
+
msgid "Theme Mode"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: includes/ot-functions-admin.php:232 includes/ot-functions-admin.php:276
|
105 |
+
msgid "Meta Boxes"
|
106 |
+
msgstr ""
|
107 |
+
|
108 |
+
#: includes/ot-functions-admin.php:236
|
109 |
+
msgid "Code Examples"
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
#: includes/ot-functions-admin.php:240
|
113 |
+
msgid "Layouts Overview"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: includes/ot-functions-admin.php:246
|
117 |
+
msgid "Overview of available Theme Option fields."
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: includes/ot-functions-admin.php:252
|
121 |
+
msgid "Option types in alphabetical order & hooks to filter them."
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: includes/ot-functions-admin.php:258
|
125 |
+
msgid "Function Reference:ot_get_option()"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: includes/ot-functions-admin.php:264
|
129 |
+
msgid "Function Reference:get_option_tree()"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: includes/ot-functions-admin.php:282
|
133 |
+
msgid "Code examples for front-end development."
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: includes/ot-functions-admin.php:288
|
137 |
+
msgid "What's a layout anyhow?"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: includes/ot-functions-admin.php:476
|
141 |
msgid "The Colorpicker only allows valid hexadecimal values."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: includes/ot-functions-admin.php:564
|
145 |
msgid "Send to OptionTree"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/ot-functions-admin.php:565
|
149 |
#: includes/ot-functions-option-types.php:152
|
150 |
+
#: includes/ot-functions-option-types.php:1871
|
151 |
msgid "Remove Media"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: includes/ot-functions-admin.php:566
|
155 |
msgid "Are you sure you want to reset back to the defaults?"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: includes/ot-functions-admin.php:567
|
159 |
msgid "You can't remove this! But you can edit the values."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/ot-functions-admin.php:568
|
163 |
msgid "Are you sure you want to remove this?"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/ot-functions-admin.php:569
|
167 |
msgid "Are you sure you want to activate this layout?"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: includes/ot-functions-admin.php:570
|
171 |
msgid "Sorry, you can't have settings three levels deep."
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: includes/ot-functions-admin.php:616
|
175 |
msgid "Option Tree"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: includes/ot-functions-admin.php:752
|
179 |
msgid "General"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/ot-functions-admin.php:758
|
183 |
msgid "Sample Text Field Label"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/ot-functions-admin.php:759
|
187 |
msgid "Description for the sample text field."
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/ot-functions-admin.php:1957
|
|
|
|
|
|
|
|
|
191 |
msgid "Settings updated."
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/ot-functions-admin.php:1961
|
195 |
msgid "Settings could not be saved."
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/ot-functions-admin.php:1969
|
199 |
msgid "Settings Imported."
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/ot-functions-admin.php:1973
|
203 |
msgid "Settings could not be imported."
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: includes/ot-functions-admin.php:1980
|
207 |
msgid "Data Imported."
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: includes/ot-functions-admin.php:1984
|
211 |
msgid "Data could not be imported."
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: includes/ot-functions-admin.php:1992
|
215 |
msgid "Layouts Imported."
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: includes/ot-functions-admin.php:1996
|
219 |
msgid "Layouts could not be imported."
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: includes/ot-functions-admin.php:2004
|
223 |
msgid "Layouts Updated."
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: includes/ot-functions-admin.php:2008
|
227 |
msgid "Layouts could not be updated."
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: includes/ot-functions-admin.php:2012
|
231 |
+
msgid "Layouts have been deleted."
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: includes/ot-functions-admin.php:2018
|
235 |
+
msgid "Layout activated."
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: includes/ot-functions-admin.php:2580
|
239 |
msgid "Left Sidebar"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: includes/ot-functions-admin.php:2585
|
243 |
msgid "Right Sidebar"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: includes/ot-functions-admin.php:2590
|
247 |
msgid "Full Width (no sidebar)"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: includes/ot-functions-admin.php:2595
|
251 |
msgid "Dual Sidebar"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: includes/ot-functions-admin.php:2600
|
255 |
msgid "Left Dual Sidebar"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/ot-functions-admin.php:2605
|
259 |
msgid "Right Dual Sidebar"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/ot-functions-admin.php:2635 includes/ot-functions-admin.php:2696
|
263 |
msgid "Image"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: includes/ot-functions-admin.php:2646 includes/ot-functions-admin.php:2702
|
267 |
msgid "Link"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: includes/ot-functions-admin.php:2657 includes/ot-functions-admin.php:2708
|
271 |
#: includes/ot-functions-docs-page.php:43
|
272 |
+
#: includes/ot-functions-docs-page.php:380
|
273 |
+
#: includes/ot-functions-docs-page.php:430
|
274 |
msgid "Description"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: includes/ot-functions-admin.php:3180
|
278 |
msgid "edit"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: includes/ot-functions-admin.php:3181 includes/ot-functions-admin.php:3248
|
282 |
+
#: includes/ot-functions-admin.php:3249 includes/ot-functions-admin.php:3392
|
283 |
+
#: includes/ot-functions-admin.php:3393 includes/ot-functions-admin.php:3458
|
284 |
+
#: includes/ot-functions-admin.php:3459 includes/ot-functions-admin.php:3586
|
285 |
+
#: includes/ot-functions-admin.php:3587
|
286 |
msgid "Edit"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/ot-functions-admin.php:3183 includes/ot-functions-admin.php:3184
|
290 |
+
#: includes/ot-functions-admin.php:3251 includes/ot-functions-admin.php:3252
|
291 |
+
#: includes/ot-functions-admin.php:3395 includes/ot-functions-admin.php:3396
|
292 |
+
#: includes/ot-functions-admin.php:3461 includes/ot-functions-admin.php:3462
|
293 |
+
#: includes/ot-functions-admin.php:3520 includes/ot-functions-admin.php:3521
|
294 |
+
#: includes/ot-functions-admin.php:3589 includes/ot-functions-admin.php:3590
|
295 |
msgid "Delete"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: includes/ot-functions-admin.php:3190
|
299 |
msgid ""
|
300 |
"<strong>Section Title</strong>: Displayed as a menu item on the Theme "
|
301 |
"Options page."
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: includes/ot-functions-admin.php:3198
|
305 |
msgid ""
|
306 |
"<strong>Section ID</strong>: A unique lower case alphanumeric string, "
|
307 |
"underscores allowed."
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: includes/ot-functions-admin.php:3258
|
311 |
msgid ""
|
312 |
"<strong>Label</strong>: Displayed as the label of a form element on the "
|
313 |
"Theme Options page."
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: includes/ot-functions-admin.php:3266 includes/ot-functions-admin.php:3476
|
317 |
msgid ""
|
318 |
"<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
|
319 |
"allowed."
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: includes/ot-functions-admin.php:3274
|
323 |
msgid ""
|
324 |
"<strong>Type</strong>: Choose one of the available option types from the "
|
325 |
"dropdown."
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: includes/ot-functions-admin.php:3285
|
329 |
msgid ""
|
330 |
"<strong>Description</strong>: Enter a detailed description for the users to "
|
331 |
"read on the Theme Options page, HTML is allowed. This is also where you "
|
332 |
"enter content for both the Textblock & Textblock Titled option types."
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: includes/ot-functions-admin.php:3293
|
336 |
msgid ""
|
337 |
"<strong>Choices</strong>: This will only affect the following option types: "
|
338 |
"Checkbox, Radio, Select & Select Image."
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/ot-functions-admin.php:3298
|
342 |
msgid "Add Choice"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: includes/ot-functions-admin.php:3304
|
346 |
msgid ""
|
347 |
"<strong>Settings</strong>: This will only affect the List Item option type."
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: includes/ot-functions-admin.php:3309
|
351 |
#: includes/ot-functions-settings-page.php:93
|
352 |
msgid "Add Setting"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: includes/ot-functions-admin.php:3315
|
356 |
msgid ""
|
357 |
"<strong>Standard</strong>: Setting the standard value for your option only "
|
358 |
"works for some option types. Read the <code>OptionTree->Documentation</code> "
|
359 |
"for more information on which ones."
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: includes/ot-functions-admin.php:3323
|
363 |
msgid ""
|
364 |
"<strong>Rows</strong>: Enter a numeric value for the number of rows in your "
|
365 |
"textarea. This will only affect the following option types: CSS, Textarea, & "
|
366 |
"Textarea Simple."
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: includes/ot-functions-admin.php:3331
|
370 |
msgid ""
|
371 |
"<strong>Post Type</strong>: Add a comma separated list of post type like "
|
372 |
"'post,page'. This will only affect the following option types: Custom Post "
|
373 |
"Type Checkbox, & Custom Post Type Select."
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: includes/ot-functions-admin.php:3339
|
377 |
msgid ""
|
378 |
"<strong>Taxonomy</strong>: Add a comma separated list of any registered "
|
379 |
"taxonomy like 'category,post_tag'. This will only affect the following "
|
380 |
"option types: Taxonomy Checkbox, & Taxonomy Select."
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: includes/ot-functions-admin.php:3347
|
384 |
+
msgid ""
|
385 |
+
"<strong>Min, Max, & Step</strong>: Add a comma separated list of options in "
|
386 |
+
"the following format <code>0,100,1</code> (slide from <code>0-100</code> in "
|
387 |
+
"intervals of <code>1</code>). The three values represent the minimum, "
|
388 |
+
"maximum, and step options and will only affect the Numeric Slider option "
|
389 |
+
"type."
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/ot-functions-admin.php:3355
|
393 |
msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/ot-functions-admin.php:3402 includes/ot-functions-docs-page.php:29
|
397 |
msgid "Label"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/ot-functions-admin.php:3412
|
401 |
msgid "Value"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: includes/ot-functions-admin.php:3422
|
405 |
msgid "Image Source (Radio Image only)"
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: includes/ot-functions-admin.php:3468
|
409 |
msgid ""
|
410 |
"<strong>Title</strong>: Displayed as a contextual help menu item on the "
|
411 |
"Theme Options page."
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: includes/ot-functions-admin.php:3484
|
415 |
msgid ""
|
416 |
"<strong>Content</strong>: Enter the HTML content about this contextual help "
|
417 |
"item displayed on the Theme Option page for end users to read."
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: includes/ot-functions-admin.php:3515
|
421 |
msgid "Layout"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: includes/ot-functions-admin.php:3517 includes/ot-functions-admin.php:3518
|
425 |
msgid "Activate"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: includes/ot-functions-admin.php:3554 includes/ot-meta-box-api.php:182
|
429 |
+
#: includes/ot-settings-api.php:587
|
430 |
msgid "Title"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: includes/ot-functions-admin.php:3720
|
434 |
msgid "New Layout"
|
435 |
msgstr ""
|
436 |
|
482 |
"Select Image."
|
483 |
msgstr ""
|
484 |
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
#: includes/ot-functions-docs-page.php:50
|
486 |
msgid ""
|
487 |
"Click the \"Add Setting\" button found inside a newly created setting to add "
|
534 |
"Checkbox, & Taxonomy Select."
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: includes/ot-functions-docs-page.php:70
|
538 |
+
msgid "Min, Max, & Step"
|
539 |
+
msgstr ""
|
540 |
+
|
541 |
+
#: includes/ot-functions-docs-page.php:71
|
542 |
+
msgid ""
|
543 |
+
"Add a comma separated list of options in the following format <code>0,100,1</"
|
544 |
+
"code> (slide from <code>0-100</code> in intervals of <code>1</code>). The "
|
545 |
+
"three values represent the minimum, maximum, and step options and will only "
|
546 |
+
"affect the Numeric Slider option type."
|
547 |
+
msgstr ""
|
548 |
+
|
549 |
+
#: includes/ot-functions-docs-page.php:73
|
550 |
+
msgid "CSS Class"
|
551 |
+
msgstr ""
|
552 |
+
|
553 |
+
#: includes/ot-functions-docs-page.php:74
|
554 |
+
msgid "Add and optional class to any option type."
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#: includes/ot-functions-docs-page.php:104
|
558 |
msgid "Background"
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: includes/ot-functions-docs-page.php:105
|
562 |
msgid ""
|
563 |
"The Background option type is for adding background styles to your theme "
|
564 |
"either dynamically via the CSS option type below or manually with "
|
570 |
"fine tune the select lists for your specific CSS needs."
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: includes/ot-functions-docs-page.php:107
|
574 |
msgid "Category Select"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: includes/ot-functions-docs-page.php:108
|
578 |
msgid ""
|
579 |
"The Category Select option type displays a list of category IDs. It allows "
|
580 |
"the user to select only one category ID and will return that value for use "
|
581 |
"in a custom function or loop."
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: includes/ot-functions-docs-page.php:110
|
585 |
msgid "Category Checkbox"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: includes/ot-functions-docs-page.php:111
|
589 |
msgid ""
|
590 |
"The Category Checkbox option type displays a list of category IDs. It allows "
|
591 |
"the user to check multiple category IDs and will return that value as an "
|
592 |
"array for use in a custom function or loop."
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: includes/ot-functions-docs-page.php:113
|
596 |
msgid "Checkbox"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: includes/ot-functions-docs-page.php:114
|
600 |
msgid ""
|
601 |
"The Checkbox option type is fairly self explanatory. Typically used to ask "
|
602 |
"questions. For example, \"Do you want to activate asynchronous Google "
|
607 |
"nothing if it doesn't."
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: includes/ot-functions-docs-page.php:116
|
611 |
msgid "Colorpicker"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: includes/ot-functions-docs-page.php:117
|
615 |
msgid ""
|
616 |
"The Colorpicker option type saves a hexadecimal color code for use in CSS. "
|
617 |
"Use it to modify the color of something in your theme."
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: includes/ot-functions-docs-page.php:119
|
621 |
msgid "CSS"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: includes/ot-functions-docs-page.php:120
|
625 |
msgid ""
|
626 |
"The CSS option type is a textarea that when used properly can add dynamic "
|
627 |
"CSS to your theme from within OptionTree. Unfortunately, due server "
|
634 |
"theme options."
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: includes/ot-functions-docs-page.php:122
|
638 |
msgid ""
|
639 |
"An example of the CSS option type: This assumes you have an option with the "
|
640 |
"ID of <code>custom_background_css</code> which will display the saved values "
|
641 |
"for that option."
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: includes/ot-functions-docs-page.php:124
|
645 |
msgid "Input"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: includes/ot-functions-docs-page.php:130
|
649 |
msgid "Output"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: includes/ot-functions-docs-page.php:138
|
653 |
msgid "Custom Post Type Select"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: includes/ot-functions-docs-page.php:139
|
657 |
msgid ""
|
658 |
"The Custom Post Type Select option type displays a list of IDs from any "
|
659 |
"available WordPress post type or custom post type. It will return a single "
|
663 |
"version."
|
664 |
msgstr ""
|
665 |
|
666 |
+
#: includes/ot-functions-docs-page.php:141
|
667 |
msgid "Custom Post Type Checkbox"
|
668 |
msgstr ""
|
669 |
|
670 |
+
#: includes/ot-functions-docs-page.php:142
|
671 |
msgid ""
|
672 |
"The Custom Post Type Select option type displays a list of IDs from any "
|
673 |
"available WordPress post type or custom post type. It allows the user to "
|
677 |
"future version."
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: includes/ot-functions-docs-page.php:144
|
681 |
msgid "List Item"
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: includes/ot-functions-docs-page.php:145
|
685 |
msgid ""
|
686 |
"The list Item replaced the old Slider option type. It allows for a great "
|
687 |
"deal of customization. You can add settings to the List Item and those "
|
690 |
"layouts."
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: includes/ot-functions-docs-page.php:147
|
694 |
msgid "Measurement"
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: includes/ot-functions-docs-page.php:148
|
698 |
msgid ""
|
699 |
"The Measurement option type is a mix of input and select fields. The text "
|
700 |
"input excepts a value and the select lets you choose the unit of measurement "
|
703 |
"with the <code>ot_measurement_unit_types</code> filter."
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: includes/ot-functions-docs-page.php:150
|
707 |
msgid ""
|
708 |
"Example filter to add new units to the Measurement option type. Added to "
|
709 |
"<code>functions.php</code>."
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: includes/ot-functions-docs-page.php:163
|
713 |
msgid ""
|
714 |
"Example filter to completely change the units in the Measurement option "
|
715 |
"type. Added to <code>functions.php</code>."
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: includes/ot-functions-docs-page.php:178
|
719 |
+
msgid "Numeric Slider"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: includes/ot-functions-docs-page.php:179
|
723 |
+
msgid ""
|
724 |
+
"The Numeric Slider option type displays a jQuery UI slider. It will return a "
|
725 |
+
"single numerical value for use in a custom function or loop."
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
+
#: includes/ot-functions-docs-page.php:181
|
729 |
msgid "Page Select"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: includes/ot-functions-docs-page.php:182
|
733 |
msgid ""
|
734 |
"The Page Select option type displays a list of page IDs. It will return a "
|
735 |
"single page ID for use in a custom function or loop."
|
736 |
msgstr ""
|
737 |
|
738 |
+
#: includes/ot-functions-docs-page.php:184
|
739 |
msgid "Page Checkbox"
|
740 |
msgstr ""
|
741 |
|
742 |
+
#: includes/ot-functions-docs-page.php:185
|
743 |
msgid ""
|
744 |
"The Page Select option type displays a list of page IDs. It allows the user "
|
745 |
"to check multiple page IDs for use in a custom function or loop."
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: includes/ot-functions-docs-page.php:187
|
749 |
msgid "Post Select"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: includes/ot-functions-docs-page.php:188
|
753 |
msgid ""
|
754 |
"The Post Select option type displays a list of post IDs. It will return a "
|
755 |
"single post ID for use in a custom function or loop."
|
756 |
msgstr ""
|
757 |
|
758 |
+
#: includes/ot-functions-docs-page.php:190
|
759 |
msgid "Post Checkbox"
|
760 |
msgstr ""
|
761 |
|
762 |
+
#: includes/ot-functions-docs-page.php:191
|
763 |
msgid ""
|
764 |
"The Post Select option type displays a list of post IDs. It allows the user "
|
765 |
"to check multiple post IDs for use in a custom function or loop."
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/ot-functions-docs-page.php:193
|
769 |
msgid "Radio"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: includes/ot-functions-docs-page.php:194
|
773 |
msgid ""
|
774 |
"The Radio option type could ask a question. For example, \"Do you want to "
|
775 |
"activate the custom navigation?\" could require a yes or no answer with a "
|
778 |
"of code."
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: includes/ot-functions-docs-page.php:196
|
782 |
msgid "Radio Image"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: includes/ot-functions-docs-page.php:197
|
786 |
msgid ""
|
787 |
"the Radio Images option type is primarily used for layouts. However, you can "
|
788 |
"filter the image list using <code>ot_radio_images</code>. As well, you can "
|
789 |
"add your own custom images using the choices array."
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: includes/ot-functions-docs-page.php:199
|
793 |
msgid ""
|
794 |
"This example executes the <code>ot_radio_images</code> filter on layout "
|
795 |
"images attached to the <code>my_radio_images</code> field. Added to "
|
796 |
"<code>functions.php</code>."
|
797 |
msgstr ""
|
798 |
|
799 |
+
#: includes/ot-functions-docs-page.php:223
|
800 |
msgid "Select"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: includes/ot-functions-docs-page.php:224
|
804 |
msgid ""
|
805 |
"The Select option type is used to list anything you want that would be "
|
806 |
"chosen from a select list."
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: includes/ot-functions-docs-page.php:226
|
810 |
+
msgid "Sidebar Select"
|
811 |
+
msgstr ""
|
812 |
+
|
813 |
+
#: includes/ot-functions-docs-page.php:227
|
814 |
+
msgid ""
|
815 |
+
"This option type makes it possible for users to select a WordPress "
|
816 |
+
"registered sidebar to use on a specific area. By using the two provided "
|
817 |
+
"filters, <code>ot_recognized_sidebars</code>, and "
|
818 |
+
"<code>ot_recognized_sidebars_{$field_id}</code> we can be selective about "
|
819 |
+
"which sidebars are available on a specific content area."
|
820 |
+
msgstr ""
|
821 |
+
|
822 |
+
#: includes/ot-functions-docs-page.php:228
|
823 |
+
msgid ""
|
824 |
+
"For example, if we create a WordPress theme that provides the ability to "
|
825 |
+
"change the Blog Sidebar and we don't want to have the footer sidebars "
|
826 |
+
"available on this area, we can unset those sidebars either manually or by "
|
827 |
+
"using a regular expression if we have a common name like <code>footer-"
|
828 |
+
"sidebar-$i</code>."
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#: includes/ot-functions-docs-page.php:230
|
832 |
msgid "Slider"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: includes/ot-functions-docs-page.php:231
|
836 |
msgid ""
|
837 |
"The Slider option type is technically deprecated. Use the List Item option "
|
838 |
"type instead, as it's infinitely more customizable. Typical use is for "
|
839 |
"creating sliding image content."
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/ot-functions-docs-page.php:233
|
843 |
msgid "Tag Checkbox"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: includes/ot-functions-docs-page.php:234
|
847 |
msgid ""
|
848 |
"The Tag Checkbox option type displays a list of tag IDs. It allows the user "
|
849 |
"to check multiple tag IDs and will return that value as an array for use in "
|
850 |
"a custom function or loop."
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: includes/ot-functions-docs-page.php:236
|
854 |
msgid "Tag Select"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: includes/ot-functions-docs-page.php:237
|
858 |
msgid ""
|
859 |
"The Tag Select option type displays a list of tag IDs. It allows the user to "
|
860 |
"select only one tag ID and will return that value for use in a custom "
|
861 |
"function or loop."
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: includes/ot-functions-docs-page.php:239
|
865 |
msgid "Taxonomy Checkbox"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: includes/ot-functions-docs-page.php:240
|
869 |
msgid ""
|
870 |
"The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows "
|
871 |
"the user to check multiple taxonomy IDs and will return that value as an "
|
872 |
"array for use in a custom function or loop."
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: includes/ot-functions-docs-page.php:242
|
876 |
msgid "Taxonomy Select"
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: includes/ot-functions-docs-page.php:243
|
880 |
msgid ""
|
881 |
"The Taxonomy Select option type displays a list of taxonomy IDs. It allows "
|
882 |
"the user to select only one taxonomy ID and will return that value for use "
|
883 |
"in a custom function or loop."
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: includes/ot-functions-docs-page.php:245
|
887 |
msgid "Text (Input)"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: includes/ot-functions-docs-page.php:246
|
891 |
msgid ""
|
892 |
"The Text option type would be used to save a string value. For example, a "
|
893 |
"link to feedburner, your Twitter username, or Google Analytics ID are all "
|
895 |
"character length."
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: includes/ot-functions-docs-page.php:248
|
899 |
msgid "Textarea"
|
900 |
msgstr ""
|
901 |
|
902 |
+
#: includes/ot-functions-docs-page.php:249
|
903 |
msgid ""
|
904 |
"The Textarea option type is a large string value used for custom code or "
|
905 |
"text in the theme. The new Textarea has a WYSIWYG editor that can be "
|
908 |
"<code>quicktags</code>."
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: includes/ot-functions-docs-page.php:251
|
912 |
msgid ""
|
913 |
"Example filters to alter the Textarea option type. Added to <code>functions."
|
914 |
"php</code>."
|
915 |
msgstr ""
|
916 |
|
917 |
+
#: includes/ot-functions-docs-page.php:253
|
918 |
msgid ""
|
919 |
"This example keeps WordPress from executing the <code>wpautop</code> filter "
|
920 |
"on the line breaks. The default is <code>true</code> which means it wraps "
|
921 |
"line breaks with an HTML <code>p</code> tag."
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: includes/ot-functions-docs-page.php:266
|
925 |
msgid ""
|
926 |
"This example keeps WordPress from executing the <code>media_buttons</code> "
|
927 |
"filter on the textarea WYSIWYG. The default is <code>true</code> which means "
|
928 |
"show the buttons."
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: includes/ot-functions-docs-page.php:279
|
932 |
msgid ""
|
933 |
"This example keeps WordPress from executing the <code>tinymce</code> filter "
|
934 |
"on the textarea WYSIWYG. The default is <code>true</code> which means show "
|
935 |
"the tinymce."
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: includes/ot-functions-docs-page.php:292
|
939 |
msgid ""
|
940 |
"This example alters the <code>quicktags</code> filter on the textarea "
|
941 |
"WYSIWYG. The default is <code>array( 'buttons' => 'strong,em,link,block,del,"
|
943 |
"quicktags. It also means you can filter in your own custom quicktags."
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: includes/ot-functions-docs-page.php:307
|
947 |
msgid "Textarea Simple"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: includes/ot-functions-docs-page.php:308
|
951 |
msgid ""
|
952 |
"The Textarea Simple option type is a large string value used for custom code "
|
953 |
"or text in the theme. The new Textarea Simple does not have a WYSIWYG "
|
954 |
"editor. But you can still filter on <code>wpautop</code>."
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: includes/ot-functions-docs-page.php:310
|
958 |
msgid ""
|
959 |
"This example tells WordPress to execute the <code>wpautop</code> filter on "
|
960 |
"the line breaks. The default is <code>false</code> which means it does not "
|
962 |
"php</code>."
|
963 |
msgstr ""
|
964 |
|
965 |
+
#: includes/ot-functions-docs-page.php:323
|
966 |
msgid "Textblock"
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: includes/ot-functions-docs-page.php:324
|
970 |
msgid ""
|
971 |
"The Textblock option type is used only on the Theme Option page. It will "
|
972 |
"allow you to create & display HTML on your Theme Options page but has no "
|
976 |
"value."
|
977 |
msgstr ""
|
978 |
|
979 |
+
#: includes/ot-functions-docs-page.php:326
|
980 |
msgid "Textblock Titled"
|
981 |
msgstr ""
|
982 |
|
983 |
+
#: includes/ot-functions-docs-page.php:327
|
984 |
msgid ""
|
985 |
"The Textblock Titled option type is used only on the Theme Option page. It "
|
986 |
"will allow you to create & display HTML on your Theme Options page and has a "
|
990 |
"value."
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: includes/ot-functions-docs-page.php:329
|
994 |
msgid "Typography"
|
995 |
msgstr ""
|
996 |
|
997 |
+
#: includes/ot-functions-docs-page.php:330
|
998 |
msgid ""
|
999 |
"The Typography option type is for adding typographic styles to your theme "
|
1000 |
"either dynamically via the CSS option type below or manually with "
|
1008 |
"Google Fonts to create custom font stacks."
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: includes/ot-functions-docs-page.php:332
|
1012 |
msgid ""
|
1013 |
"This example would filter <code>ot_recognized_font_families</code> to build "
|
1014 |
"your own font stack. Added to <code>functions.php</code>."
|
1015 |
msgstr ""
|
1016 |
|
1017 |
+
#: includes/ot-functions-docs-page.php:349
|
1018 |
msgid "Upload"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
+
#: includes/ot-functions-docs-page.php:350
|
1022 |
msgid ""
|
1023 |
"The Upload option type is used to upload any WordPress supported media. "
|
1024 |
"After uploading, users are required to press the \"Send to OptionTree\" "
|
1029 |
"change the URIs if necessary."
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: includes/ot-functions-docs-page.php:382
|
1033 |
msgid ""
|
1034 |
"This function returns a value from the \"option_tree\" array of saved values "
|
1035 |
"or the default value supplied. The returned value would be mixed. Meaning it "
|
1036 |
"could be a string, integer, boolean, or array."
|
1037 |
msgstr ""
|
1038 |
|
1039 |
+
#: includes/ot-functions-docs-page.php:384
|
1040 |
+
#: includes/ot-functions-docs-page.php:434
|
1041 |
msgid "Usage"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: includes/ot-functions-docs-page.php:388
|
1045 |
+
#: includes/ot-functions-docs-page.php:438
|
1046 |
msgid "Parameters"
|
1047 |
msgstr ""
|
1048 |
|
1049 |
+
#: includes/ot-functions-docs-page.php:392
|
1050 |
+
#: includes/ot-functions-docs-page.php:396
|
1051 |
+
#: includes/ot-functions-docs-page.php:442
|
1052 |
msgid "string"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: includes/ot-functions-docs-page.php:392
|
1056 |
+
#: includes/ot-functions-docs-page.php:442
|
1057 |
msgid "required"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: includes/ot-functions-docs-page.php:392
|
1061 |
msgid "Enter the options unique identifier."
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: includes/ot-functions-docs-page.php:392
|
1065 |
+
#: includes/ot-functions-docs-page.php:442
|
1066 |
msgid "Default:"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
+
#: includes/ot-functions-docs-page.php:392
|
1070 |
+
#: includes/ot-functions-docs-page.php:396
|
1071 |
+
#: includes/ot-functions-docs-page.php:442
|
1072 |
+
#: includes/ot-functions-docs-page.php:446
|
1073 |
msgid "None"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: includes/ot-functions-docs-page.php:396
|
1077 |
+
#: includes/ot-functions-docs-page.php:446
|
1078 |
+
#: includes/ot-functions-docs-page.php:450
|
1079 |
+
#: includes/ot-functions-docs-page.php:454
|
1080 |
+
#: includes/ot-functions-docs-page.php:458
|
1081 |
msgid "optional"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: includes/ot-functions-docs-page.php:396
|
1085 |
msgid ""
|
1086 |
"Enter a default return value. This is just incase the request returns null."
|
1087 |
msgstr ""
|
1088 |
|
1089 |
+
#: includes/ot-functions-docs-page.php:396
|
1090 |
+
#: includes/ot-functions-docs-page.php:446
|
1091 |
+
#: includes/ot-functions-docs-page.php:450
|
1092 |
+
#: includes/ot-functions-docs-page.php:454
|
1093 |
+
#: includes/ot-functions-docs-page.php:458
|
1094 |
msgid "Default"
|
1095 |
msgstr ""
|
1096 |
|
1097 |
+
#: includes/ot-functions-docs-page.php:426
|
1098 |
msgid ""
|
1099 |
"This function has been deprecated. That means it has been replaced by a new "
|
1100 |
"function or is no longer supported, and may be removed from future versions. "
|
1101 |
"All code that uses this function should be converted to use its replacement."
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: includes/ot-functions-docs-page.php:428
|
1105 |
msgid "Use"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: includes/ot-functions-docs-page.php:428
|
1109 |
msgid "instead"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: includes/ot-functions-docs-page.php:432
|
1113 |
msgid ""
|
1114 |
"This function returns, or echos if asked, a value from the \"option_tree\" "
|
1115 |
"array of saved values."
|
1116 |
msgstr ""
|
1117 |
|
1118 |
+
#: includes/ot-functions-docs-page.php:442
|
1119 |
msgid "Enter a unique Option Key to get a returned value or array."
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: includes/ot-functions-docs-page.php:446
|
1123 |
msgid "array"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: includes/ot-functions-docs-page.php:446
|
1127 |
msgid "Used to cut down on database queries in template files."
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: includes/ot-functions-docs-page.php:450
|
1131 |
+
#: includes/ot-functions-docs-page.php:454
|
1132 |
msgid "boolean"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
+
#: includes/ot-functions-docs-page.php:450
|
1136 |
msgid "Echo the output."
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: includes/ot-functions-docs-page.php:454
|
1140 |
msgid "Used to indicate the $item_id is an array of values."
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: includes/ot-functions-docs-page.php:458
|
1144 |
msgid "integer"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
+
#: includes/ot-functions-docs-page.php:458
|
1148 |
msgid ""
|
1149 |
"Numeric offset key for the $item_id array, -1 will return all values (an "
|
1150 |
"array starts at 0)."
|
1151 |
msgstr ""
|
1152 |
|
1153 |
+
#: includes/ot-functions-docs-page.php:486
|
1154 |
msgid ""
|
1155 |
"If you're using the plugin version of OptionTree it is highly recommended to "
|
1156 |
"include a <code>function_exists</code> check in your code, as described in "
|
1160 |
"<code>ot_get_option()</code> function available."
|
1161 |
msgstr ""
|
1162 |
|
1163 |
+
#: includes/ot-functions-docs-page.php:488
|
1164 |
msgid "String Examples"
|
1165 |
msgstr ""
|
1166 |
|
1167 |
+
#: includes/ot-functions-docs-page.php:490
|
1168 |
msgid "Returns the value of <code>test_input</code>."
|
1169 |
msgstr ""
|
1170 |
|
1171 |
+
#: includes/ot-functions-docs-page.php:496
|
1172 |
msgid ""
|
1173 |
"Returns the value of <code>test_input</code>, but also has a default value "
|
1174 |
"if it returns empty."
|
1175 |
msgstr ""
|
1176 |
|
1177 |
+
#: includes/ot-functions-docs-page.php:502
|
1178 |
msgid "Array Examples"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
+
#: includes/ot-functions-docs-page.php:504
|
1182 |
msgid ""
|
1183 |
"Assigns the value of <code>navigation_ids</code> to the variable <code>$ids</"
|
1184 |
"code>. It then echos an unordered list of links (navigation) using "
|
1185 |
"<code>wp_list_pages()</code>."
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: includes/ot-functions-docs-page.php:524
|
1189 |
msgid ""
|
1190 |
"The next two examples demonstrate how to use the <strong>Measurement</"
|
1191 |
"strong> option type. The Measurement option type is an array with two key/"
|
1193 |
"unit of measurement."
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: includes/ot-functions-docs-page.php:550
|
1197 |
msgid "This example displays a very basic slider loop."
|
1198 |
msgstr ""
|
1199 |
|
1200 |
+
#: includes/ot-functions-docs-page.php:595
|
1201 |
msgid "It's Super Simple"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: includes/ot-functions-docs-page.php:597
|
1205 |
msgid ""
|
1206 |
"Layouts make your theme awesome! With theme options data that you can save/"
|
1207 |
"import/export you can package themes with different color variations, or "
|
1209 |
"a snapshot of your data as a layout."
|
1210 |
msgstr ""
|
1211 |
|
1212 |
+
#: includes/ot-functions-docs-page.php:599
|
1213 |
msgid ""
|
1214 |
"Once you have created all your different layouts, or theme variations, you "
|
1215 |
"can save them to a separate text file for repackaging with your theme. "
|
1218 |
"previous options data."
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: includes/ot-functions-docs-page.php:601
|
1222 |
msgid ""
|
1223 |
" Adding a layout is ridiculously easy, follow these steps and you'll be on "
|
1224 |
"your way to having a WordPress super theme."
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: includes/ot-functions-docs-page.php:603
|
1228 |
msgid "For Developers"
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: includes/ot-functions-docs-page.php:606
|
1232 |
+
#: includes/ot-functions-docs-page.php:636
|
1233 |
msgid "Creating a Layout"
|
1234 |
msgstr ""
|
1235 |
|
|
|
|
|
1236 |
#: includes/ot-functions-docs-page.php:608
|
1237 |
+
#: includes/ot-functions-docs-page.php:615
|
1238 |
+
#: includes/ot-functions-docs-page.php:621
|
1239 |
msgid "Go to the <code>OptionTre->Settings->Layouts</code> tab."
|
1240 |
msgstr ""
|
1241 |
|
1242 |
+
#: includes/ot-functions-docs-page.php:609
|
1243 |
msgid ""
|
1244 |
"Enter a name for your layout in the text field and hit \"Save Layouts\", "
|
1245 |
"you've created your first layout."
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: includes/ot-functions-docs-page.php:610
|
1249 |
+
#: includes/ot-functions-docs-page.php:640
|
1250 |
msgid "Adding a new layout is as easy as repeating the steps above."
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: includes/ot-functions-docs-page.php:613
|
1254 |
+
#: includes/ot-functions-docs-page.php:643
|
1255 |
msgid "Activating a Layout"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
+
#: includes/ot-functions-docs-page.php:616
|
1259 |
msgid "Click on the activate layout button in the actions list."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: includes/ot-functions-docs-page.php:619
|
1263 |
+
#: includes/ot-functions-docs-page.php:649
|
1264 |
msgid "Deleting a Layout"
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: includes/ot-functions-docs-page.php:622
|
1268 |
msgid "Click on the delete layout button in the actions list."
|
1269 |
msgstr ""
|
1270 |
|
1271 |
+
#: includes/ot-functions-docs-page.php:625
|
1272 |
+
#: includes/ot-functions-docs-page.php:654
|
1273 |
msgid "Edit Layout Data"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
+
#: includes/ot-functions-docs-page.php:627
|
1277 |
+
#: includes/ot-functions-docs-page.php:638
|
1278 |
+
#: includes/ot-functions-docs-page.php:645
|
1279 |
msgid "Go to the <code>Appearance->Theme Options</code> page."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: includes/ot-functions-docs-page.php:628
|
1283 |
+
#: includes/ot-functions-docs-page.php:657
|
1284 |
msgid ""
|
1285 |
"Modify and save your theme options and the layout will be updated "
|
1286 |
"automatically."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: includes/ot-functions-docs-page.php:629
|
1290 |
+
#: includes/ot-functions-docs-page.php:658
|
1291 |
msgid ""
|
1292 |
"Saving theme options data will update the currently active layout, so before "
|
1293 |
"you start saving make sure you want to modify the current layout."
|
1294 |
msgstr ""
|
1295 |
|
1296 |
+
#: includes/ot-functions-docs-page.php:630
|
1297 |
msgid ""
|
1298 |
"If you want to edit a new layout, first create it then save your theme "
|
1299 |
"options."
|
1300 |
msgstr ""
|
1301 |
|
1302 |
+
#: includes/ot-functions-docs-page.php:633
|
1303 |
msgid "End-Users Mode"
|
1304 |
msgstr ""
|
1305 |
|
1306 |
+
#: includes/ot-functions-docs-page.php:639
|
1307 |
msgid ""
|
1308 |
"Enter a name for your layout in the text field and hit \"New Layout\", "
|
1309 |
"you've created your first layout."
|
1310 |
msgstr ""
|
1311 |
|
1312 |
+
#: includes/ot-functions-docs-page.php:646
|
1313 |
msgid ""
|
1314 |
"Choose a layout from the select list and click the \"Activate Layout\" "
|
1315 |
"button."
|
1316 |
msgstr ""
|
1317 |
|
1318 |
+
#: includes/ot-functions-docs-page.php:651
|
1319 |
msgid "End-Users mode does not allow deleting layouts."
|
1320 |
msgstr ""
|
1321 |
|
1322 |
+
#: includes/ot-functions-docs-page.php:656
|
1323 |
msgid "Go to the <code>Appearance->Theme Options</code> tab."
|
1324 |
msgstr ""
|
1325 |
|
1326 |
+
#: includes/ot-functions-docs-page.php:687
|
1327 |
+
#: includes/ot-functions-docs-page.php:769
|
1328 |
msgid "How-to-guide"
|
1329 |
msgstr ""
|
1330 |
|
1331 |
+
#: includes/ot-functions-docs-page.php:689
|
1332 |
msgid ""
|
1333 |
"There are a few simple steps you need to take in order to use OptionTree's "
|
1334 |
"built in Meta Box API. In the code below I'll show you a basic demo of how "
|
1339 |
"can reference."
|
1340 |
msgstr ""
|
1341 |
|
1342 |
+
#: includes/ot-functions-docs-page.php:691
|
1343 |
msgid ""
|
1344 |
"It's important to note that Meta Boxes do not support WYSIWYG editors at "
|
1345 |
"this time and if you set one of your options to Textarea it will "
|
1347 |
"WordPress released this statement regarding the wp_editor() function:"
|
1348 |
msgstr ""
|
1349 |
|
1350 |
+
#: includes/ot-functions-docs-page.php:693
|
1351 |
msgid ""
|
1352 |
"Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. "
|
1353 |
"What this means in practical terms, is that you cannot put it in meta-boxes "
|
1354 |
"that can be dragged and placed elsewhere on the page."
|
1355 |
msgstr ""
|
1356 |
|
1357 |
+
#: includes/ot-functions-docs-page.php:695
|
1358 |
msgid "Create and include your custom meta boxes file."
|
1359 |
msgstr ""
|
1360 |
|
1361 |
+
#: includes/ot-functions-docs-page.php:697
|
1362 |
msgid ""
|
1363 |
"Create a file and name it anything you want, maybe <code>meta-boxes.php</"
|
1364 |
"code>."
|
1365 |
msgstr ""
|
1366 |
|
1367 |
+
#: includes/ot-functions-docs-page.php:698
|
1368 |
msgid ""
|
1369 |
"As well, you'll probably want to create a directory named <code>includes</"
|
1370 |
"code> to put your <code>meta-boxes.php</code> into which will help keep you "
|
1371 |
"file structure nice and tidy."
|
1372 |
msgstr ""
|
1373 |
|
1374 |
+
#: includes/ot-functions-docs-page.php:699
|
1375 |
+
#: includes/ot-functions-docs-page.php:810
|
1376 |
msgid "Add the following code to your <code>functions.php</code>."
|
1377 |
msgstr ""
|
1378 |
|
1379 |
+
#: includes/ot-functions-docs-page.php:709
|
1380 |
msgid ""
|
1381 |
"Add a variation of the following code to your <code>meta-boxes.php</code>. "
|
1382 |
"You'll obviously need to fill it in with all your custom array values. It's "
|
1385 |
"before OptionTree was loaded the sky would fall on your head."
|
1386 |
msgstr ""
|
1387 |
|
1388 |
+
#: includes/ot-functions-docs-page.php:771
|
1389 |
msgid ""
|
1390 |
"There are a few simple steps you need to take in order to use OptionTree as "
|
1391 |
"a theme included module. In the code below I'll show you a basic demo of how "
|
1396 |
"contains a file named <code>demo-theme-options.php</code> you can reference."
|
1397 |
msgstr ""
|
1398 |
|
1399 |
+
#: includes/ot-functions-docs-page.php:773
|
1400 |
msgid "Step 1: Include the plugin & turn on theme mode."
|
1401 |
msgstr ""
|
1402 |
|
1403 |
+
#: includes/ot-functions-docs-page.php:775
|
1404 |
msgid ""
|
1405 |
"Download the latest version of <a href=\"http://wordpress.org/extend/plugins/"
|
1406 |
"option-tree/\" rel=\"nofollow\" target=\"_blank\">OptionTree</a>."
|
1407 |
msgstr ""
|
1408 |
|
1409 |
+
#: includes/ot-functions-docs-page.php:776
|
1410 |
msgid "Unpack the ZIP archive."
|
1411 |
msgstr ""
|
1412 |
|
1413 |
+
#: includes/ot-functions-docs-page.php:777
|
1414 |
msgid ""
|
1415 |
"Put the <code>option-tree</code> directory in the root of your theme. For "
|
1416 |
"example, the server path would be <code>/wp-content/themes/theme-name/option-"
|
1417 |
"tree/</code>."
|
1418 |
msgstr ""
|
1419 |
|
1420 |
+
#: includes/ot-functions-docs-page.php:778
|
1421 |
msgid ""
|
1422 |
"Add the following code to the beginning of your <code>functions.php</code>."
|
1423 |
msgstr ""
|
1424 |
|
1425 |
+
#: includes/ot-functions-docs-page.php:804
|
1426 |
msgid ""
|
1427 |
"It's that simple! You now have OptionTree built into your theme and anytime "
|
1428 |
"there's an update to the plugin you just replace the old version and you're "
|
1429 |
"good to go.."
|
1430 |
msgstr ""
|
1431 |
|
1432 |
+
#: includes/ot-functions-docs-page.php:806
|
1433 |
msgid "Step 2: Create Theme Options without using the UI Builder."
|
1434 |
msgstr ""
|
1435 |
|
1436 |
+
#: includes/ot-functions-docs-page.php:808
|
1437 |
msgid ""
|
1438 |
"Create a file and name it anything you want, maybe <code>theme-options.php</"
|
1439 |
"code>, or use the built in file export to create it for you. Remember, you "
|
1440 |
"should always check the file for errors before including it in your theme."
|
1441 |
msgstr ""
|
1442 |
|
1443 |
+
#: includes/ot-functions-docs-page.php:809
|
1444 |
msgid ""
|
1445 |
"As well, you'll probably want to create a directory named <code>includes</"
|
1446 |
"code> to put your <code>theme-options.php</code> into which will help keep "
|
1447 |
"you file structure nice and tidy."
|
1448 |
msgstr ""
|
1449 |
|
1450 |
+
#: includes/ot-functions-docs-page.php:820
|
1451 |
msgid ""
|
1452 |
"Add a variation of the following code to your <code>theme-options.php</"
|
1453 |
"code>. You'll obviously need to fill it in with all your custom array values "
|
1454 |
"for contextual help (optional), sections (required), and settings (required)."
|
1455 |
msgstr ""
|
1456 |
|
1457 |
+
#: includes/ot-functions-docs-page.php:823
|
1458 |
msgid ""
|
1459 |
"The code below is a boilerplate to get your started. For a full list of the "
|
1460 |
"available option types click the \"Option Types\" tab above. Also a quick "
|
1461 |
"note, you don't need to put OptionTree in theme mode to manually create "
|
1462 |
"options but you will want to hide the docs and settings as each time you "
|
1463 |
+
"load the admin area the settings be written over with the code below if "
|
1464 |
"they've changed in any way. However, this ensures your settings do not get "
|
1465 |
"tampered with by the end-user."
|
1466 |
msgstr ""
|
1482 |
msgstr ""
|
1483 |
|
1484 |
#: includes/ot-functions-option-types.php:140
|
1485 |
+
#: includes/ot-functions-option-types.php:1859
|
1486 |
msgid "Add Media"
|
1487 |
msgstr ""
|
1488 |
|
1489 |
+
#: includes/ot-functions-option-types.php:208
|
1490 |
+
#: includes/ot-functions-option-types.php:262
|
1491 |
msgid "No Categories Found"
|
1492 |
msgstr ""
|
1493 |
|
1494 |
+
#: includes/ot-functions-option-types.php:257
|
1495 |
+
#: includes/ot-functions-option-types.php:515
|
1496 |
+
#: includes/ot-functions-option-types.php:804
|
1497 |
+
#: includes/ot-functions-option-types.php:986
|
1498 |
+
#: includes/ot-functions-option-types.php:1315
|
1499 |
+
#: includes/ot-functions-option-types.php:1429
|
1500 |
msgid "Choose One"
|
1501 |
msgstr ""
|
1502 |
|
1503 |
+
#: includes/ot-functions-option-types.php:463
|
1504 |
+
#: includes/ot-functions-option-types.php:521
|
1505 |
+
#: includes/ot-functions-option-types.php:937
|
1506 |
+
#: includes/ot-functions-option-types.php:992
|
1507 |
msgid "No Posts Found"
|
1508 |
msgstr ""
|
1509 |
|
1510 |
+
#: includes/ot-functions-option-types.php:592
|
1511 |
+
#: includes/ot-functions-option-types.php:881
|
1512 |
msgid "Add New"
|
1513 |
msgstr ""
|
1514 |
|
1515 |
+
#: includes/ot-functions-option-types.php:595
|
1516 |
+
#: includes/ot-functions-option-types.php:884
|
1517 |
msgid "You can re-order with drag & drop, the order will update after saving."
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: includes/ot-functions-option-types.php:755
|
1521 |
+
#: includes/ot-functions-option-types.php:810
|
1522 |
msgid "No Pages Found"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
+
#: includes/ot-functions-option-types.php:1206
|
1526 |
+
msgid "Choose Sidebar"
|
1527 |
+
msgstr ""
|
1528 |
+
|
1529 |
+
#: includes/ot-functions-option-types.php:1211
|
1530 |
+
msgid "No Sidebars"
|
1531 |
+
msgstr ""
|
1532 |
+
|
1533 |
+
#: includes/ot-functions-option-types.php:1266
|
1534 |
+
#: includes/ot-functions-option-types.php:1320
|
1535 |
msgid "No Tags Found"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
+
#: includes/ot-functions-option-types.php:1377
|
1539 |
+
#: includes/ot-functions-option-types.php:1434
|
1540 |
msgid "No Taxonomies Found"
|
1541 |
msgstr ""
|
1542 |
|
1588 |
msgid "Add Section"
|
1589 |
msgstr ""
|
1590 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1591 |
#: includes/ot-functions-settings-page.php:99
|
1592 |
msgid "Contextual Help"
|
1593 |
msgstr ""
|
1751 |
#: includes/ot-settings-api.php:353
|
1752 |
msgid "Reset Options"
|
1753 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
license.txt
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
635 |
+
Copyright (C) <year> <name of author>
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
<program> Copyright (C) <year> <name of author>
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
ot-loader.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
* Plugin Name: OptionTree
|
4 |
* Plugin URI: http://wp.envato.com
|
5 |
* Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
6 |
-
* Version: 2.
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
-
* License:
|
10 |
*/
|
11 |
|
12 |
/**
|
@@ -14,7 +14,7 @@
|
|
14 |
*
|
15 |
* @package OptionTree
|
16 |
* @author Derek Herman <derek@valendesigns.com>
|
17 |
-
* @copyright Copyright (c)
|
18 |
*/
|
19 |
if ( ! class_exists( 'OT_Loader' ) ) {
|
20 |
|
@@ -60,7 +60,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
60 |
/**
|
61 |
* Current Version number.
|
62 |
*/
|
63 |
-
define( 'OT_VERSION', '2.
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
@@ -108,6 +108,36 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
108 |
*/
|
109 |
define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) );
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
/**
|
112 |
* For developers: Show New Layout.
|
113 |
*
|
@@ -118,6 +148,25 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
118 |
*/
|
119 |
define( 'OT_SHOW_NEW_LAYOUT', apply_filters( 'ot_show_new_layout', true ) );
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
/**
|
122 |
* For developers: Meta Boxes.
|
123 |
*
|
@@ -150,6 +199,17 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
150 |
}
|
151 |
}
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
/**
|
154 |
* Relative path to the languages directory.
|
155 |
*
|
@@ -179,8 +239,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
179 |
'ot-functions-admin',
|
180 |
'ot-functions-option-types',
|
181 |
'ot-functions-compat',
|
182 |
-
'ot-settings-api'
|
183 |
-
'ot-ui-theme-options'
|
184 |
);
|
185 |
|
186 |
/* include the meta box api */
|
@@ -192,7 +251,6 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
192 |
if ( OT_SHOW_PAGES == true ) {
|
193 |
$files[] = 'ot-functions-settings-page';
|
194 |
$files[] = 'ot-functions-docs-page';
|
195 |
-
$files[] = 'ot-ui-admin';
|
196 |
}
|
197 |
|
198 |
/* require the files */
|
@@ -200,6 +258,14 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
200 |
$this->load_file( OT_DIR . "includes/{$file}.php" );
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
|
205 |
/**
|
@@ -239,9 +305,9 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
239 |
|
240 |
/* load the text domain */
|
241 |
if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) {
|
242 |
-
add_action( 'plugins_loaded', array(
|
243 |
} else {
|
244 |
-
add_action( 'after_setup_theme', array(
|
245 |
}
|
246 |
|
247 |
/* load the Meta Box assets */
|
@@ -256,7 +322,10 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
256 |
add_action( 'admin_print_styles-post.php', 'ot_admin_styles', 11 );
|
257 |
|
258 |
}
|
259 |
-
|
|
|
|
|
|
|
260 |
/* prepares the after save do_action */
|
261 |
add_action( 'admin_init', 'ot_after_theme_options_save', 1 );
|
262 |
|
@@ -282,34 +351,37 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
282 |
add_action( 'admin_init', 'ot_create_media_post', 8 );
|
283 |
|
284 |
/* global CSS */
|
285 |
-
add_action( 'admin_head', array(
|
286 |
|
287 |
/* dynamic front-end CSS */
|
288 |
-
add_action( 'wp_enqueue_scripts', 'ot_load_dynamic_css' );
|
289 |
|
290 |
/* insert theme CSS dynamically */
|
291 |
add_action( 'ot_after_theme_options_save', 'ot_save_css' );
|
292 |
|
293 |
/* AJAX call to create a new section */
|
294 |
-
add_action( 'wp_ajax_add_section', array(
|
295 |
|
296 |
/* AJAX call to create a new setting */
|
297 |
-
add_action( 'wp_ajax_add_setting', array(
|
298 |
|
299 |
/* AJAX call to create a new contextual help */
|
300 |
-
add_action( 'wp_ajax_add_the_contextual_help', array(
|
301 |
|
302 |
/* AJAX call to create a new choice */
|
303 |
-
add_action( 'wp_ajax_add_choice', array(
|
304 |
|
305 |
/* AJAX call to create a new list item setting */
|
306 |
-
add_action( 'wp_ajax_add_list_item_setting', array(
|
307 |
|
308 |
/* AJAX call to create a new layout */
|
309 |
-
add_action( 'wp_ajax_add_layout', array(
|
310 |
|
311 |
/* AJAX call to create a new list item */
|
312 |
-
add_action( 'wp_ajax_add_list_item', array(
|
|
|
|
|
|
|
313 |
|
314 |
}
|
315 |
|
@@ -410,6 +482,29 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
410 |
die();
|
411 |
}
|
412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
}
|
414 |
|
415 |
/**
|
3 |
* Plugin Name: OptionTree
|
4 |
* Plugin URI: http://wp.envato.com
|
5 |
* Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
6 |
+
* Version: 2.1
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
+
* License: GPLv3
|
10 |
*/
|
11 |
|
12 |
/**
|
14 |
*
|
15 |
* @package OptionTree
|
16 |
* @author Derek Herman <derek@valendesigns.com>
|
17 |
+
* @copyright Copyright (c) 2013, Derek Herman
|
18 |
*/
|
19 |
if ( ! class_exists( 'OT_Loader' ) ) {
|
20 |
|
60 |
/**
|
61 |
* Current Version number.
|
62 |
*/
|
63 |
+
define( 'OT_VERSION', '2.1' );
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
108 |
*/
|
109 |
define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) );
|
110 |
|
111 |
+
/**
|
112 |
+
* For developers: Show Theme Options UI Builder
|
113 |
+
*
|
114 |
+
* Run a filter and set to false if you want to hide the
|
115 |
+
* Theme Options UI page in the admin area of WordPress.
|
116 |
+
*
|
117 |
+
* @since 2.1
|
118 |
+
*/
|
119 |
+
define( 'OT_SHOW_OPTIONS_UI', apply_filters( 'ot_show_options_ui', true ) );
|
120 |
+
|
121 |
+
/**
|
122 |
+
* For developers: Hide Settings Import
|
123 |
+
*
|
124 |
+
* Run a filter and set to false if you want to hide the
|
125 |
+
* Settings Import options on the Import page.
|
126 |
+
*
|
127 |
+
* @since 2.1
|
128 |
+
*/
|
129 |
+
define( 'OT_SHOW_SETTINGS_IMPORT', apply_filters( 'ot_show_settings_import', true ) );
|
130 |
+
|
131 |
+
/**
|
132 |
+
* For developers: Hide Settings Export
|
133 |
+
*
|
134 |
+
* Run a filter and set to false if you want to hide the
|
135 |
+
* Settings Import options on the Import page.
|
136 |
+
*
|
137 |
+
* @since 2.1
|
138 |
+
*/
|
139 |
+
define( 'OT_SHOW_SETTINGS_EXPORT', apply_filters( 'ot_show_settings_export', false ) );
|
140 |
+
|
141 |
/**
|
142 |
* For developers: Show New Layout.
|
143 |
*
|
148 |
*/
|
149 |
define( 'OT_SHOW_NEW_LAYOUT', apply_filters( 'ot_show_new_layout', true ) );
|
150 |
|
151 |
+
/**
|
152 |
+
* For developers: Show Documentation
|
153 |
+
*
|
154 |
+
* Run a filter and set to false if you want to hide the Documentation.
|
155 |
+
*
|
156 |
+
* @since 2.1
|
157 |
+
*/
|
158 |
+
define( 'OT_SHOW_DOCS', apply_filters( 'ot_show_docs', true ) );
|
159 |
+
|
160 |
+
/**
|
161 |
+
* For developers: Custom Theme Option page
|
162 |
+
*
|
163 |
+
* Run a filter and set to false if you want to hide the OptionTree
|
164 |
+
* Theme Option page and build your own.
|
165 |
+
*
|
166 |
+
* @since 2.1
|
167 |
+
*/
|
168 |
+
define( 'OT_USE_THEME_OPTIONS', apply_filters( 'ot_use_theme_options', true ) );
|
169 |
+
|
170 |
/**
|
171 |
* For developers: Meta Boxes.
|
172 |
*
|
199 |
}
|
200 |
}
|
201 |
|
202 |
+
/**
|
203 |
+
* Template directory URI for the current theme.
|
204 |
+
*
|
205 |
+
* @since 2.1
|
206 |
+
*/
|
207 |
+
if ( true == OT_CHILD_THEME_MODE ) {
|
208 |
+
define( 'OT_THEME_URL', get_stylesheet_directory_uri() );
|
209 |
+
} else {
|
210 |
+
define( 'OT_THEME_URL', get_template_directory_uri() );
|
211 |
+
}
|
212 |
+
|
213 |
/**
|
214 |
* Relative path to the languages directory.
|
215 |
*
|
239 |
'ot-functions-admin',
|
240 |
'ot-functions-option-types',
|
241 |
'ot-functions-compat',
|
242 |
+
'ot-settings-api'
|
|
|
243 |
);
|
244 |
|
245 |
/* include the meta box api */
|
251 |
if ( OT_SHOW_PAGES == true ) {
|
252 |
$files[] = 'ot-functions-settings-page';
|
253 |
$files[] = 'ot-functions-docs-page';
|
|
|
254 |
}
|
255 |
|
256 |
/* require the files */
|
258 |
$this->load_file( OT_DIR . "includes/{$file}.php" );
|
259 |
}
|
260 |
|
261 |
+
/* Registers the Theme Option page */
|
262 |
+
add_action( 'init', 'ot_register_theme_options_page' );
|
263 |
+
|
264 |
+
/* Registers the Settings page */
|
265 |
+
if ( OT_SHOW_PAGES == true ) {
|
266 |
+
add_action( 'init', 'ot_register_settings_page' );
|
267 |
+
}
|
268 |
+
|
269 |
}
|
270 |
|
271 |
/**
|
305 |
|
306 |
/* load the text domain */
|
307 |
if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) {
|
308 |
+
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
309 |
} else {
|
310 |
+
add_action( 'after_setup_theme', array( $this, 'load_textdomain' ) );
|
311 |
}
|
312 |
|
313 |
/* load the Meta Box assets */
|
322 |
add_action( 'admin_print_styles-post.php', 'ot_admin_styles', 11 );
|
323 |
|
324 |
}
|
325 |
+
|
326 |
+
/* Adds the Theme Option page to the admin bar */
|
327 |
+
add_action( 'admin_bar_menu', 'ot_register_theme_options_admin_bar_menu', 999 );
|
328 |
+
|
329 |
/* prepares the after save do_action */
|
330 |
add_action( 'admin_init', 'ot_after_theme_options_save', 1 );
|
331 |
|
351 |
add_action( 'admin_init', 'ot_create_media_post', 8 );
|
352 |
|
353 |
/* global CSS */
|
354 |
+
add_action( 'admin_head', array( $this, 'global_admin_css' ) );
|
355 |
|
356 |
/* dynamic front-end CSS */
|
357 |
+
add_action( 'wp_enqueue_scripts', 'ot_load_dynamic_css', 999 );
|
358 |
|
359 |
/* insert theme CSS dynamically */
|
360 |
add_action( 'ot_after_theme_options_save', 'ot_save_css' );
|
361 |
|
362 |
/* AJAX call to create a new section */
|
363 |
+
add_action( 'wp_ajax_add_section', array( $this, 'add_section' ) );
|
364 |
|
365 |
/* AJAX call to create a new setting */
|
366 |
+
add_action( 'wp_ajax_add_setting', array( $this, 'add_setting' ) );
|
367 |
|
368 |
/* AJAX call to create a new contextual help */
|
369 |
+
add_action( 'wp_ajax_add_the_contextual_help', array( $this, 'add_the_contextual_help' ) );
|
370 |
|
371 |
/* AJAX call to create a new choice */
|
372 |
+
add_action( 'wp_ajax_add_choice', array( $this, 'add_choice' ) );
|
373 |
|
374 |
/* AJAX call to create a new list item setting */
|
375 |
+
add_action( 'wp_ajax_add_list_item_setting', array( $this, 'add_list_item_setting' ) );
|
376 |
|
377 |
/* AJAX call to create a new layout */
|
378 |
+
add_action( 'wp_ajax_add_layout', array( $this, 'add_layout' ) );
|
379 |
|
380 |
/* AJAX call to create a new list item */
|
381 |
+
add_action( 'wp_ajax_add_list_item', array( $this, 'add_list_item' ) );
|
382 |
+
|
383 |
+
/* Modify the media uploader button */
|
384 |
+
add_filter( 'gettext', array( $this, 'change_image_button' ), 10, 3 );
|
385 |
|
386 |
}
|
387 |
|
482 |
die();
|
483 |
}
|
484 |
|
485 |
+
/**
|
486 |
+
* Filters the media uploader button.
|
487 |
+
*
|
488 |
+
* @return string
|
489 |
+
*
|
490 |
+
* @access public
|
491 |
+
* @since 2.1
|
492 |
+
*/
|
493 |
+
public function change_image_button( $translation, $text, $domain ) {
|
494 |
+
global $pagenow;
|
495 |
+
|
496 |
+
if ( $pagenow == 'themes.php' && 'default' == $domain && 'Insert into post' == $text ) {
|
497 |
+
|
498 |
+
// Once is enough.
|
499 |
+
remove_filter( 'gettext', array( $this, 'ot_change_image_button' ) );
|
500 |
+
return 'Send to OptionTree';
|
501 |
+
|
502 |
+
}
|
503 |
+
|
504 |
+
return $translation;
|
505 |
+
|
506 |
+
}
|
507 |
+
|
508 |
}
|
509 |
|
510 |
/**
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: valendesigns
|
|
3 |
Donate link: http://bit.ly/NuXI3T
|
4 |
Tags: admin, theme options, meta boxes, options, admin interface, ajax
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.
|
8 |
-
License:
|
9 |
|
10 |
Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
11 |
|
@@ -41,6 +41,35 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
= 2.0.16 =
|
45 |
* Fixed an urgent JS regression bug that caused the upload option type to break. Code contributed by @anonumus via github.
|
46 |
* Added 'font-color' to the typography filter.
|
@@ -239,6 +268,9 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
239 |
|
240 |
== Upgrade Notice ==
|
241 |
|
|
|
|
|
|
|
242 |
= 2.0.16 =
|
243 |
There was an issue with the upload option type's JavaScript not allowing anything other than images to be sent to the editor. This urgent issue is now fixed and why this version is light on changes.
|
244 |
|
3 |
Donate link: http://bit.ly/NuXI3T
|
4 |
Tags: admin, theme options, meta boxes, options, admin interface, ajax
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 3.6
|
7 |
+
Stable tag: 2.1
|
8 |
+
License: GPLv3
|
9 |
|
10 |
Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
11 |
|
41 |
|
42 |
== Changelog ==
|
43 |
|
44 |
+
= 2.1 =
|
45 |
+
* Added support for WordPress 3.6.
|
46 |
+
* UI got a small but needed update, and is now more inline with WordPress.
|
47 |
+
* Added WPML support for the Text, Textarea, and Textarea Simple option types, and within list items; even after drag & drop.
|
48 |
+
* Upload now uses the media uploader introduced in WordPress 3.5. Contributors via github @htvu, @maimairel, and @valendesigns.
|
49 |
+
* Added a horizontal Numeric Slider option type. Contributors via github @maimairel and @valendesigns.
|
50 |
+
* Added a Sidebar Select option type. Contributors via github @maimairel.
|
51 |
+
* Removed additional deprecated assigning of return value in PHP.
|
52 |
+
* Fix missing "Send to OptionTree" button in CPT. Contributors via github @jomaddim.
|
53 |
+
* Fix option types that use $count instead of an array key to select the option value.
|
54 |
+
* Created functions to register the Theme Options & Settings pages, and with better filtering.
|
55 |
+
* Added relative path support for Radio Image choices.
|
56 |
+
* Added dynamic replacement of 'OT_URL' & 'OT_THEME_URL' in the Radio Image source path.
|
57 |
+
* Make '0' possible as a field value. Validate for empty strings instead of empty(). Contributors via github @maimairel.
|
58 |
+
* The 'ot_theme_options_capability' filter is now working for different capabilities like editor.
|
59 |
+
* The 'ot_display_by_type' filter is now being assigned to a value.
|
60 |
+
* Added filter 'ot_show_options_ui' which allows you to hide the Theme Options UI Builder.
|
61 |
+
* Added filter 'ot_show_settings_import' which allows you to hide the Settings Import options on the Import page.
|
62 |
+
* Added filter 'ot_show_settings_export' which allows you to hide the Settings Export options on the Export page.
|
63 |
+
* Added filter 'ot_show_docs' which allows you to hide the Documentation.
|
64 |
+
* Added filter 'ot_use_theme_options' which allows you to hide the OptionTree Theme Option page (not recommended for beginners).
|
65 |
+
* Added filter 'ot_list_item_description' which allows you to change the default list item description text.
|
66 |
+
* Added filter 'ot_type_custom_post_type_checkbox_query' which allows you to filter the Custom Post Type Checkbox option type WP_Query array.
|
67 |
+
* Added filter 'ot_type_custom_post_type_select_query' which allows you to filter the Custom Post Type Select option type WP_Query array.
|
68 |
+
* Added filter 'ot_type_page_checkbox_query' which allows you to filter the Page Checkbox option type WP_Query array.
|
69 |
+
* Added filter 'ot_type_page_select_query' which allows you to filter the Page Select option type WP_Query array.
|
70 |
+
* Added filter 'ot_type_post_checkbox_query' which allows you to filter the Post Checkbox option type WP_Query array.
|
71 |
+
* Added filter 'ot_type_post_select_query' which allows you to filter the Post Select option type WP_Query array.
|
72 |
+
|
73 |
= 2.0.16 =
|
74 |
* Fixed an urgent JS regression bug that caused the upload option type to break. Code contributed by @anonumus via github.
|
75 |
* Added 'font-color' to the typography filter.
|
268 |
|
269 |
== Upgrade Notice ==
|
270 |
|
271 |
+
= 2.1 =
|
272 |
+
If you're not the developer of this theme, please ask them to test compatibility with version 2.1 before upgrading. If you are the developer, I urge you to do the same in a controlled environment.
|
273 |
+
|
274 |
= 2.0.16 =
|
275 |
There was an issue with the upload option type's JavaScript not allowing anything other than images to be sent to the editor. This urgent issue is now fixed and why this version is light on changes.
|
276 |
|