OptionTree - Version 2.7.3

Version Description

  • Hotfix - Update regex for Object Injection check to include + bypass and PHP serialized classes. props @erwanlr
Download this release

Release Info

Developer valendesigns
Plugin Icon wp plugin OptionTree
Version 2.7.3
Comparing to
See all releases

Code changes from version 2.7.2 to 2.7.3

Files changed (4) hide show
  1. composer.json +1 -1
  2. includes/ot-functions-admin.php +1 -1
  3. ot-loader.php +2 -2
  4. readme.txt +666 -663
composer.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "name": "valendesigns/option-tree",
3
  "description": "Theme Options UI Builder for WordPress.",
4
- "version": "2.7.2",
5
  "type": "wordpress-plugin",
6
  "homepage": "https://github.com/valendesigns/option-tree",
7
  "license": "GPL-2.0-or-later",
1
  {
2
  "name": "valendesigns/option-tree",
3
  "description": "Theme Options UI Builder for WordPress.",
4
+ "version": "2.7.3",
5
  "type": "wordpress-plugin",
6
  "homepage": "https://github.com/valendesigns/option-tree",
7
  "license": "GPL-2.0-or-later",
includes/ot-functions-admin.php CHANGED
@@ -5057,7 +5057,7 @@ if ( ! function_exists( 'ot_decode' ) ) {
5057
  preg_match( '/a:\d+:{.*?}/', $decoded, $array_matches, PREG_OFFSET_CAPTURE, 0 );
5058
 
5059
  // Search for an object.
5060
- preg_match( '/O:\d+:"[a-z0-9_]+":\d+:{.*?}/i', $decoded, $obj_matches, PREG_OFFSET_CAPTURE, 0 );
5061
 
5062
  // Prevent object injection or non arrays.
5063
  if ( $obj_matches || ! $array_matches ) {
5057
  preg_match( '/a:\d+:{.*?}/', $decoded, $array_matches, PREG_OFFSET_CAPTURE, 0 );
5058
 
5059
  // Search for an object.
5060
+ preg_match( '/O|C:\+?\d+:"[a-z0-9_]+":\+?\d+:/i', $decoded, $obj_matches, PREG_OFFSET_CAPTURE, 0 );
5061
 
5062
  // Prevent object injection or non arrays.
5063
  if ( $obj_matches || ! $array_matches ) {
ot-loader.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: OptionTree
4
  * Plugin URI: https://github.com/valendesigns/option-tree/
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.2
7
  * Author: Derek Herman
8
  * Author URI: http://valendesigns.com
9
  * License: GPLv2 or later
@@ -84,7 +84,7 @@ if ( ! class_exists( 'OT_Loader' ) && defined( 'ABSPATH' ) ) {
84
  /**
85
  * Current Version number.
86
  */
87
- define( 'OT_VERSION', '2.7.2' );
88
 
89
  /**
90
  * For developers: Theme mode.
3
  * Plugin Name: OptionTree
4
  * Plugin URI: https://github.com/valendesigns/option-tree/
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.3
7
  * Author: Derek Herman
8
  * Author URI: http://valendesigns.com
9
  * License: GPLv2 or later
84
  /**
85
  * Current Version number.
86
  */
87
+ define( 'OT_VERSION', '2.7.3' );
88
 
89
  /**
90
  * For developers: Theme mode.
readme.txt CHANGED
@@ -1,663 +1,666 @@
1
- === OptionTree ===
2
- Contributors: valendesigns
3
- Tags: options, theme options, meta boxes, settings
4
- Requires at least: 3.8
5
- Tested up to: 5.2
6
- Stable tag: 2.7.2
7
- License: GPLv2 or later
8
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
- Donate link: https://bit.ly/2TBvksV
10
- Requires PHP: 5.3.0
11
-
12
- Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
13
-
14
- == Description ==
15
-
16
- OptionTree attempts to bridge the gap between WordPress developers, designers and end-users by creating fully responsive option panels and meta boxes with an ease unlike any other plugin. OptionTree has many advanced features with well placed hooks and filters to adjust every aspect of the user experience.
17
-
18
- Build your Theme Options panel locally with an easy to use drag & drop interface and then export a functioning `theme-options.php` file for production use that is i18n translation ready, with your custom text domain automatically inserted.
19
-
20
- And, in just a few simple lines of code, save settings to the database with a unique array ID so none of your Theme Options conflict with other themes that use OptionTree.
21
-
22
- Also, OptionTree now takes full advantage of the new color schemes introduced in WordPress 3.8, it looks and feels built-in.
23
-
24
- #### Theme Integration
25
- If you're like me, you want to know how everything works. Download and activate the [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) and see first hand how to integrate OptionTree into your own project. I'll walk you through installing OptionTree and you'll get a chance to see all the various options and filters first hand and in the wild.
26
-
27
- #### Contributing
28
- To contribute or report bugs, please go to the [OptionTree Github](https://github.com/valendesigns/option-tree) repository.
29
-
30
- #### Sponsorship
31
- OptionTree is a project partly sponsored by <a href="http://themeforest.net/?ref=valendesigns">ThemeForest</a>, the largest WordPress theme marketplace on the web.
32
-
33
- #### Option Types
34
- This is a complete list of all the available option types that come shipped with OptionTree.
35
-
36
- * Background
37
- * Border
38
- * Box Shadow
39
- * Category Checkbox
40
- * Category Select
41
- * Checkbox
42
- * Colorpicker
43
- * Colorpicker Opacity
44
- * CSS
45
- * Custom Post Type Checkbox
46
- * Custom Post Type Select
47
- * Date Picker
48
- * Date Time Picker
49
- * Dimension
50
- * Gallery
51
- * Google Fonts
52
- * JavaScript
53
- * Link Color
54
- * List Item
55
- * Measurement
56
- * Numeric Slider
57
- * On/Off
58
- * Page Checkbox
59
- * Page Select
60
- * Post Checkbox
61
- * Post Select
62
- * Radio
63
- * Radio Image
64
- * Select
65
- * Sidebar Select
66
- * Slider
67
- * Social Links
68
- * Spacing
69
- * Tab
70
- * Tag Checkbox
71
- * Tag Select
72
- * Taxonomy Checkbox
73
- * Taxonomy Select
74
- * Text
75
- * Textarea
76
- * Textarea Simple
77
- * Textblock
78
- * Textblock Titled
79
- * Typography
80
- * Upload
81
-
82
- == Installation ==
83
-
84
- **Plugin Mode**
85
-
86
- 1. Upload `option-tree` to the `/wp-content/plugins/` directory
87
- 1. Activate the plugin through the `Plugins` menu in WordPress
88
- 1. Click the `OptionTree->Documentation` link in the WordPress admin sidebar menu for further setup assistance.
89
-
90
- **Theme Mode**
91
-
92
- 1. Download the latest version of OptionTree and unarchive the `.zip` directory.
93
- 1. Put the `option-tree` directory in the root of your theme. For example, the server path would be `/wp-content/themes/theme-name/option-tree/`.
94
- 1. You must deactivate and/or delete the plugin version of OptionTree.
95
- 1. Add the following code to the beginning of your `functions.php`.
96
-
97
- ```
98
- /**
99
- * Required: set 'ot_theme_mode' filter to true.
100
- */
101
- add_filter( 'ot_theme_mode', '__return_true' );
102
-
103
- /**
104
- * Required: include OptionTree.
105
- */
106
- require( trailingslashit( get_template_directory() ) . 'option-tree/ot-loader.php' );
107
- ```
108
-
109
- For a list of all the OptionTree UI display filters refer to the `demo-functions.php` file found in the `/assets/theme-mode/` directory of this plugin. This file is the starting point for developing themes with Theme Mode.
110
-
111
- == Frequently Asked Questions ==
112
-
113
- = Is there a demo theme I can install? =
114
-
115
- There sure is, and I'm glad you asked. Download and activate the [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) and get some experience setting up OptionTree on your own with detailed directions and tips.
116
-
117
- = I get errors or a blank screen when I activate the plugin. What's the deal? =
118
-
119
- The most likely scenario is your theme already has OptionTree installed in Theme Mode. And since the plugin and theme version can't both be active at the same time without the sky falling on your head, your site has decided to throw in the towel. If that's not your issue, open up a support request and we'll figure it out together. UPDATE: As of OptionTree 2.4.0 the plugin version will not conflict with the Theme Mode version if they are both 2.4.0 or higher.
120
-
121
- == Screenshots ==
122
-
123
- 1. Theme Options
124
- 2. Settings
125
- 3. Documentation
126
-
127
- == Changelog ==
128
-
129
- = 2.7.2 =
130
- * Hotfix - Extend the `unfiltered_html` `iframe` capabilities to support additional `style` attributes.
131
-
132
- = 2.7.1 =
133
- * Hotfix - Fix error cannot redeclare `_sanitize_recursive()`. props @shramee
134
- * Hotfix - Ensure `iframe` supports the `style` attribute for users with `unfiltered_html` capabilities.
135
- * Hotfix - Ensure `noscript` is supported for users with `unfiltered_html` capabilities.
136
-
137
- = 2.7.0 =
138
- * Require PHP 5.3+
139
- * Fix all PHPCS errors and warnings.
140
- * Fix a vulnerability where Object Injection could take place if someone has a valid nonce.
141
- * Force all settings to be sanitized and escaped before saving and during display.
142
- * Add filter `ot_validate_setting_input_safe` which is used to validate the input value of a custom setting type. All values must be validated!
143
- * Add a notice to let users know that a custom setting type is not properly validating saved data and do a best-effort sanitize of the user data before saving it.
144
- * Fix issue with Composer autoload and only load OptionTree if we have access to WordPress. props @infomaniac50
145
- * Fix deprecated `create_function` notice in PHP 7.2+. props @modesthatred
146
- * Fix notice "Only variables should be passed by reference". props @SergeAx
147
- * Add `wordpress-plugin` project type to composer file. props @egifford
148
- * Removed translation files.
149
- * Removed the deprecated XML file import method.
150
- * Fix SQL syntax issue. props @ryanlabelle
151
- * Fix metabox radio & checkbox style issues. props @ryanlabelle
152
-
153
- = 2.6.0 =
154
- * Fix a reflected XSS vulnerability with the `add_list_item` & `add_social_links` Ajax requests.
155
- * Fix the Google Fonts URL so it passed the W3 Validator. props @BassemN
156
- * Fix `global_admin_css` so it's only enqueued when needed.
157
- * Fix `dynamic.css` so that a child theme doesn't load the styles saved to the parent theme.
158
- * Add filter `ot_recognized_post_format_meta_boxes` to support additional post formats meta boxes. props @BassemN
159
- * Add action `ot_do_settings_fields_before` & `ot_do_settings_fields_after`. props @BassemN, @valendesigns
160
- * Add Text Domain to plugin file to fully support the new translate.wordpress.org Language Packs.
161
- * Fix notice in PHP 7.0.0 props @Zackio
162
-
163
- = 2.5.5 =
164
- * Hotfix - Allow a `0` value to be saved with certain option types. Contributors via github @BassemN.
165
- * Hotfix - Stop media from being attached to the OptionTree post type when uploaded from the media manager or customizer. Contributors via github @earnjam, and @valendesigns.
166
- * Hotfix - Added filter `ot_load_dynamic_css` to explicitly turn the feature off if desired.
167
- * Hotfix - Stopped `dynamic.css` created with other themes from being loaded elsewhere.
168
-
169
- = 2.5.4 =
170
- * Hotfix - Support for WordPress 4.2 term splitting.
171
- * Hotfix - Removed any potential XSS security issues with `add_query_arg` by escaping it.
172
- * Hotfix - Fixed an issue where Visual Composer was indirectly destroying OptionTree meta box values.
173
- * Hotfix - Fixed an issue where the select field value was not visible. Contributors via github @sabbirk15.
174
-
175
- = 2.5.3 =
176
- * Hotfix - Added `inherit` fallback to the `border` option type in dynamic.css.
177
- * Hotfix - Added `none` fallback to the `box-shadow` option type in dynamic.css.
178
- * Hotfix - Added `inherit` fallback to the `colorpicker` option type in dynamic.css.
179
- * Hotfix - Added `inherit` fallback to the `colorpicker-opacity` option type in dynamic.css.
180
- * Hotfix - Added filter `ot_insert_css_with_markers_fallback` to filter the `dynamic.css` fallback value.
181
- * Hotfix - Added filter `ot_type_radio_image_attributes` to filter the image attributes for each radio choice. Contributors via github @BassemN, and @valendesigns.
182
- * Hotfix - Refactored `ot_insert_css_with_markers` to remove confusing & unnecessary PHP statements and fix whitespace.
183
- * Hotfix - Fixed an issue in `ot_insert_css_with_markers` where the `$option_type` variable was not being set properly.
184
- * Hotfix - Fixed an issue where having multiple Google Fonts option types caused the "Add Google Font" button to insert multiple dropdowns.
185
-
186
- = 2.5.2 =
187
- * Hotfix - Added `inherit` fallback to the `link-color` option type in dynamic.css.
188
- * Hotfix - Remove `$.browser.msie` JS error caused by function being deprecated.
189
- * Hotfix - Change `hover` to `mouseenter mouseleave` to stop jQuery migrate error message.
190
- * Hotfix - Don't allow duplicate Google Fonts in the `ot-google-fonts-css` enqueue.
191
- * Hotfix - Fixed an issue with the CSS and JavaScript option types not being initiating inside of tabs.
192
- * Hotfix - Fixed metabox tab styles for mobile.
193
- * Hotfix - Separate the post formats JS so it does not interfere with the default behavior and loads only as needed.
194
- * Hotfix - Adding the `not-sortable` class to the List Item option type will remove the sortable feature for that option.
195
-
196
- = 2.5.1 =
197
- * Hotfix - Overhaul the Colorpicker Opacity option type so it saves rgba values, not arrays.
198
- * Hotfix - Added the ability to set opacity on any colorpicker with the `ot-colorpicker-opacity` class.
199
- * Hotfix - Don't use `esc_url_raw` to filter the Upload option type when it's saving an attachment ID. Contributors via github @RistoNiinemets.
200
- * Hotfix - Show an error message to user if unable to write to the `dynamic.css` file. Contributors via github @johnh10, and @valendesigns.
201
- * Hotfix - Force the `ot_google_fonts` array to be rebuilt when switching between themes.
202
- * Hotfix - Stop theme check from nagging about using `add_menu_page` in `ot-cleanup-api.php`.
203
-
204
- = 2.5.0 =
205
- * Added the Google Fonts option type. Contributors via github @maimairel, and @valendesigns.
206
- * Added the Border option type. Contributors via github @doitmax, and @valendesigns.
207
- * Added the Box Shadow option type. Contributors via github @doitmax, and @valendesigns.
208
- * Added the Colorpicker Opacity option type. Contributors via github @doitmax, and @valendesigns.
209
- * Added the Dimension option type. Contributors via github @doitmax, and @valendesigns.
210
- * Added the JavaScript option type.
211
- * Added the Link Color option type. Contributors via github @doitmax, and @valendesigns.
212
- * Added the Spacing option type. Contributors via github @doitmax, and @valendesigns.
213
- * Fixed an issue where the Colorpicker was not parsing conditions on `change` or `clear`.
214
- * Fixed the Colorpicker styles on mobile devices.
215
- * Show the Colorpicker setting ID inside the error message string when the value is invalid.
216
- * Added an 'on change' trigger to the Numeric Slider's hidden input. Contributors via github @cubell.
217
- * Stop Theme Check from complaining about the `register_post_type()` function being used in Theme Mode.
218
- * Added styles that clean up the appearance of the included Font Awesome icons in section tabs.
219
- * Fixed jQuery UI style conflicts created by the WP Review plugin.
220
- * Changed the sanitization function from `sanitize_text_field` to `esc_url_raw` for the Upload option type.
221
- * Added filter `ot_dequeue_jquery_ui_css_screen_ids` to dequeue `jquery-ui-css` by screen ID.
222
- * Added filter `ot_on_off_switch_on_value` to filter the value of the On button. Contributors via github @BassemN, and @valendesigns.
223
- * Added filter `ot_on_off_switch_on_label` to filter the label of the On button. Contributors via github @BassemN, and @valendesigns.
224
- * Added filter `ot_on_off_switch_off_value` to filter the value of the Off button. Contributors via github @BassemN, and @valendesigns.
225
- * Added filter `ot_on_off_switch_off_label` to filter the label of the Off button. Contributors via github @BassemN, and @valendesigns.
226
- * Added filter `ot_on_off_switch_width` to filter the width of the On/Off switch.
227
- * Added filter `ot_type_date_picker_readonly` to filter the addition of the readonly attribute.
228
- * Added filter `ot_type_date_time_picker_readonly` to filter the addition of the readonly attribute.
229
- * Added filter `ot_admin_menu_priority` to filter the `admin_menu` action hook priority.
230
- * Added Estonian translation. Contributors via github @tjuris, and @RistoNiinemets.
231
- * Fixed an issue where changes to `theme-options.php` required a second page load.
232
- * Fixed the clean up script, it only displays when there's something to clean up. No more menu item!
233
- * Update demo files with the latest option types.
234
- * Changed where `ot_css_file_paths` is saved when `is_multisite` for better `dynamic.css` file support.
235
- * Changed the default `dynamic.css` file path in multisite to be `dynamic-{current-blog-id}.css`.
236
-
237
- = 2.4.6 =
238
- * Hotfix - Added a clean up script to consolidate orphaned media posts and remove the old and unused `wp_option_tree` table.
239
- * Hotfix - Fixed an issue where `ot_get_media_post_ID()` was never able to set the value of the `ot_media_post_ID` option because it was already set to empty. Causing the `ot_create_media_post()` function to create multiple media posts.
240
-
241
- = 2.4.5 =
242
- * Hotfix - Fixed an issue where `ot_get_media_post_ID()` was setting the value of the `ot_media_post_ID` option to `null`. Causing the `ot_create_media_post()` function to create multiple media posts. A clean up script will be added to `2.5.0`.
243
-
244
- = 2.4.4 =
245
- * Hotfix - Fixed undefined index caused by shorthand conditional.
246
- * Hotfix - Fixed jQuery UI style conflicts created by the Easy Digital Downloads plugin.
247
- * Hotfix - Added placeholder to background-image. Contributors via github @BassemN.
248
-
249
- = 2.4.3 =
250
- * Hotfix - WordPress 4.0 compatible.
251
- * Hotfix - Fixed an issue where all media was being attached to the default OptionTree media post.
252
- * Hotfix - Removed the deprecated `screen_icon()` function.
253
- * Hotfix - Fixed the `ot_line_height_range_interval` filter being misnamed as `ot_line_height_unit_type`. Contributors via github @youri--.
254
- * Hotfix - Fixed a conflict with "Frontend Publishing Pro" when using the media uploader on the front-end.
255
- * Hotfix - Increase condition performance. Contributors via github @designst.
256
- * Hotfix - Add custom style classes to list-item settings. Contributors via github @designst.
257
- * Hotfix - Check for `post_title` instead of `post_name` in `ot_get_media_post_ID()`. Contributors via github @clifgriffin.
258
- * Hotfix - Store the return value of `ot_get_media_post_ID()` in the options table as `ot_media_post_ID`.
259
- * Hotfix - Added padding to List Items options to reflect the same UI as individual options. Contributors via github @valendesigns and @designst.
260
- * Hotfix - Fixed a bug that caused the Social Links option type to not properly import.
261
-
262
- = 2.4.2 =
263
- * Hotfix - Fixed a PHP notice that was created when `background-size` in the Background option type is undefined.
264
- * Hotfix - Fixed an issue with the Upload option type, in attachment ID mode, not storing its value.
265
- * Hotfix - Replaced `load_template` with `require` throught the documentation.
266
- * Hotfix - Added a settings ID auto-fill that is based on the text of the settings label in the Theme Options UI Builder. Contributors via github @valendesigns and @Ore4444.
267
- * Hotfix - Added filter `ot_override_forced_textarea_simple` to allow the Textarea option type to be moved in the DOM and not replaced with the Textarea Simple option type in meta boxes and list items.
268
-
269
- = 2.4.1 =
270
- * Hotfix - Fixed a typo in the demo Theme Options related to the `social-links`.
271
- * Hotfix - Fixed the language directory path conflict between IIS and Linux while in Theme Mode.
272
- * Hotfix - Fixed a style issue where select fields would overflow their parent elements.
273
- * Hotfix - Fixed a PHP notice that was created when the Measurement option type did not have a saved value.
274
-
275
- = 2.4.0 =
276
- * Added filter 'ot_post_formats' which loads meta boxes specifically for post formats.
277
- * Added the Social Links option type.
278
- * Fixed OptionTree being conflicted due to having both the plugin and theme version activated. Contributors via github @valendesigns and @bitcommit.
279
- * Added an admin notice when the UI Builder is being overridden by custom theme options.
280
- * Allow the Upload option type to be stored as an attachment ID by adding `ot-upload-attachment-id` to the elements `class` attribute. Contributors via github @valendesigns and @krisarsov.
281
- * Fixed an issue with the CSS option type not showing the Ace editor in a metabox that is broken into tabbed content.
282
- * Fixed missing option type translation strings. Contributors via github @RistoNiinemets.
283
- * Replaced mysql functions with the wpdb equivalent. Contributors via github @joshlevinson.
284
- * Fixed search order of the `contains` condition string. Contributors via github @designst.
285
- * Added meta box field wrapper class if a custom field class is defined in the settings. Contributors via github @designst.
286
- * Added filter 'ot_type_select_choices' to dynamically change select choices. Contributors via github @maimairel and @valendesigns.
287
- * Fixed a bug that added an unnecessary directory separator to the `load_theme_textdomain()` `$path` variable. Contributors via github @PatrickDelancy and @valendesigns.
288
- * Fixed the state of metabox radio buttons after a Drag & Drop event. Contributors via github @themovation and @valendesigns.
289
- * Fixed conditions not working correctly within list items.
290
- * Fixed the min-height issue when using tabs in metaboxes.
291
- * Added filter `ot_recognized_font_sizes` to dynamically change the font sizes by field ID.
292
- * Added filter `ot_recognized_letter_spacing` to dynamically change the letter spacing by field ID.
293
- * Added filter `ot_recognized_line_heights` to dynamically change the line heights by field ID.
294
- * Fixed a style issue where list item labels in metaboxes were not displaying correctly.
295
- * Fixed an issue where the WooCommerce plugin would alter the style of metabox tabs on product pages.
296
-
297
- = 2.3.4 =
298
- * Hotfix - Fixed an issue where condition number values were being treated like strings and not returning a correct boolean response.
299
-
300
- = 2.3.3 =
301
- * Hotfix - Fixed subfolder compatibility with versions of Windows that use backslashes instead of forward slashes. Contributors via github @primozcigler and @valendesigns.
302
- * Hotfix - Fixed missing text domain in demo files. Contributors via github @jetonr.
303
- * Hotfix - Added filter `ot_migrate_settings_id` to migrate themes that used `option_tree_settings` and now use a custom settings ID.
304
- * Hotfix - Added filter `ot_migrate_options_id` to migrate themes that used `option_tree` and now use a custom options ID.
305
- * Hotfix - Added filter `ot_migrate_layouts_id` to migrate themes that used `option_tree_layouts` and now use a custom layouts ID.
306
-
307
- = 2.3.2 =
308
- * Hotfix - Fixed an issue with the `ot_create_media_post` function creating multiple `option-tree` posts.
309
- * Hotfix - Change the icon used by the layout management option type to differentiate it from the edit button.
310
- * Hotfix - Suppress PHP warning in the Background option type "Invalid argument supplied for foreach()". Contributors via github @tomkwok.
311
- * Hotfix - Added filter `ot_type_date_picker_date_format` to change the date format of the Date Picker option type.
312
- * Hotfix - Added filter `ot_type_date_time_picker_date_format` to change the date format of the Date Time Picker option type.
313
-
314
- = 2.3.1 =
315
- * Hotfix - Fixed a bug with the Gallery option type that would show attachments in the media window when none had been added yet.
316
- * Hotfix - Added the option to save the Gallery as a shortcode by adding `ot-gallery-shortcode` to the elements `class` attribute.
317
- * Hotfix - Fixed conditions not being effective in List Items directly after clicking "Add New". Contributors via github @bitcommit.
318
-
319
- = 2.3.0 =
320
- * Added the Tab option type.
321
- * Added Ace Editor to the CSS option type. Contributors via github @imangm and @valendesigns.
322
- * Added support for WordPress 3.8 color schemes.
323
- * Added support for RTL languages. Contributors via github @omid-khd and @valendesigns.
324
- * Added actions before and after the enqueue styles and scripts.
325
- * Added Date Picker option type. Contributors via github @jetonr and @valendesigns.
326
- * Added Date Time Picker option type. Contributors via github @jetonr and @valendesigns.
327
- * Added filter 'ot_list_item_title_label' to change the label for a List Item's required title field.
328
- * Added filter 'ot_list_item_title_desc' to change the description for a List Item's required title field.
329
- * Added filter 'ot_options_id' to change the 'option_tree' option ID to a unique value.
330
- * Added filter 'ot_settings_id' to change the 'option_tree_settings' option ID to a unique value.
331
- * Added filter 'ot_layouts_id' to change the 'option_tree_layouts' option ID to a unique value.
332
- * Added filter 'ot_header_logo_link' to change the logo link inside the header of OptionTree.
333
- * Added filter 'ot_header_version_text' to change the version text inside the header of OptionTree.
334
- * Added action 'ot_header_list' to add additional theme specific list items to the header of OptionTree.
335
- * Added filter 'ot_upload_text' to change the "Send to OptionTree" text.
336
- * Added the CSS Class field value to the parent `.format-settings` div in addition to the class being added to the element. Each class is now appended with `-wrap`.
337
- * Added support for [Composer](https://github.com/composer/composer). Contributors via github @designst.
338
- * Added support for adding I18n text domains to the exported `theme-options.php` file.
339
- * Fixed a bug that kept the UI from displaying when using the `ot_type_background_size_choices` filter.
340
- * Fixed a bug that caused the Gallery option type to save a single space instead of `null`.
341
- * Fixed the return value of the Background, Measurement, and Typography option types. They now return `null` if no values are saved to the array.
342
- * Fixed a bug that resulted in a PHP warning if the choices array was set to an empty string.
343
- * Updated the documentation, including this `readme.txt` and a new demo [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) to parallel OptionTree.
344
- * Added filter 'ot_type_radio_image_src' which allows the Radio Image option type source URI to be changed. Contributors via github @bitcommit.
345
-
346
- = 2.2.3 =
347
- * Hotfix - Allow empty condition values. For example, `field_id:is()` or `field_id:not()` would now be valid syntax.
348
- * Hotfix - Fixed a bug in the `init_upload_fix` JavaScript method.
349
- * Hotfix - Fixed a bug in the `url_exists` javaScript method. The code will no longer will check if a URL exists on another domain.
350
-
351
- = 2.2.2 =
352
- * Hotfix - Added support for both upper and lower case conditions operator.
353
- * Hotfix - Updated the color and font size of inline code.
354
- * Hotfix - Fix an issue with IE filter and updated the style of the On/Off option type.
355
- * Hotfix - Added opacity to radio images to improve distinction. Contributors via github @jetonr.
356
-
357
- = 2.2.1 =
358
- * Hotfix - Fixed a UI bug that caused the layouts input to cover the wp menu.
359
- * Hotfix - Moved the screen shots to the WordPress SVN assets directory.
360
-
361
- = 2.2.0 =
362
- * Added the Gallery option type.
363
- * Added the On/Off option type.
364
- * Replaced the old Color Picker with the default WP Color Picker.
365
- * Added UI support for WordPress 3.8. Contributors via github @AlxMedia, and @valendesigns.
366
- * Added support for conditional toggling of settings fields. Contributors via github @maimairel, @valendesigns, @doitmax, and @imangm.
367
- * Replaced the OptionTree image icon with a font version.
368
- * Added 'background-size' to the Background option type.
369
- * Added fallback text when displaying posts without titles in various option types.
370
- * Added filter 'ot_recognized_background_fields' to show/hide fields for background option types.
371
- * Added filter 'ot_filter_description' that allows the theme option descriptions to be filtered before being displayed.
372
- * Added subfolder compatibility in theme mode. Contributors via github @doitmax, and @valendesigns.
373
- * Fixed a bug caused by using 'home_url' when loading dynamic CSS files.
374
- * Fixed an issue where you could not save metabox text field values as "0". Contributors via github @sparkdevelopment, and @valendesigns.
375
- * Fixed the broken localization directory path in theme mode. Contributors via github @youri--, and @valendesigns.
376
- * Fixed missing custom class for the Numeric Slider. Contributors via github @doitmax.
377
- * Added filter 'ot_type_category_checkbox_query' which allows you to filter the get_categories() args for Category Checkbox.
378
- * Added filter 'ot_type_category_select_query' which allows you to filter the get_categories() args for Category Select.
379
- * Added filter 'ot_type_taxonomy_checkbox_query' which allows you to filter the get_categories() args for Taxonomy Checkbox.
380
- * Added filter 'ot_type_taxonomy_select_query' which allows you to filter the get_categories() args for Taxonomy Select.
381
- * Added the 'ot_echo_option' function. Contributors via github @joshlevinson.
382
- * Added filter 'ot_theme_options_contextual_help' which allows you to filter the Contextual Help on the Theme Options page.
383
- * Added filter 'ot_theme_options_sections' which allows you to filter the Sections on the Theme Options page. Contributors via github @joshlevinson.
384
- * Added filter 'ot_theme_options_settings' which allows you to filter the Settings on the Theme Options page. Contributors via github @joshlevinson.
385
-
386
- = 2.1.4 =
387
- * Hotfix - Fixed the Numeric Slider not work inside of a newly added List item.
388
- * Hotfix - Fixed the numeric slider fallback value being set to 0, it now becomes the minimum value if no standard is set.
389
- * Hotfix - Allow single quotes in std and choice value when exporting theme-options.php. Contributors via github @maimairel.
390
- * Hotfix - Additional Themecheck bypass for required functions. Contributors via github @maimairel.
391
- * Hotfix - Fixed post meta information being lost when loading revisions. Contributors via github @live-mesh.
392
- * Hotfix - Removed template queries in option types. Contributors via github @live-mesh.
393
-
394
- = 2.1.3 =
395
- * Hotfix - Loading OptionTree on the 'init' action proved to be wrong, it now loads on 'after_setup_theme'.
396
- * Hotfix - Layouts were not being imported properly due to using the wrong path variable.
397
-
398
- = 2.1.2 =
399
- * Hotfix - Fixed a JS mistake that caused upload in list items and sliders to not open the media uploader until saved first.
400
- * Hotfix - Load OptionTree on the 'init' action, which allows the UI filters to properly function when not in theme mode.
401
-
402
- = 2.1.1 =
403
- * Hotfix - The OT_SHOW_SETTINGS_EXPORT constant was incorrectly set to false as the default.
404
-
405
- = 2.1 =
406
- * Added support for WordPress 3.6.
407
- * UI got a small but needed update, and is now more inline with WordPress.
408
- * Added WPML support for the Text, Textarea, and Textarea Simple option types, and within list items; even after drag & drop.
409
- * Upload now uses the media uploader introduced in WordPress 3.5. Contributors via github @htvu, @maimairel, and @valendesigns.
410
- * Added a horizontal Numeric Slider option type. Contributors via github @maimairel and @valendesigns.
411
- * Added a Sidebar Select option type. Contributors via github @maimairel.
412
- * Removed additional deprecated assigning of return value in PHP.
413
- * Fix missing "Send to OptionTree" button in CPT. Contributors via github @jomaddim.
414
- * Fix option types that use $count instead of an array key to select the option value.
415
- * Created functions to register the Theme Options & Settings pages, and with better filtering.
416
- * Added relative path support for Radio Image choices.
417
- * Added dynamic replacement of 'OT_URL' & 'OT_THEME_URL' in the Radio Image source path.
418
- * Make '0' possible as a field value. Validate for empty strings instead of empty(). Contributors via github @maimairel.
419
- * The 'ot_theme_options_capability' filter is now working for different capabilities like editor.
420
- * The 'ot_display_by_type' filter is now being assigned to a value.
421
- * Added filter 'ot_show_options_ui' which allows you to hide the Theme Options UI Builder.
422
- * Added filter 'ot_show_settings_import' which allows you to hide the Settings Import options on the Import page.
423
- * Added filter 'ot_show_settings_export' which allows you to hide the Settings Export options on the Export page.
424
- * Added filter 'ot_show_docs' which allows you to hide the Documentation.
425
- * Added filter 'ot_use_theme_options' which allows you to hide the OptionTree Theme Option page (not recommended for beginners).
426
- * Added filter 'ot_list_item_description' which allows you to change the default list item description text.
427
- * Added filter 'ot_type_custom_post_type_checkbox_query' which allows you to filter the get_posts() args for Custom Post Type Checkbox.
428
- * Added filter 'ot_type_custom_post_type_select_query' which allows you to filter the get_posts() args for Custom Post Type Select.
429
- * Added filter 'ot_type_page_checkbox_query' which allows you to filter the get_posts() args for Page Checkbox.
430
- * Added filter 'ot_type_page_select_query' which allows you to filter the get_posts() args for Page Select.
431
- * Added filter 'ot_type_post_checkbox_query' which allows you to filter the get_posts() args for Post Checkbox.
432
- * Added filter 'ot_type_post_select_query' which allows you to filter the get_posts() args for Post Select.
433
-
434
- = 2.0.16 =
435
- * Fixed an urgent JS regression bug that caused the upload option type to break. Code contributed by @anonumus via github.
436
- * Added 'font-color' to the typography filter.
437
-
438
- = 2.0.15 =
439
- * Added support for Child Theme mode.
440
- * Improved handling of standard values when settings are written manually.
441
- * Add filter for CSS insertion value.
442
- * Added 'ot_before_theme_options_save' action hook.
443
- * Fix 'indexOf' JS error when upload is closed without uploading.
444
- * Add textarea std value when option type is 'textarea', 'textarea-simple', or 'css'.
445
- * Remove load_template and revert back to include_once.
446
- * Fixed dynamic.css regression from 2.0.13 that caused the file to not save.
447
-
448
- = 2.0.14 =
449
- * Removed deprecated assigning of return value in PHP.
450
- * Patch to fix PHP notice regression with the use of load_template in a plugin after Theme Check update.
451
- * Fixed missing required arguments in OT_Loader::add_layout.
452
- * Removed esc_attr() on font-family check.
453
- * Added a 'ot_theme_options_parent_slug' filter in ot-ui-theme-options.php
454
- * Fixed WP_Error from the use of wp_get_remote() instead of file_get_contents().
455
-
456
- = 2.0.13 =
457
- * Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'.
458
- * Fix an issue where Media Upload stopped working on some servers.
459
-
460
- = 2.0.12 =
461
- * Added additional filters to the array that builds the Theme Option UI.
462
- * Made option-tree post type private.
463
- * Revert capabilities back to manage_options in ot-ui-admin.php.
464
- * Upload now sends the URL of the selected image size to OptionTree.
465
- * Added new range interval filter to font-size, letter-spacing, & line-height.
466
- * Allow Typography fields to be filtered out of the UI.
467
-
468
- = 2.0.11 =
469
- * Added filters to the array that builds the Theme Option UI.
470
- * Added .format-setting-wrap div to allow for complex CSS layouts.
471
- * Added better namespacing for the Colorpicker option type.
472
- * Fixed theme-options.php export where it was adding an extra comma.
473
-
474
- = 2.0.10 =
475
- * Fixed a bug where the Textarea row count wasn't working for List Items.
476
- * Added an apply_filter to the exported theme-options.php file.
477
- * Added CSS id's to tabs and settings.
478
- * Allow "New Layout" section to be hidden on the theme options page via a filter.
479
- * Fixed a bug where the Colorpicker was not closing in List Items.
480
- * Change capabilities from manage_options to edit_theme_options.
481
- * Remove Textblock title in List Items & Metaboxes.
482
- * Fixed a List Item bug that incorrectly added ID's based on counting objects - submitted by Spark
483
- * Fixed incorrect text domain paths for both plugin and theme mode.
484
- * Fixed a bug with UI Sortable not properly calculating the container height.
485
- * Fixed Select dropdown selector bug - submitted by Manfred Haltner
486
- * Fixed Radio Image remove class bug - submitted by designst
487
- * Added new typography fields - submitted by darknailblue
488
- * Added dynamic CSS support for new typography fields.
489
- * Added new filters to typography fields, including low/high range & unit types.
490
-
491
- = 2.0.9 =
492
- * Fixed the issue where the Textarea Simple and CSS option types were mysteriously being ran through wpautop.
493
- * Added missing class setting to Textarea, Textarea Simple, & CSS option types.
494
- * Fixed theme-options.php exported array where label values were not correct.
495
- * Change GET to POST for all AJAX calls to fix a bug where some servers would not allow long strings to be passed in GET variables.
496
- * Added the 'ot_after_validate_setting' filter to the validation function.
497
- * Added $field_id to the ot_validate_setting() for more precise filtering.
498
- * Added the ot_reverse_wpautop() function that you can run input through just incase you need it.
499
- * Updated the docs to include information on why WYSIWYG editors are not allowed in meta boxes and that they revert to a Textarea Simple.
500
- * Update option-tree.pot file.
501
-
502
- = 2.0.8 =
503
- * Add auto import for backwards compatibility of old 1.x files.
504
- * Added the ability to export settings into a fully functional theme-options.php.
505
- * Fix typo in docs regarding the filter demo code.
506
- * Removed slashes in the section and contextual help titles.
507
- * Made colorpicker input field alignment more cross browser compatible.
508
-
509
- = 2.0.7 =
510
- * Fixed the load order to be compatible with 1.x version themes that think the get_option_tree() function doesn't exist yet.
511
- * Tested and compatible with Cudazi themes, but the nag message is still visible.
512
-
513
- = 2.0.6 =
514
- * Run the 'option_tree' array through validation when importing data and layouts.
515
- * Fix a bug where list items and sliders were not allowing the user to select the input field.
516
- * Add a filter that allows you to not load resources for meta boxes if you're not going to use them.
517
- * Update option-tree.pot file.
518
-
519
- = 2.0.5 =
520
- * Change the way the 'option_tree_settings' array validates. Strip out those damn slashes!
521
-
522
- = 2.0.4 =
523
- * Run the 'option_tree' array through validation when upgrading from the 1.0 branch to the 2.0 branch for the first time.
524
- * Fix a typo in the slider array where textarea's were not saving the first time due to an incorrect array key.
525
-
526
- = 2.0.3 =
527
- * Had an incorrect conditional statement causing an issue where the plugin was attempting to create the 'option-tree' image attachment page, even though it was already created.
528
- * The above also fixed a conflict with 'The Events Calendar' plugin.
529
-
530
- = 2.0.2 =
531
- * Added I18n support, let the translations begin. The option-tree.pot file is inside the languages directory.
532
- * Trim whitespace on imported choices array.
533
- * Fixed the CSS insert function not having a value to save.
534
-
535
- = 2.0.1 =
536
- * Import from table was not mapping settings correctly. It is now.
537
-
538
- = 2.0 =
539
- * Complete rewrite form the ground up.
540
- * Better Theme Options UI Builder.
541
- * New in-plugin documentation.
542
- * Brand new responsive UI.
543
- * Add new option types, most notable the List Item which should eventually replace the Slider.
544
- * Added the simpler ot_get_option() function to eventually replace get_option_tree().
545
- * Added support for Meta Boxes.
546
- * Added Theme Mode where you can now include the plugin directly in your theme.
547
- * Better validation on saved data.
548
- * Simplified the import process.
549
- * Added support for contextual help.
550
- * Permanently move the Theme Option to the Appearance tab.
551
- * Added a ton of filters.
552
- * Made huge improvements to the code base and tested rigorously.
553
-
554
- = 1.1.8.1 =
555
- * Removed get_option_tree() in the WordPress admin area due to theme conflicts.
556
- * Removed demo files in the assets folder at the request of WordPress
557
-
558
- = 1.1.8 =
559
- * Fixed scrolling issue on extra tall pages
560
- * Added ability to show/hide settings & documentation via the User Profile page.
561
- * Added Background option type.
562
- * Added Typography option type.
563
- * Added CSS option type.
564
- * Better looking selects with 1=Yes,2=No where '1' is the value and 'Yes' is the text in the select.
565
- * Made the AJAX message CSS more prominent.
566
- * functions.load.php will now only load option type functions if viewing an OT admin page.
567
- * Deregistered the custom jQuery UI in the 'Cispm Mail Contact' plugin when viewing an OptionTree page.
568
- * Can now save layouts from the Theme Options page.
569
- * You can now change the slider fields by targeting a specific "Option Key"
570
- * Modified upload for situations where you manually enter a relative path
571
- * Allow get_option_tree() function to be used in WP admin
572
- * Changed permissions to edit_theme_options
573
-
574
- = 1.1.7.1 =
575
- * Revert functions.load.php, will fix and update in next version
576
-
577
- = 1.1.7 =
578
- * Added layout (theme variation) support with save/delete/activate/import/export capabilities.
579
- * Allow layout change on Theme Options page.
580
- * Full Multisite compatibility by manually adding xml mime type for import options.
581
- * Replaced eregi() with preg_match() for 5.3+ compatibility.
582
- * Changed test data in the assets directory for new layout option.
583
- * Made it so when the slider & upload image changes it's reflected on blur.
584
- * Gave the slider image an upload button.
585
- * Added do_action('option_tree_import_data') to option_tree_import_data() function before exit.
586
- * Added do_action('option_tree_array_save') to option_tree_array_save() function before exit.
587
- * Added do_action('option_tree_save_layout') to option_tree_save_layout() function before exit.
588
- * Added do_action('option_tree_delete_layout') to option_tree_delete_layout() function before exit.
589
- * Added do_action('option_tree_activate_layout') to option_tree_activate_layout() function before exit.
590
- * Added do_action('option_tree_import_layout') to option_tree_import_layout() function before redirect.
591
- * Added do_action('option_tree_admin_header') hook before all admin pages.
592
- * Fixed bug where users could add a color without a hash.
593
- * Only load option type function on Theme Options page
594
- * Loading resources with absolute paths, no longer relative.
595
- * Fixed a bug with uploader creating extra option-tree draft pages.
596
- * Fixed slider toggle bug, now the sliders close when you open another or create new slide.
597
-
598
- = 1.1.6 =
599
- * Theme Integration added.
600
- * Made the upload XML file openbase_dir compliant.
601
-
602
- = 1.1.5 =
603
- * Fixed multiple sliders issue
604
-
605
- = 1.1.4 =
606
- * Patch for get_option_tree() $is_array being false and still returning an array
607
-
608
- = 1.1.3 =
609
- * Added Slider option type with filter for changing the optional fields
610
- * Fixed the text displayed for Measurement option type after options are reset
611
- * Added filter to measurement units
612
- * Code cleanup in the option_tree_array_save() function
613
- * Fixed double quotes on front-end display
614
-
615
- = 1.1.2 =
616
- * Fixed double quotes in Textarea option type
617
- * Added Measurement option type for CSS values
618
- * Fixed Post option type only returning 5 items
619
- * Added a scrolling window for checkboxes > 10
620
-
621
- = 1.1.1 =
622
- * Fixed the 'remove' icon from showing when nothing's uploaded
623
-
624
- = 1.1 =
625
- * Fixed the Undefined index: notices when WP_DEBUG is set to true
626
-
627
- = 1.0.0 =
628
- * Initial version
629
-
630
- == Upgrade Notice ==
631
-
632
- = 2.7.0 =
633
- All custom setting types must use the `ot_validate_setting_input_safe` filter to sanitize user input data. OptionTree will attempt to sanitize the data, but data loss could happen with custom setting types when saving — so please update them. Additionally, please install OptionTree on a test server, or backup your database, before upgrading your live site. This version contains breaking changes!
634
-
635
- = 2.3.0 =
636
- As with each major release, please install OptionTree on a test server before upgrading your live site.
637
-
638
- = 2.1.4 =
639
- 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.
640
-
641
- = 2.0.16 =
642
- 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.
643
-
644
- = 2.0.12 =
645
- The plugin has undertaken a complete rebuild! If you are not the theme developer, I urge you to contact that person before you upgrade and ask them to test the themes compatibility.
646
-
647
- = 1.1.8.1 =
648
- Removed get_option_tree() in the WordPress admin area due to theme conflicts.
649
-
650
- = 1.1.8 =
651
- Added Typography, Background, & CSS option types. Lots of way to extend them, as well.
652
-
653
- = 1.1.7 =
654
- Lots of additions, none critical just fun. Added layouts & upload to slider. As well, started including action hooks for extending and integrating with other plugins.
655
-
656
- = 1.1.6 =
657
- Added theme integration for developers. It's now possible to have a default XML file included in your theme to populate the theme options and hide the settings and docs pages. Read more about this in the plugins built in documentation.
658
-
659
- = 1.1.5 =
660
- Having multiple sliders caused a naming collision in the JavaScript and is now fixed. Upgrade ASAP to have multiple sliders available in the UI.
661
-
662
- = 1.1.4 =
663
- Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme.
 
 
 
1
+ === OptionTree ===
2
+ Contributors: valendesigns
3
+ Tags: options, theme options, meta boxes, settings
4
+ Requires at least: 3.8
5
+ Tested up to: 5.2
6
+ Stable tag: 2.7.3
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+ Donate link: https://bit.ly/2TBvksV
10
+ Requires PHP: 5.3.0
11
+
12
+ Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
13
+
14
+ == Description ==
15
+
16
+ OptionTree attempts to bridge the gap between WordPress developers, designers and end-users by creating fully responsive option panels and meta boxes with an ease unlike any other plugin. OptionTree has many advanced features with well placed hooks and filters to adjust every aspect of the user experience.
17
+
18
+ Build your Theme Options panel locally with an easy to use drag & drop interface and then export a functioning `theme-options.php` file for production use that is i18n translation ready, with your custom text domain automatically inserted.
19
+
20
+ And, in just a few simple lines of code, save settings to the database with a unique array ID so none of your Theme Options conflict with other themes that use OptionTree.
21
+
22
+ Also, OptionTree now takes full advantage of the new color schemes introduced in WordPress 3.8, it looks and feels built-in.
23
+
24
+ #### Theme Integration
25
+ If you're like me, you want to know how everything works. Download and activate the [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) and see first hand how to integrate OptionTree into your own project. I'll walk you through installing OptionTree and you'll get a chance to see all the various options and filters first hand and in the wild.
26
+
27
+ #### Contributing
28
+ To contribute or report bugs, please go to the [OptionTree Github](https://github.com/valendesigns/option-tree) repository.
29
+
30
+ #### Sponsorship
31
+ OptionTree is a project partly sponsored by <a href="http://themeforest.net/?ref=valendesigns">ThemeForest</a>, the largest WordPress theme marketplace on the web.
32
+
33
+ #### Option Types
34
+ This is a complete list of all the available option types that come shipped with OptionTree.
35
+
36
+ * Background
37
+ * Border
38
+ * Box Shadow
39
+ * Category Checkbox
40
+ * Category Select
41
+ * Checkbox
42
+ * Colorpicker
43
+ * Colorpicker Opacity
44
+ * CSS
45
+ * Custom Post Type Checkbox
46
+ * Custom Post Type Select
47
+ * Date Picker
48
+ * Date Time Picker
49
+ * Dimension
50
+ * Gallery
51
+ * Google Fonts
52
+ * JavaScript
53
+ * Link Color
54
+ * List Item
55
+ * Measurement
56
+ * Numeric Slider
57
+ * On/Off
58
+ * Page Checkbox
59
+ * Page Select
60
+ * Post Checkbox
61
+ * Post Select
62
+ * Radio
63
+ * Radio Image
64
+ * Select
65
+ * Sidebar Select
66
+ * Slider
67
+ * Social Links
68
+ * Spacing
69
+ * Tab
70
+ * Tag Checkbox
71
+ * Tag Select
72
+ * Taxonomy Checkbox
73
+ * Taxonomy Select
74
+ * Text
75
+ * Textarea
76
+ * Textarea Simple
77
+ * Textblock
78
+ * Textblock Titled
79
+ * Typography
80
+ * Upload
81
+
82
+ == Installation ==
83
+
84
+ **Plugin Mode**
85
+
86
+ 1. Upload `option-tree` to the `/wp-content/plugins/` directory
87
+ 1. Activate the plugin through the `Plugins` menu in WordPress
88
+ 1. Click the `OptionTree->Documentation` link in the WordPress admin sidebar menu for further setup assistance.
89
+
90
+ **Theme Mode**
91
+
92
+ 1. Download the latest version of OptionTree and unarchive the `.zip` directory.
93
+ 1. Put the `option-tree` directory in the root of your theme. For example, the server path would be `/wp-content/themes/theme-name/option-tree/`.
94
+ 1. You must deactivate and/or delete the plugin version of OptionTree.
95
+ 1. Add the following code to the beginning of your `functions.php`.
96
+
97
+ ```
98
+ /**
99
+ * Required: set 'ot_theme_mode' filter to true.
100
+ */
101
+ add_filter( 'ot_theme_mode', '__return_true' );
102
+
103
+ /**
104
+ * Required: include OptionTree.
105
+ */
106
+ require( trailingslashit( get_template_directory() ) . 'option-tree/ot-loader.php' );
107
+ ```
108
+
109
+ For a list of all the OptionTree UI display filters refer to the `demo-functions.php` file found in the `/assets/theme-mode/` directory of this plugin. This file is the starting point for developing themes with Theme Mode.
110
+
111
+ == Frequently Asked Questions ==
112
+
113
+ = Is there a demo theme I can install? =
114
+
115
+ There sure is, and I'm glad you asked. Download and activate the [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) and get some experience setting up OptionTree on your own with detailed directions and tips.
116
+
117
+ = I get errors or a blank screen when I activate the plugin. What's the deal? =
118
+
119
+ The most likely scenario is your theme already has OptionTree installed in Theme Mode. And since the plugin and theme version can't both be active at the same time without the sky falling on your head, your site has decided to throw in the towel. If that's not your issue, open up a support request and we'll figure it out together. UPDATE: As of OptionTree 2.4.0 the plugin version will not conflict with the Theme Mode version if they are both 2.4.0 or higher.
120
+
121
+ == Screenshots ==
122
+
123
+ 1. Theme Options
124
+ 2. Settings
125
+ 3. Documentation
126
+
127
+ == Changelog ==
128
+
129
+ = 2.7.3 =
130
+ * Hotfix - Update regex for Object Injection check to include `+` bypass and PHP serialized classes. props @erwanlr
131
+
132
+ = 2.7.2 =
133
+ * Hotfix - Extend the `unfiltered_html` `iframe` capabilities to support additional `style` attributes.
134
+
135
+ = 2.7.1 =
136
+ * Hotfix - Fix error cannot redeclare `_sanitize_recursive()`. props @shramee
137
+ * Hotfix - Ensure `iframe` supports the `style` attribute for users with `unfiltered_html` capabilities.
138
+ * Hotfix - Ensure `noscript` is supported for users with `unfiltered_html` capabilities.
139
+
140
+ = 2.7.0 =
141
+ * Require PHP 5.3+
142
+ * Fix all PHPCS errors and warnings.
143
+ * Fix a vulnerability where Object Injection could take place if someone has a valid nonce.
144
+ * Force all settings to be sanitized and escaped before saving and during display.
145
+ * Add filter `ot_validate_setting_input_safe` which is used to validate the input value of a custom setting type. All values must be validated!
146
+ * Add a notice to let users know that a custom setting type is not properly validating saved data and do a best-effort sanitize of the user data before saving it.
147
+ * Fix issue with Composer autoload and only load OptionTree if we have access to WordPress. props @infomaniac50
148
+ * Fix deprecated `create_function` notice in PHP 7.2+. props @modesthatred
149
+ * Fix notice "Only variables should be passed by reference". props @SergeAx
150
+ * Add `wordpress-plugin` project type to composer file. props @egifford
151
+ * Removed translation files.
152
+ * Removed the deprecated XML file import method.
153
+ * Fix SQL syntax issue. props @ryanlabelle
154
+ * Fix metabox radio & checkbox style issues. props @ryanlabelle
155
+
156
+ = 2.6.0 =
157
+ * Fix a reflected XSS vulnerability with the `add_list_item` & `add_social_links` Ajax requests.
158
+ * Fix the Google Fonts URL so it passed the W3 Validator. props @BassemN
159
+ * Fix `global_admin_css` so it's only enqueued when needed.
160
+ * Fix `dynamic.css` so that a child theme doesn't load the styles saved to the parent theme.
161
+ * Add filter `ot_recognized_post_format_meta_boxes` to support additional post formats meta boxes. props @BassemN
162
+ * Add action `ot_do_settings_fields_before` & `ot_do_settings_fields_after`. props @BassemN, @valendesigns
163
+ * Add Text Domain to plugin file to fully support the new translate.wordpress.org Language Packs.
164
+ * Fix notice in PHP 7.0.0 props @Zackio
165
+
166
+ = 2.5.5 =
167
+ * Hotfix - Allow a `0` value to be saved with certain option types. Contributors via github @BassemN.
168
+ * Hotfix - Stop media from being attached to the OptionTree post type when uploaded from the media manager or customizer. Contributors via github @earnjam, and @valendesigns.
169
+ * Hotfix - Added filter `ot_load_dynamic_css` to explicitly turn the feature off if desired.
170
+ * Hotfix - Stopped `dynamic.css` created with other themes from being loaded elsewhere.
171
+
172
+ = 2.5.4 =
173
+ * Hotfix - Support for WordPress 4.2 term splitting.
174
+ * Hotfix - Removed any potential XSS security issues with `add_query_arg` by escaping it.
175
+ * Hotfix - Fixed an issue where Visual Composer was indirectly destroying OptionTree meta box values.
176
+ * Hotfix - Fixed an issue where the select field value was not visible. Contributors via github @sabbirk15.
177
+
178
+ = 2.5.3 =
179
+ * Hotfix - Added `inherit` fallback to the `border` option type in dynamic.css.
180
+ * Hotfix - Added `none` fallback to the `box-shadow` option type in dynamic.css.
181
+ * Hotfix - Added `inherit` fallback to the `colorpicker` option type in dynamic.css.
182
+ * Hotfix - Added `inherit` fallback to the `colorpicker-opacity` option type in dynamic.css.
183
+ * Hotfix - Added filter `ot_insert_css_with_markers_fallback` to filter the `dynamic.css` fallback value.
184
+ * Hotfix - Added filter `ot_type_radio_image_attributes` to filter the image attributes for each radio choice. Contributors via github @BassemN, and @valendesigns.
185
+ * Hotfix - Refactored `ot_insert_css_with_markers` to remove confusing & unnecessary PHP statements and fix whitespace.
186
+ * Hotfix - Fixed an issue in `ot_insert_css_with_markers` where the `$option_type` variable was not being set properly.
187
+ * Hotfix - Fixed an issue where having multiple Google Fonts option types caused the "Add Google Font" button to insert multiple dropdowns.
188
+
189
+ = 2.5.2 =
190
+ * Hotfix - Added `inherit` fallback to the `link-color` option type in dynamic.css.
191
+ * Hotfix - Remove `$.browser.msie` JS error caused by function being deprecated.
192
+ * Hotfix - Change `hover` to `mouseenter mouseleave` to stop jQuery migrate error message.
193
+ * Hotfix - Don't allow duplicate Google Fonts in the `ot-google-fonts-css` enqueue.
194
+ * Hotfix - Fixed an issue with the CSS and JavaScript option types not being initiating inside of tabs.
195
+ * Hotfix - Fixed metabox tab styles for mobile.
196
+ * Hotfix - Separate the post formats JS so it does not interfere with the default behavior and loads only as needed.
197
+ * Hotfix - Adding the `not-sortable` class to the List Item option type will remove the sortable feature for that option.
198
+
199
+ = 2.5.1 =
200
+ * Hotfix - Overhaul the Colorpicker Opacity option type so it saves rgba values, not arrays.
201
+ * Hotfix - Added the ability to set opacity on any colorpicker with the `ot-colorpicker-opacity` class.
202
+ * Hotfix - Don't use `esc_url_raw` to filter the Upload option type when it's saving an attachment ID. Contributors via github @RistoNiinemets.
203
+ * Hotfix - Show an error message to user if unable to write to the `dynamic.css` file. Contributors via github @johnh10, and @valendesigns.
204
+ * Hotfix - Force the `ot_google_fonts` array to be rebuilt when switching between themes.
205
+ * Hotfix - Stop theme check from nagging about using `add_menu_page` in `ot-cleanup-api.php`.
206
+
207
+ = 2.5.0 =
208
+ * Added the Google Fonts option type. Contributors via github @maimairel, and @valendesigns.
209
+ * Added the Border option type. Contributors via github @doitmax, and @valendesigns.
210
+ * Added the Box Shadow option type. Contributors via github @doitmax, and @valendesigns.
211
+ * Added the Colorpicker Opacity option type. Contributors via github @doitmax, and @valendesigns.
212
+ * Added the Dimension option type. Contributors via github @doitmax, and @valendesigns.
213
+ * Added the JavaScript option type.
214
+ * Added the Link Color option type. Contributors via github @doitmax, and @valendesigns.
215
+ * Added the Spacing option type. Contributors via github @doitmax, and @valendesigns.
216
+ * Fixed an issue where the Colorpicker was not parsing conditions on `change` or `clear`.
217
+ * Fixed the Colorpicker styles on mobile devices.
218
+ * Show the Colorpicker setting ID inside the error message string when the value is invalid.
219
+ * Added an 'on change' trigger to the Numeric Slider's hidden input. Contributors via github @cubell.
220
+ * Stop Theme Check from complaining about the `register_post_type()` function being used in Theme Mode.
221
+ * Added styles that clean up the appearance of the included Font Awesome icons in section tabs.
222
+ * Fixed jQuery UI style conflicts created by the WP Review plugin.
223
+ * Changed the sanitization function from `sanitize_text_field` to `esc_url_raw` for the Upload option type.
224
+ * Added filter `ot_dequeue_jquery_ui_css_screen_ids` to dequeue `jquery-ui-css` by screen ID.
225
+ * Added filter `ot_on_off_switch_on_value` to filter the value of the On button. Contributors via github @BassemN, and @valendesigns.
226
+ * Added filter `ot_on_off_switch_on_label` to filter the label of the On button. Contributors via github @BassemN, and @valendesigns.
227
+ * Added filter `ot_on_off_switch_off_value` to filter the value of the Off button. Contributors via github @BassemN, and @valendesigns.
228
+ * Added filter `ot_on_off_switch_off_label` to filter the label of the Off button. Contributors via github @BassemN, and @valendesigns.
229
+ * Added filter `ot_on_off_switch_width` to filter the width of the On/Off switch.
230
+ * Added filter `ot_type_date_picker_readonly` to filter the addition of the readonly attribute.
231
+ * Added filter `ot_type_date_time_picker_readonly` to filter the addition of the readonly attribute.
232
+ * Added filter `ot_admin_menu_priority` to filter the `admin_menu` action hook priority.
233
+ * Added Estonian translation. Contributors via github @tjuris, and @RistoNiinemets.
234
+ * Fixed an issue where changes to `theme-options.php` required a second page load.
235
+ * Fixed the clean up script, it only displays when there's something to clean up. No more menu item!
236
+ * Update demo files with the latest option types.
237
+ * Changed where `ot_css_file_paths` is saved when `is_multisite` for better `dynamic.css` file support.
238
+ * Changed the default `dynamic.css` file path in multisite to be `dynamic-{current-blog-id}.css`.
239
+
240
+ = 2.4.6 =
241
+ * Hotfix - Added a clean up script to consolidate orphaned media posts and remove the old and unused `wp_option_tree` table.
242
+ * Hotfix - Fixed an issue where `ot_get_media_post_ID()` was never able to set the value of the `ot_media_post_ID` option because it was already set to empty. Causing the `ot_create_media_post()` function to create multiple media posts.
243
+
244
+ = 2.4.5 =
245
+ * Hotfix - Fixed an issue where `ot_get_media_post_ID()` was setting the value of the `ot_media_post_ID` option to `null`. Causing the `ot_create_media_post()` function to create multiple media posts. A clean up script will be added to `2.5.0`.
246
+
247
+ = 2.4.4 =
248
+ * Hotfix - Fixed undefined index caused by shorthand conditional.
249
+ * Hotfix - Fixed jQuery UI style conflicts created by the Easy Digital Downloads plugin.
250
+ * Hotfix - Added placeholder to background-image. Contributors via github @BassemN.
251
+
252
+ = 2.4.3 =
253
+ * Hotfix - WordPress 4.0 compatible.
254
+ * Hotfix - Fixed an issue where all media was being attached to the default OptionTree media post.
255
+ * Hotfix - Removed the deprecated `screen_icon()` function.
256
+ * Hotfix - Fixed the `ot_line_height_range_interval` filter being misnamed as `ot_line_height_unit_type`. Contributors via github @youri--.
257
+ * Hotfix - Fixed a conflict with "Frontend Publishing Pro" when using the media uploader on the front-end.
258
+ * Hotfix - Increase condition performance. Contributors via github @designst.
259
+ * Hotfix - Add custom style classes to list-item settings. Contributors via github @designst.
260
+ * Hotfix - Check for `post_title` instead of `post_name` in `ot_get_media_post_ID()`. Contributors via github @clifgriffin.
261
+ * Hotfix - Store the return value of `ot_get_media_post_ID()` in the options table as `ot_media_post_ID`.
262
+ * Hotfix - Added padding to List Items options to reflect the same UI as individual options. Contributors via github @valendesigns and @designst.
263
+ * Hotfix - Fixed a bug that caused the Social Links option type to not properly import.
264
+
265
+ = 2.4.2 =
266
+ * Hotfix - Fixed a PHP notice that was created when `background-size` in the Background option type is undefined.
267
+ * Hotfix - Fixed an issue with the Upload option type, in attachment ID mode, not storing its value.
268
+ * Hotfix - Replaced `load_template` with `require` throught the documentation.
269
+ * Hotfix - Added a settings ID auto-fill that is based on the text of the settings label in the Theme Options UI Builder. Contributors via github @valendesigns and @Ore4444.
270
+ * Hotfix - Added filter `ot_override_forced_textarea_simple` to allow the Textarea option type to be moved in the DOM and not replaced with the Textarea Simple option type in meta boxes and list items.
271
+
272
+ = 2.4.1 =
273
+ * Hotfix - Fixed a typo in the demo Theme Options related to the `social-links`.
274
+ * Hotfix - Fixed the language directory path conflict between IIS and Linux while in Theme Mode.
275
+ * Hotfix - Fixed a style issue where select fields would overflow their parent elements.
276
+ * Hotfix - Fixed a PHP notice that was created when the Measurement option type did not have a saved value.
277
+
278
+ = 2.4.0 =
279
+ * Added filter 'ot_post_formats' which loads meta boxes specifically for post formats.
280
+ * Added the Social Links option type.
281
+ * Fixed OptionTree being conflicted due to having both the plugin and theme version activated. Contributors via github @valendesigns and @bitcommit.
282
+ * Added an admin notice when the UI Builder is being overridden by custom theme options.
283
+ * Allow the Upload option type to be stored as an attachment ID by adding `ot-upload-attachment-id` to the elements `class` attribute. Contributors via github @valendesigns and @krisarsov.
284
+ * Fixed an issue with the CSS option type not showing the Ace editor in a metabox that is broken into tabbed content.
285
+ * Fixed missing option type translation strings. Contributors via github @RistoNiinemets.
286
+ * Replaced mysql functions with the wpdb equivalent. Contributors via github @joshlevinson.
287
+ * Fixed search order of the `contains` condition string. Contributors via github @designst.
288
+ * Added meta box field wrapper class if a custom field class is defined in the settings. Contributors via github @designst.
289
+ * Added filter 'ot_type_select_choices' to dynamically change select choices. Contributors via github @maimairel and @valendesigns.
290
+ * Fixed a bug that added an unnecessary directory separator to the `load_theme_textdomain()` `$path` variable. Contributors via github @PatrickDelancy and @valendesigns.
291
+ * Fixed the state of metabox radio buttons after a Drag & Drop event. Contributors via github @themovation and @valendesigns.
292
+ * Fixed conditions not working correctly within list items.
293
+ * Fixed the min-height issue when using tabs in metaboxes.
294
+ * Added filter `ot_recognized_font_sizes` to dynamically change the font sizes by field ID.
295
+ * Added filter `ot_recognized_letter_spacing` to dynamically change the letter spacing by field ID.
296
+ * Added filter `ot_recognized_line_heights` to dynamically change the line heights by field ID.
297
+ * Fixed a style issue where list item labels in metaboxes were not displaying correctly.
298
+ * Fixed an issue where the WooCommerce plugin would alter the style of metabox tabs on product pages.
299
+
300
+ = 2.3.4 =
301
+ * Hotfix - Fixed an issue where condition number values were being treated like strings and not returning a correct boolean response.
302
+
303
+ = 2.3.3 =
304
+ * Hotfix - Fixed subfolder compatibility with versions of Windows that use backslashes instead of forward slashes. Contributors via github @primozcigler and @valendesigns.
305
+ * Hotfix - Fixed missing text domain in demo files. Contributors via github @jetonr.
306
+ * Hotfix - Added filter `ot_migrate_settings_id` to migrate themes that used `option_tree_settings` and now use a custom settings ID.
307
+ * Hotfix - Added filter `ot_migrate_options_id` to migrate themes that used `option_tree` and now use a custom options ID.
308
+ * Hotfix - Added filter `ot_migrate_layouts_id` to migrate themes that used `option_tree_layouts` and now use a custom layouts ID.
309
+
310
+ = 2.3.2 =
311
+ * Hotfix - Fixed an issue with the `ot_create_media_post` function creating multiple `option-tree` posts.
312
+ * Hotfix - Change the icon used by the layout management option type to differentiate it from the edit button.
313
+ * Hotfix - Suppress PHP warning in the Background option type "Invalid argument supplied for foreach()". Contributors via github @tomkwok.
314
+ * Hotfix - Added filter `ot_type_date_picker_date_format` to change the date format of the Date Picker option type.
315
+ * Hotfix - Added filter `ot_type_date_time_picker_date_format` to change the date format of the Date Time Picker option type.
316
+
317
+ = 2.3.1 =
318
+ * Hotfix - Fixed a bug with the Gallery option type that would show attachments in the media window when none had been added yet.
319
+ * Hotfix - Added the option to save the Gallery as a shortcode by adding `ot-gallery-shortcode` to the elements `class` attribute.
320
+ * Hotfix - Fixed conditions not being effective in List Items directly after clicking "Add New". Contributors via github @bitcommit.
321
+
322
+ = 2.3.0 =
323
+ * Added the Tab option type.
324
+ * Added Ace Editor to the CSS option type. Contributors via github @imangm and @valendesigns.
325
+ * Added support for WordPress 3.8 color schemes.
326
+ * Added support for RTL languages. Contributors via github @omid-khd and @valendesigns.
327
+ * Added actions before and after the enqueue styles and scripts.
328
+ * Added Date Picker option type. Contributors via github @jetonr and @valendesigns.
329
+ * Added Date Time Picker option type. Contributors via github @jetonr and @valendesigns.
330
+ * Added filter 'ot_list_item_title_label' to change the label for a List Item's required title field.
331
+ * Added filter 'ot_list_item_title_desc' to change the description for a List Item's required title field.
332
+ * Added filter 'ot_options_id' to change the 'option_tree' option ID to a unique value.
333
+ * Added filter 'ot_settings_id' to change the 'option_tree_settings' option ID to a unique value.
334
+ * Added filter 'ot_layouts_id' to change the 'option_tree_layouts' option ID to a unique value.
335
+ * Added filter 'ot_header_logo_link' to change the logo link inside the header of OptionTree.
336
+ * Added filter 'ot_header_version_text' to change the version text inside the header of OptionTree.
337
+ * Added action 'ot_header_list' to add additional theme specific list items to the header of OptionTree.
338
+ * Added filter 'ot_upload_text' to change the "Send to OptionTree" text.
339
+ * Added the CSS Class field value to the parent `.format-settings` div in addition to the class being added to the element. Each class is now appended with `-wrap`.
340
+ * Added support for [Composer](https://github.com/composer/composer). Contributors via github @designst.
341
+ * Added support for adding I18n text domains to the exported `theme-options.php` file.
342
+ * Fixed a bug that kept the UI from displaying when using the `ot_type_background_size_choices` filter.
343
+ * Fixed a bug that caused the Gallery option type to save a single space instead of `null`.
344
+ * Fixed the return value of the Background, Measurement, and Typography option types. They now return `null` if no values are saved to the array.
345
+ * Fixed a bug that resulted in a PHP warning if the choices array was set to an empty string.
346
+ * Updated the documentation, including this `readme.txt` and a new demo [OptionTree Theme](https://github.com/valendesigns/option-tree-theme) to parallel OptionTree.
347
+ * Added filter 'ot_type_radio_image_src' which allows the Radio Image option type source URI to be changed. Contributors via github @bitcommit.
348
+
349
+ = 2.2.3 =
350
+ * Hotfix - Allow empty condition values. For example, `field_id:is()` or `field_id:not()` would now be valid syntax.
351
+ * Hotfix - Fixed a bug in the `init_upload_fix` JavaScript method.
352
+ * Hotfix - Fixed a bug in the `url_exists` javaScript method. The code will no longer will check if a URL exists on another domain.
353
+
354
+ = 2.2.2 =
355
+ * Hotfix - Added support for both upper and lower case conditions operator.
356
+ * Hotfix - Updated the color and font size of inline code.
357
+ * Hotfix - Fix an issue with IE filter and updated the style of the On/Off option type.
358
+ * Hotfix - Added opacity to radio images to improve distinction. Contributors via github @jetonr.
359
+
360
+ = 2.2.1 =
361
+ * Hotfix - Fixed a UI bug that caused the layouts input to cover the wp menu.
362
+ * Hotfix - Moved the screen shots to the WordPress SVN assets directory.
363
+
364
+ = 2.2.0 =
365
+ * Added the Gallery option type.
366
+ * Added the On/Off option type.
367
+ * Replaced the old Color Picker with the default WP Color Picker.
368
+ * Added UI support for WordPress 3.8. Contributors via github @AlxMedia, and @valendesigns.
369
+ * Added support for conditional toggling of settings fields. Contributors via github @maimairel, @valendesigns, @doitmax, and @imangm.
370
+ * Replaced the OptionTree image icon with a font version.
371
+ * Added 'background-size' to the Background option type.
372
+ * Added fallback text when displaying posts without titles in various option types.
373
+ * Added filter 'ot_recognized_background_fields' to show/hide fields for background option types.
374
+ * Added filter 'ot_filter_description' that allows the theme option descriptions to be filtered before being displayed.
375
+ * Added subfolder compatibility in theme mode. Contributors via github @doitmax, and @valendesigns.
376
+ * Fixed a bug caused by using 'home_url' when loading dynamic CSS files.
377
+ * Fixed an issue where you could not save metabox text field values as "0". Contributors via github @sparkdevelopment, and @valendesigns.
378
+ * Fixed the broken localization directory path in theme mode. Contributors via github @youri--, and @valendesigns.
379
+ * Fixed missing custom class for the Numeric Slider. Contributors via github @doitmax.
380
+ * Added filter 'ot_type_category_checkbox_query' which allows you to filter the get_categories() args for Category Checkbox.
381
+ * Added filter 'ot_type_category_select_query' which allows you to filter the get_categories() args for Category Select.
382
+ * Added filter 'ot_type_taxonomy_checkbox_query' which allows you to filter the get_categories() args for Taxonomy Checkbox.
383
+ * Added filter 'ot_type_taxonomy_select_query' which allows you to filter the get_categories() args for Taxonomy Select.
384
+ * Added the 'ot_echo_option' function. Contributors via github @joshlevinson.
385
+ * Added filter 'ot_theme_options_contextual_help' which allows you to filter the Contextual Help on the Theme Options page.
386
+ * Added filter 'ot_theme_options_sections' which allows you to filter the Sections on the Theme Options page. Contributors via github @joshlevinson.
387
+ * Added filter 'ot_theme_options_settings' which allows you to filter the Settings on the Theme Options page. Contributors via github @joshlevinson.
388
+
389
+ = 2.1.4 =
390
+ * Hotfix - Fixed the Numeric Slider not work inside of a newly added List item.
391
+ * Hotfix - Fixed the numeric slider fallback value being set to 0, it now becomes the minimum value if no standard is set.
392
+ * Hotfix - Allow single quotes in std and choice value when exporting theme-options.php. Contributors via github @maimairel.
393
+ * Hotfix - Additional Themecheck bypass for required functions. Contributors via github @maimairel.
394
+ * Hotfix - Fixed post meta information being lost when loading revisions. Contributors via github @live-mesh.
395
+ * Hotfix - Removed template queries in option types. Contributors via github @live-mesh.
396
+
397
+ = 2.1.3 =
398
+ * Hotfix - Loading OptionTree on the 'init' action proved to be wrong, it now loads on 'after_setup_theme'.
399
+ * Hotfix - Layouts were not being imported properly due to using the wrong path variable.
400
+
401
+ = 2.1.2 =
402
+ * Hotfix - Fixed a JS mistake that caused upload in list items and sliders to not open the media uploader until saved first.
403
+ * Hotfix - Load OptionTree on the 'init' action, which allows the UI filters to properly function when not in theme mode.
404
+
405
+ = 2.1.1 =
406
+ * Hotfix - The OT_SHOW_SETTINGS_EXPORT constant was incorrectly set to false as the default.
407
+
408
+ = 2.1 =
409
+ * Added support for WordPress 3.6.
410
+ * UI got a small but needed update, and is now more inline with WordPress.
411
+ * Added WPML support for the Text, Textarea, and Textarea Simple option types, and within list items; even after drag & drop.
412
+ * Upload now uses the media uploader introduced in WordPress 3.5. Contributors via github @htvu, @maimairel, and @valendesigns.
413
+ * Added a horizontal Numeric Slider option type. Contributors via github @maimairel and @valendesigns.
414
+ * Added a Sidebar Select option type. Contributors via github @maimairel.
415
+ * Removed additional deprecated assigning of return value in PHP.
416
+ * Fix missing "Send to OptionTree" button in CPT. Contributors via github @jomaddim.
417
+ * Fix option types that use $count instead of an array key to select the option value.
418
+ * Created functions to register the Theme Options & Settings pages, and with better filtering.
419
+ * Added relative path support for Radio Image choices.
420
+ * Added dynamic replacement of 'OT_URL' & 'OT_THEME_URL' in the Radio Image source path.
421
+ * Make '0' possible as a field value. Validate for empty strings instead of empty(). Contributors via github @maimairel.
422
+ * The 'ot_theme_options_capability' filter is now working for different capabilities like editor.
423
+ * The 'ot_display_by_type' filter is now being assigned to a value.
424
+ * Added filter 'ot_show_options_ui' which allows you to hide the Theme Options UI Builder.
425
+ * Added filter 'ot_show_settings_import' which allows you to hide the Settings Import options on the Import page.
426
+ * Added filter 'ot_show_settings_export' which allows you to hide the Settings Export options on the Export page.
427
+ * Added filter 'ot_show_docs' which allows you to hide the Documentation.
428
+ * Added filter 'ot_use_theme_options' which allows you to hide the OptionTree Theme Option page (not recommended for beginners).
429
+ * Added filter 'ot_list_item_description' which allows you to change the default list item description text.
430
+ * Added filter 'ot_type_custom_post_type_checkbox_query' which allows you to filter the get_posts() args for Custom Post Type Checkbox.
431
+ * Added filter 'ot_type_custom_post_type_select_query' which allows you to filter the get_posts() args for Custom Post Type Select.
432
+ * Added filter 'ot_type_page_checkbox_query' which allows you to filter the get_posts() args for Page Checkbox.
433
+ * Added filter 'ot_type_page_select_query' which allows you to filter the get_posts() args for Page Select.
434
+ * Added filter 'ot_type_post_checkbox_query' which allows you to filter the get_posts() args for Post Checkbox.
435
+ * Added filter 'ot_type_post_select_query' which allows you to filter the get_posts() args for Post Select.
436
+
437
+ = 2.0.16 =
438
+ * Fixed an urgent JS regression bug that caused the upload option type to break. Code contributed by @anonumus via github.
439
+ * Added 'font-color' to the typography filter.
440
+
441
+ = 2.0.15 =
442
+ * Added support for Child Theme mode.
443
+ * Improved handling of standard values when settings are written manually.
444
+ * Add filter for CSS insertion value.
445
+ * Added 'ot_before_theme_options_save' action hook.
446
+ * Fix 'indexOf' JS error when upload is closed without uploading.
447
+ * Add textarea std value when option type is 'textarea', 'textarea-simple', or 'css'.
448
+ * Remove load_template and revert back to include_once.
449
+ * Fixed dynamic.css regression from 2.0.13 that caused the file to not save.
450
+
451
+ = 2.0.14 =
452
+ * Removed deprecated assigning of return value in PHP.
453
+ * Patch to fix PHP notice regression with the use of load_template in a plugin after Theme Check update.
454
+ * Fixed missing required arguments in OT_Loader::add_layout.
455
+ * Removed esc_attr() on font-family check.
456
+ * Added a 'ot_theme_options_parent_slug' filter in ot-ui-theme-options.php
457
+ * Fixed WP_Error from the use of wp_get_remote() instead of file_get_contents().
458
+
459
+ = 2.0.13 =
460
+ * Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'.
461
+ * Fix an issue where Media Upload stopped working on some servers.
462
+
463
+ = 2.0.12 =
464
+ * Added additional filters to the array that builds the Theme Option UI.
465
+ * Made option-tree post type private.
466
+ * Revert capabilities back to manage_options in ot-ui-admin.php.
467
+ * Upload now sends the URL of the selected image size to OptionTree.
468
+ * Added new range interval filter to font-size, letter-spacing, & line-height.
469
+ * Allow Typography fields to be filtered out of the UI.
470
+
471
+ = 2.0.11 =
472
+ * Added filters to the array that builds the Theme Option UI.
473
+ * Added .format-setting-wrap div to allow for complex CSS layouts.
474
+ * Added better namespacing for the Colorpicker option type.
475
+ * Fixed theme-options.php export where it was adding an extra comma.
476
+
477
+ = 2.0.10 =
478
+ * Fixed a bug where the Textarea row count wasn't working for List Items.
479
+ * Added an apply_filter to the exported theme-options.php file.
480
+ * Added CSS id's to tabs and settings.
481
+ * Allow "New Layout" section to be hidden on the theme options page via a filter.
482
+ * Fixed a bug where the Colorpicker was not closing in List Items.
483
+ * Change capabilities from manage_options to edit_theme_options.
484
+ * Remove Textblock title in List Items & Metaboxes.
485
+ * Fixed a List Item bug that incorrectly added ID's based on counting objects - submitted by Spark
486
+ * Fixed incorrect text domain paths for both plugin and theme mode.
487
+ * Fixed a bug with UI Sortable not properly calculating the container height.
488
+ * Fixed Select dropdown selector bug - submitted by Manfred Haltner
489
+ * Fixed Radio Image remove class bug - submitted by designst
490
+ * Added new typography fields - submitted by darknailblue
491
+ * Added dynamic CSS support for new typography fields.
492
+ * Added new filters to typography fields, including low/high range & unit types.
493
+
494
+ = 2.0.9 =
495
+ * Fixed the issue where the Textarea Simple and CSS option types were mysteriously being ran through wpautop.
496
+ * Added missing class setting to Textarea, Textarea Simple, & CSS option types.
497
+ * Fixed theme-options.php exported array where label values were not correct.
498
+ * Change GET to POST for all AJAX calls to fix a bug where some servers would not allow long strings to be passed in GET variables.
499
+ * Added the 'ot_after_validate_setting' filter to the validation function.
500
+ * Added $field_id to the ot_validate_setting() for more precise filtering.
501
+ * Added the ot_reverse_wpautop() function that you can run input through just incase you need it.
502
+ * Updated the docs to include information on why WYSIWYG editors are not allowed in meta boxes and that they revert to a Textarea Simple.
503
+ * Update option-tree.pot file.
504
+
505
+ = 2.0.8 =
506
+ * Add auto import for backwards compatibility of old 1.x files.
507
+ * Added the ability to export settings into a fully functional theme-options.php.
508
+ * Fix typo in docs regarding the filter demo code.
509
+ * Removed slashes in the section and contextual help titles.
510
+ * Made colorpicker input field alignment more cross browser compatible.
511
+
512
+ = 2.0.7 =
513
+ * Fixed the load order to be compatible with 1.x version themes that think the get_option_tree() function doesn't exist yet.
514
+ * Tested and compatible with Cudazi themes, but the nag message is still visible.
515
+
516
+ = 2.0.6 =
517
+ * Run the 'option_tree' array through validation when importing data and layouts.
518
+ * Fix a bug where list items and sliders were not allowing the user to select the input field.
519
+ * Add a filter that allows you to not load resources for meta boxes if you're not going to use them.
520
+ * Update option-tree.pot file.
521
+
522
+ = 2.0.5 =
523
+ * Change the way the 'option_tree_settings' array validates. Strip out those damn slashes!
524
+
525
+ = 2.0.4 =
526
+ * Run the 'option_tree' array through validation when upgrading from the 1.0 branch to the 2.0 branch for the first time.
527
+ * Fix a typo in the slider array where textarea's were not saving the first time due to an incorrect array key.
528
+
529
+ = 2.0.3 =
530
+ * Had an incorrect conditional statement causing an issue where the plugin was attempting to create the 'option-tree' image attachment page, even though it was already created.
531
+ * The above also fixed a conflict with 'The Events Calendar' plugin.
532
+
533
+ = 2.0.2 =
534
+ * Added I18n support, let the translations begin. The option-tree.pot file is inside the languages directory.
535
+ * Trim whitespace on imported choices array.
536
+ * Fixed the CSS insert function not having a value to save.
537
+
538
+ = 2.0.1 =
539
+ * Import from table was not mapping settings correctly. It is now.
540
+
541
+ = 2.0 =
542
+ * Complete rewrite form the ground up.
543
+ * Better Theme Options UI Builder.
544
+ * New in-plugin documentation.
545
+ * Brand new responsive UI.
546
+ * Add new option types, most notable the List Item which should eventually replace the Slider.
547
+ * Added the simpler ot_get_option() function to eventually replace get_option_tree().
548
+ * Added support for Meta Boxes.
549
+ * Added Theme Mode where you can now include the plugin directly in your theme.
550
+ * Better validation on saved data.
551
+ * Simplified the import process.
552
+ * Added support for contextual help.
553
+ * Permanently move the Theme Option to the Appearance tab.
554
+ * Added a ton of filters.
555
+ * Made huge improvements to the code base and tested rigorously.
556
+
557
+ = 1.1.8.1 =
558
+ * Removed get_option_tree() in the WordPress admin area due to theme conflicts.
559
+ * Removed demo files in the assets folder at the request of WordPress
560
+
561
+ = 1.1.8 =
562
+ * Fixed scrolling issue on extra tall pages
563
+ * Added ability to show/hide settings & documentation via the User Profile page.
564
+ * Added Background option type.
565
+ * Added Typography option type.
566
+ * Added CSS option type.
567
+ * Better looking selects with 1=Yes,2=No where '1' is the value and 'Yes' is the text in the select.
568
+ * Made the AJAX message CSS more prominent.
569
+ * functions.load.php will now only load option type functions if viewing an OT admin page.
570
+ * Deregistered the custom jQuery UI in the 'Cispm Mail Contact' plugin when viewing an OptionTree page.
571
+ * Can now save layouts from the Theme Options page.
572
+ * You can now change the slider fields by targeting a specific "Option Key"
573
+ * Modified upload for situations where you manually enter a relative path
574
+ * Allow get_option_tree() function to be used in WP admin
575
+ * Changed permissions to edit_theme_options
576
+
577
+ = 1.1.7.1 =
578
+ * Revert functions.load.php, will fix and update in next version
579
+
580
+ = 1.1.7 =
581
+ * Added layout (theme variation) support with save/delete/activate/import/export capabilities.
582
+ * Allow layout change on Theme Options page.
583
+ * Full Multisite compatibility by manually adding xml mime type for import options.
584
+ * Replaced eregi() with preg_match() for 5.3+ compatibility.
585
+ * Changed test data in the assets directory for new layout option.
586
+ * Made it so when the slider & upload image changes it's reflected on blur.
587
+ * Gave the slider image an upload button.
588
+ * Added do_action('option_tree_import_data') to option_tree_import_data() function before exit.
589
+ * Added do_action('option_tree_array_save') to option_tree_array_save() function before exit.
590
+ * Added do_action('option_tree_save_layout') to option_tree_save_layout() function before exit.
591
+ * Added do_action('option_tree_delete_layout') to option_tree_delete_layout() function before exit.
592
+ * Added do_action('option_tree_activate_layout') to option_tree_activate_layout() function before exit.
593
+ * Added do_action('option_tree_import_layout') to option_tree_import_layout() function before redirect.
594
+ * Added do_action('option_tree_admin_header') hook before all admin pages.
595
+ * Fixed bug where users could add a color without a hash.
596
+ * Only load option type function on Theme Options page
597
+ * Loading resources with absolute paths, no longer relative.
598
+ * Fixed a bug with uploader creating extra option-tree draft pages.
599
+ * Fixed slider toggle bug, now the sliders close when you open another or create new slide.
600
+
601
+ = 1.1.6 =
602
+ * Theme Integration added.
603
+ * Made the upload XML file openbase_dir compliant.
604
+
605
+ = 1.1.5 =
606
+ * Fixed multiple sliders issue
607
+
608
+ = 1.1.4 =
609
+ * Patch for get_option_tree() $is_array being false and still returning an array
610
+
611
+ = 1.1.3 =
612
+ * Added Slider option type with filter for changing the optional fields
613
+ * Fixed the text displayed for Measurement option type after options are reset
614
+ * Added filter to measurement units
615
+ * Code cleanup in the option_tree_array_save() function
616
+ * Fixed double quotes on front-end display
617
+
618
+ = 1.1.2 =
619
+ * Fixed double quotes in Textarea option type
620
+ * Added Measurement option type for CSS values
621
+ * Fixed Post option type only returning 5 items
622
+ * Added a scrolling window for checkboxes > 10
623
+
624
+ = 1.1.1 =
625
+ * Fixed the 'remove' icon from showing when nothing's uploaded
626
+
627
+ = 1.1 =
628
+ * Fixed the Undefined index: notices when WP_DEBUG is set to true
629
+
630
+ = 1.0.0 =
631
+ * Initial version
632
+
633
+ == Upgrade Notice ==
634
+
635
+ = 2.7.0 =
636
+ All custom setting types must use the `ot_validate_setting_input_safe` filter to sanitize user input data. OptionTree will attempt to sanitize the data, but data loss could happen with custom setting types when saving — so please update them. Additionally, please install OptionTree on a test server, or backup your database, before upgrading your live site. This version contains breaking changes!
637
+
638
+ = 2.3.0 =
639
+ As with each major release, please install OptionTree on a test server before upgrading your live site.
640
+
641
+ = 2.1.4 =
642
+ 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.
643
+
644
+ = 2.0.16 =
645
+ 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.
646
+
647
+ = 2.0.12 =
648
+ The plugin has undertaken a complete rebuild! If you are not the theme developer, I urge you to contact that person before you upgrade and ask them to test the themes compatibility.
649
+
650
+ = 1.1.8.1 =
651
+ Removed get_option_tree() in the WordPress admin area due to theme conflicts.
652
+
653
+ = 1.1.8 =
654
+ Added Typography, Background, & CSS option types. Lots of way to extend them, as well.
655
+
656
+ = 1.1.7 =
657
+ Lots of additions, none critical just fun. Added layouts & upload to slider. As well, started including action hooks for extending and integrating with other plugins.
658
+
659
+ = 1.1.6 =
660
+ Added theme integration for developers. It's now possible to have a default XML file included in your theme to populate the theme options and hide the settings and docs pages. Read more about this in the plugins built in documentation.
661
+
662
+ = 1.1.5 =
663
+ Having multiple sliders caused a naming collision in the JavaScript and is now fixed. Upgrade ASAP to have multiple sliders available in the UI.
664
+
665
+ = 1.1.4 =
666
+ Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme.