1 === OptionTree === |
1 === OptionTree === |
2 Contributors: valendesigns |
2 Contributors: valendesigns |
3 Donate link: http://bit.ly/NuXI3T |
3 Tags: options, theme options, meta boxes, settings |
4 Tags: options, theme options, meta boxes |
|
5 Requires at least: 3.8 |
4 Requires at least: 3.8 |
6 Tested up to: 4.4 |
5 Tested up to: 5.2 |
7 Stable tag: 2.6.0 |
6 Stable tag: 2.7.3 |
8 License: GPLv3 |
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 |
9 |
11 |
10 Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. |
12 Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. |
11 |
13 |
12 == Description == |
14 == Description == |
13 |
15 |
90 1. Download the latest version of OptionTree and unarchive the `.zip` directory. |
92 1. Download the latest version of OptionTree and unarchive the `.zip` directory. |
91 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/`. |
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/`. |
92 1. You must deactivate and/or delete the plugin version of OptionTree. |
94 1. You must deactivate and/or delete the plugin version of OptionTree. |
93 1. Add the following code to the beginning of your `functions.php`. |
95 1. Add the following code to the beginning of your `functions.php`. |
94 |
96 |
95 `/** |
97 ``` |
|
98 /** |
96 * Required: set 'ot_theme_mode' filter to true. |
99 * Required: set 'ot_theme_mode' filter to true. |
97 */ |
100 */ |
98 add_filter( 'ot_theme_mode', '__return_true' ); |
101 add_filter( 'ot_theme_mode', '__return_true' ); |
99 |
102 |
100 /** |
103 /** |
101 * Required: include OptionTree. |
104 * Required: include OptionTree. |
102 */ |
105 */ |
103 require( trailingslashit( get_template_directory() ) . 'option-tree/ot-loader.php' );` |
106 require( trailingslashit( get_template_directory() ) . 'option-tree/ot-loader.php' ); |
|
107 ``` |
104 |
108 |
105 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. |
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. |
106 |
110 |
107 == Frequently Asked Questions == |
111 == Frequently Asked Questions == |
108 |
112 |
109 = Is there a demo theme I can install? = |
113 = Is there a demo theme I can install? = |
110 |
114 |
111 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. |
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. |
112 |
|
113 = Why are my translation files not loading? = |
|
114 |
|
115 It is important to note that when you use OptionTree as a plugin, you must store your language files in the `option-tree/languages` directory and use file names like `option-tree-es_ES.mo` & `option-tree-es_ES.po`. However, when using OptionTree in Theme Mode you must also create a `theme-mode` directory inside the `option-tree/languages` directory and store your files there with names like `es_ES.mo` & `es_ES.po`. This is due to the different naming conventions of the `load_plugin_textdomain()` and `load_theme_textdomain()` functions. |
|
116 |
116 |
117 = I get errors or a blank screen when I activate the plugin. What's the deal? = |
117 = I get errors or a blank screen when I activate the plugin. What's the deal? = |
118 |
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. |
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 |
120 |
123 1. Theme Options |
123 1. Theme Options |
124 2. Settings |
124 2. Settings |
125 3. Documentation |
125 3. Documentation |
126 |
126 |
127 == Changelog == |
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 |
128 |
155 |
129 = 2.6.0 = |
156 = 2.6.0 = |
130 * Fix a reflected XSS vulnerability with the `add_list_item` & `add_social_links` Ajax requests. |
157 * Fix a reflected XSS vulnerability with the `add_list_item` & `add_social_links` Ajax requests. |
131 * Fix the Google Fonts URL so it passed the W3 Validator. props @BassemN |
158 * Fix the Google Fonts URL so it passed the W3 Validator. props @BassemN |
132 * Fix `global_admin_css` so it's only enqueued when needed. |
159 * Fix `global_admin_css` so it's only enqueued when needed. |
603 = 1.0.0 = |
630 = 1.0.0 = |
604 * Initial version |
631 * Initial version |
605 |
632 |
606 == Upgrade Notice == |
633 == Upgrade Notice == |
607 |
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 |
608 = 2.3.0 = |
638 = 2.3.0 = |
609 As with each major release, please install OptionTree on a test server before upgrading your live site. |
639 As with each major release, please install OptionTree on a test server before upgrading your live site. |
610 |
640 |
611 = 2.1.4 = |
641 = 2.1.4 = |
612 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. |
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. |