Version Description
- Hotfix - Fixed subfolder compatibility with versions of Windows that use backslashes instead of forward slashes. Contributors via github @primozcigler and @valendesigns.
- Hotfix - Fixed missing text domain in demo files. Contributors via github @jetonr.
- Hotfix - Added filter
ot_migrate_settings_id
to migrate themes that usedoption_tree_settings
and now use a custom settings ID. - Hotfix - Added filter
ot_migrate_options_id
to migrate themes that usedoption_tree
and now use a custom options ID. - Hotfix - Added filter
ot_migrate_layouts_id
to migrate themes that usedoption_tree_layouts
and now use a custom layouts ID.
Download this release
Release Info
Developer | valendesigns |
Plugin | OptionTree |
Version | 2.3.3 |
Comparing to | |
See all releases |
Code changes from version 2.3.2 to 2.3.3
- assets/theme-mode/demo-meta-boxes.php +1 -1
- assets/theme-mode/demo-theme-options.php +1 -1
- includes/ot-functions-admin.php +95 -1
- languages/option-tree.po +3 -3
- ot-loader.php +16 -4
- readme.txt +8 -1
assets/theme-mode/demo-meta-boxes.php
CHANGED
@@ -68,7 +68,7 @@ function custom_meta_boxes() {
|
|
68 |
'label' => __( 'Textarea', 'theme-text-domain' ),
|
69 |
'id' => 'demo_textarea',
|
70 |
'type' => 'textarea',
|
71 |
-
'desc' => __( 'This is a demo Textarea field.' )
|
72 |
)
|
73 |
)
|
74 |
);
|
68 |
'label' => __( 'Textarea', 'theme-text-domain' ),
|
69 |
'id' => 'demo_textarea',
|
70 |
'type' => 'textarea',
|
71 |
+
'desc' => __( 'This is a demo Textarea field.', 'theme-text-domain' )
|
72 |
)
|
73 |
)
|
74 |
);
|
assets/theme-mode/demo-theme-options.php
CHANGED
@@ -57,7 +57,7 @@ function custom_theme_options() {
|
|
57 |
array(
|
58 |
'id' => 'demo_category_checkbox',
|
59 |
'label' => __( 'Category Checkbox', 'theme-text-domain' ),
|
60 |
-
'desc' => __( 'The Category Checkbox option type displays a list of category IDs. It allows the user to check multiple category IDs and will return that value as an array for use in a custom function or loop.' ),
|
61 |
'std' => '',
|
62 |
'type' => 'category-checkbox',
|
63 |
'section' => 'option_types',
|
57 |
array(
|
58 |
'id' => 'demo_category_checkbox',
|
59 |
'label' => __( 'Category Checkbox', 'theme-text-domain' ),
|
60 |
+
'desc' => __( 'The Category Checkbox option type displays a list of category IDs. It allows the user to check multiple category IDs and will return that value as an array for use in a custom function or loop.', 'theme-text-domain' ),
|
61 |
'std' => '',
|
62 |
'type' => 'category-checkbox',
|
63 |
'section' => 'option_types',
|
includes/ot-functions-admin.php
CHANGED
@@ -4294,5 +4294,99 @@ function ot_wpml_unregister_string( $id ) {
|
|
4294 |
|
4295 |
}
|
4296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4297 |
/* End of file ot-functions-admin.php */
|
4298 |
-
/* Location: ./includes/ot-functions-admin.php */
|
4294 |
|
4295 |
}
|
4296 |
|
4297 |
+
/**
|
4298 |
+
* Maybe migrate Settings
|
4299 |
+
*
|
4300 |
+
* @return void
|
4301 |
+
*
|
4302 |
+
* @access public
|
4303 |
+
* @since 2.3.3
|
4304 |
+
*/
|
4305 |
+
if ( ! function_exists( 'ot_maybe_migrate_settings' ) ) {
|
4306 |
+
|
4307 |
+
function ot_maybe_migrate_settings() {
|
4308 |
+
|
4309 |
+
// Filter the ID to migrate from
|
4310 |
+
$settings_id = apply_filters( 'ot_migrate_settings_id', '' );
|
4311 |
+
|
4312 |
+
// Attempt to migrate Settings
|
4313 |
+
if ( ! empty( $settings_id ) && get_option( ot_settings_id() ) === false && ot_settings_id() !== $settings_id ) {
|
4314 |
+
|
4315 |
+
// Old settings
|
4316 |
+
$settings = get_option( $settings_id );
|
4317 |
+
|
4318 |
+
// Check for array keys
|
4319 |
+
if ( isset( $settings['sections'] ) && isset( $settings['settings'] ) ) {
|
4320 |
+
|
4321 |
+
update_option( ot_settings_id(), $settings );
|
4322 |
+
|
4323 |
+
}
|
4324 |
+
|
4325 |
+
}
|
4326 |
+
|
4327 |
+
}
|
4328 |
+
|
4329 |
+
}
|
4330 |
+
|
4331 |
+
/**
|
4332 |
+
* Maybe migrate Option
|
4333 |
+
*
|
4334 |
+
* @return void
|
4335 |
+
*
|
4336 |
+
* @access public
|
4337 |
+
* @since 2.3.3
|
4338 |
+
*/
|
4339 |
+
if ( ! function_exists( 'ot_maybe_migrate_options' ) ) {
|
4340 |
+
|
4341 |
+
function ot_maybe_migrate_options() {
|
4342 |
+
|
4343 |
+
// Filter the ID to migrate from
|
4344 |
+
$options_id = apply_filters( 'ot_migrate_options_id', '' );
|
4345 |
+
|
4346 |
+
// Attempt to migrate Theme Options
|
4347 |
+
if ( ! empty( $options_id ) && get_option( ot_options_id() ) === false && ot_options_id() !== $options_id ) {
|
4348 |
+
|
4349 |
+
// Old options
|
4350 |
+
$options = get_option( $options_id );
|
4351 |
+
|
4352 |
+
// Migrate to new ID
|
4353 |
+
update_option( ot_options_id(), $options );
|
4354 |
+
|
4355 |
+
}
|
4356 |
+
|
4357 |
+
}
|
4358 |
+
|
4359 |
+
}
|
4360 |
+
|
4361 |
+
/**
|
4362 |
+
* Maybe migrate Layouts
|
4363 |
+
*
|
4364 |
+
* @return void
|
4365 |
+
*
|
4366 |
+
* @access public
|
4367 |
+
* @since 2.3.3
|
4368 |
+
*/
|
4369 |
+
if ( ! function_exists( 'ot_maybe_migrate_layouts' ) ) {
|
4370 |
+
|
4371 |
+
function ot_maybe_migrate_layouts() {
|
4372 |
+
|
4373 |
+
// Filter the ID to migrate from
|
4374 |
+
$layouts_id = apply_filters( 'ot_migrate_layouts_id', '' );
|
4375 |
+
|
4376 |
+
// Attempt to migrate Layouts
|
4377 |
+
if ( ! empty( $layouts_id ) && get_option( ot_layouts_id() ) === false && ot_layouts_id() !== $layouts_id ) {
|
4378 |
+
|
4379 |
+
// Old options
|
4380 |
+
$layouts = get_option( $layouts_id );
|
4381 |
+
|
4382 |
+
// Migrate to new ID
|
4383 |
+
update_option( ot_layouts_id(), $layouts );
|
4384 |
+
|
4385 |
+
}
|
4386 |
+
|
4387 |
+
}
|
4388 |
+
|
4389 |
+
}
|
4390 |
+
|
4391 |
/* End of file ot-functions-admin.php */
|
4392 |
+
/* Location: ./includes/ot-functions-admin.php */
|
languages/option-tree.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: OptionTree\n"
|
4 |
-
"POT-Creation-Date: 2014-
|
5 |
-
"PO-Revision-Date: 2014-
|
6 |
"Last-Translator: Derek Herman <derek@valendesigns.com>\n"
|
7 |
"Language-Team: Valen Designs\n"
|
8 |
"Language: English\n"
|
@@ -17,7 +17,7 @@ msgstr ""
|
|
17 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18 |
"X-Poedit-SearchPath-0: ..\n"
|
19 |
|
20 |
-
#: ../ot-loader.php:
|
21 |
#: ../includes/ot-functions-admin.php:623
|
22 |
#: ../includes/ot-functions-docs-page.php:371
|
23 |
#: ../includes/ot-functions-settings-page.php:170
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: OptionTree\n"
|
4 |
+
"POT-Creation-Date: 2014-03-03 18:29-0800\n"
|
5 |
+
"PO-Revision-Date: 2014-03-03 18:29-0800\n"
|
6 |
"Last-Translator: Derek Herman <derek@valendesigns.com>\n"
|
7 |
"Language-Team: Valen Designs\n"
|
8 |
"Language: English\n"
|
17 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18 |
"X-Poedit-SearchPath-0: ..\n"
|
19 |
|
20 |
+
#: ../ot-loader.php:682 ../assets/theme-mode/demo-theme-options.php:624
|
21 |
#: ../includes/ot-functions-admin.php:623
|
22 |
#: ../includes/ot-functions-docs-page.php:371
|
23 |
#: ../includes/ot-functions-settings-page.php:170
|
ot-loader.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: OptionTree
|
4 |
* Plugin URI: http://wp.envato.com
|
5 |
* Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
6 |
-
* Version: 2.3.
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
* License: GPLv3
|
@@ -142,7 +142,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
142 |
/**
|
143 |
* Current Version number.
|
144 |
*/
|
145 |
-
define( 'OT_VERSION', '2.3.
|
146 |
|
147 |
/**
|
148 |
* For developers: Theme mode.
|
@@ -273,11 +273,11 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
273 |
define( 'OT_URL', plugin_dir_url( __FILE__ ) );
|
274 |
} else {
|
275 |
if ( true == OT_CHILD_THEME_MODE ) {
|
276 |
-
$path = ltrim( end( @explode(
|
277 |
define( 'OT_DIR', trailingslashit( trailingslashit( get_stylesheet_directory() ) . $path ) );
|
278 |
define( 'OT_URL', trailingslashit( trailingslashit( get_stylesheet_directory_uri() ) . $path ) );
|
279 |
} else {
|
280 |
-
$path = ltrim( end( @explode(
|
281 |
define( 'OT_DIR', trailingslashit( trailingslashit( get_template_directory() ) . $path ) );
|
282 |
define( 'OT_URL', trailingslashit( trailingslashit( get_template_directory_uri() ) . $path ) );
|
283 |
}
|
@@ -380,6 +380,18 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
380 |
* @since 2.0
|
381 |
*/
|
382 |
private function hooks() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
|
384 |
/* load the Meta Box assets */
|
385 |
if ( OT_META_BOXES == true ) {
|
3 |
* Plugin Name: OptionTree
|
4 |
* Plugin URI: http://wp.envato.com
|
5 |
* Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
6 |
+
* Version: 2.3.3
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
* License: GPLv3
|
142 |
/**
|
143 |
* Current Version number.
|
144 |
*/
|
145 |
+
define( 'OT_VERSION', '2.3.3' );
|
146 |
|
147 |
/**
|
148 |
* For developers: Theme mode.
|
273 |
define( 'OT_URL', plugin_dir_url( __FILE__ ) );
|
274 |
} else {
|
275 |
if ( true == OT_CHILD_THEME_MODE ) {
|
276 |
+
$path = ltrim( end( @explode( get_stylesheet(), str_replace( '\\', '/', dirname( __FILE__ ) ) ) ), '/' );
|
277 |
define( 'OT_DIR', trailingslashit( trailingslashit( get_stylesheet_directory() ) . $path ) );
|
278 |
define( 'OT_URL', trailingslashit( trailingslashit( get_stylesheet_directory_uri() ) . $path ) );
|
279 |
} else {
|
280 |
+
$path = ltrim( end( @explode( get_template(), str_replace( '\\', '/', dirname( __FILE__ ) ) ) ), '/' );
|
281 |
define( 'OT_DIR', trailingslashit( trailingslashit( get_template_directory() ) . $path ) );
|
282 |
define( 'OT_URL', trailingslashit( trailingslashit( get_template_directory_uri() ) . $path ) );
|
283 |
}
|
380 |
* @since 2.0
|
381 |
*/
|
382 |
private function hooks() {
|
383 |
+
|
384 |
+
// Attempt to migrate the settings
|
385 |
+
if ( function_exists( 'ot_maybe_migrate_settings' ) )
|
386 |
+
add_action( 'init', 'ot_maybe_migrate_settings', 1 );
|
387 |
+
|
388 |
+
// Attempt to migrate the Options
|
389 |
+
if ( function_exists( 'ot_maybe_migrate_options' ) )
|
390 |
+
add_action( 'init', 'ot_maybe_migrate_options', 1 );
|
391 |
+
|
392 |
+
// Attempt to migrate the Layouts
|
393 |
+
if ( function_exists( 'ot_maybe_migrate_layouts' ) )
|
394 |
+
add_action( 'init', 'ot_maybe_migrate_layouts', 1 );
|
395 |
|
396 |
/* load the Meta Box assets */
|
397 |
if ( OT_META_BOXES == true ) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bit.ly/NuXI3T
|
|
4 |
Tags: options, theme options, meta boxes
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 2.3.
|
8 |
License: GPLv3
|
9 |
|
10 |
Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
@@ -106,6 +106,13 @@ There sure is, and I'm glad you asked. Download and activate the [OptionTree The
|
|
106 |
|
107 |
== Changelog ==
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
= 2.3.2 =
|
110 |
* Hotfix - Fixed an issue with the `ot_create_media_post` function creating multiple `option-tree` posts.
|
111 |
* Hotfix - Change the icon used by the layout management option type to differentiate it from the edit button.
|
4 |
Tags: options, theme options, meta boxes
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 2.3.3
|
8 |
License: GPLv3
|
9 |
|
10 |
Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
106 |
|
107 |
== Changelog ==
|
108 |
|
109 |
+
= 2.3.3 =
|
110 |
+
* Hotfix - Fixed subfolder compatibility with versions of Windows that use backslashes instead of forward slashes. Contributors via github @primozcigler and @valendesigns.
|
111 |
+
* Hotfix - Fixed missing text domain in demo files. Contributors via github @jetonr.
|
112 |
+
* Hotfix - Added filter `ot_migrate_settings_id` to migrate themes that used `option_tree_settings` and now use a custom settings ID.
|
113 |
+
* Hotfix - Added filter `ot_migrate_options_id` to migrate themes that used `option_tree` and now use a custom options ID.
|
114 |
+
* Hotfix - Added filter `ot_migrate_layouts_id` to migrate themes that used `option_tree_layouts` and now use a custom layouts ID.
|
115 |
+
|
116 |
= 2.3.2 =
|
117 |
* Hotfix - Fixed an issue with the `ot_create_media_post` function creating multiple `option-tree` posts.
|
118 |
* Hotfix - Change the icon used by the layout management option type to differentiate it from the edit button.
|