Version Description
- Added filters to the array that builds the Theme Option UI.
- Added .format-setting-wrap div to allow for complex CSS layouts.
- Added better namespacing for the Colorpicker option type.
- Fixed theme-options.php export where it was adding an extra comma.
Download this release
Release Info
Developer | valendesigns |
Plugin | OptionTree |
Version | 2.0.11 |
Comparing to | |
See all releases |
Code changes from version 2.0.10 to 2.0.11
- assets/css/ot-admin.css +25 -24
- assets/js/ot-colorpicker.js +1 -1
- includes/ot-functions-admin.php +5 -5
- includes/ot-settings-api.php +13 -9
- includes/ot-ui-theme-options.php +5 -5
- ot-loader.php +2 -2
- readme.txt +8 -2
assets/css/ot-admin.css
CHANGED
@@ -138,6 +138,7 @@ input:focus.option-tree-ui-input { border-color: #bbb !important; }
|
|
138 |
.wp-editor-area { display: block;}
|
139 |
.textarea,
|
140 |
.ot-metabox-wrapper textarea { width: 99.9%; border: 1px solid #ccc; font-family: Consolas, Monaco, monospace; line-height: 150%; outline: 0; padding: 10px; resize: vertical; }
|
|
|
141 |
.ot-metabox-wrapper .wp-editor-container { border: none; }
|
142 |
.ot-metabox-wrapper textarea:focus { border-color: #bbb !important; }
|
143 |
|
@@ -242,30 +243,30 @@ select.option-tree-ui-select option { padding: 3px 15px !important; }
|
|
242 |
---------------------------------------------------*/
|
243 |
.option-tree-ui-colorpicker-input-wrap{ margin-right: 53px; position: relative; width: auto; }
|
244 |
.format-settings .cp_box { background: #f1f1f1; border: 1px solid #ccc; bottom: 5px; height: 27px; position: absolute; right: -53px; width: 46px; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; }
|
245 |
-
.
|
246 |
-
.colorpicker_color
|
247 |
-
.colorpicker_color div
|
248 |
-
.colorpicker_color div div
|
249 |
-
.colorpicker_hue
|
250 |
-
.colorpicker_hue div
|
251 |
-
.colorpicker_new_color
|
252 |
-
.colorpicker_current_color
|
253 |
-
.
|
254 |
-
.colorpicker_hex
|
255 |
-
.colorpicker_hex input
|
256 |
-
.colorpicker_field
|
257 |
-
.colorpicker_field span
|
258 |
-
.colorpicker_rgb_r
|
259 |
-
.colorpicker_rgb_g
|
260 |
-
.colorpicker_rgb_b
|
261 |
-
.colorpicker_hsb_h
|
262 |
-
.colorpicker_hsb_s
|
263 |
-
.colorpicker_hsb_b
|
264 |
-
.colorpicker_submit
|
265 |
-
.colorpicker_focus
|
266 |
-
.colorpicker_hex.colorpicker_focus
|
267 |
-
.colorpicker_submit.colorpicker_focus { background-position: bottom; }
|
268 |
-
.colorpicker_slider
|
269 |
|
270 |
@media not screen and (1) {
|
271 |
.format-settings .cp_box { height: 26px; }
|
138 |
.wp-editor-area { display: block;}
|
139 |
.textarea,
|
140 |
.ot-metabox-wrapper textarea { width: 99.9%; border: 1px solid #ccc; font-family: Consolas, Monaco, monospace; line-height: 150%; outline: 0; padding: 10px; resize: vertical; }
|
141 |
+
#contextual-help-setting .textarea { width: 99.75%; }
|
142 |
.ot-metabox-wrapper .wp-editor-container { border: none; }
|
143 |
.ot-metabox-wrapper textarea:focus { border-color: #bbb !important; }
|
144 |
|
243 |
---------------------------------------------------*/
|
244 |
.option-tree-ui-colorpicker-input-wrap{ margin-right: 53px; position: relative; width: auto; }
|
245 |
.format-settings .cp_box { background: #f1f1f1; border: 1px solid #ccc; bottom: 5px; height: 27px; position: absolute; right: -53px; width: 46px; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; }
|
246 |
+
.ot_colorpicker { width: 342px; height: 170px; overflow: hidden; position: absolute; background: #fafafa url(../images/colorpicker/color_bg.png); font-family: Arial, Helvetica, sans-serif; display: none; border: 1px solid #bbb; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.05); box-shadow:0 1px 3px rgba(0,0,0,0.05); z-index: 100; }
|
247 |
+
.ot_colorpicker .colorpicker_color { width: 150px; height: 150px; left: 10px; top: 10px; position: absolute; background: #f00; overflow: hidden; cursor: crosshair; }
|
248 |
+
.ot_colorpicker .colorpicker_color div{ position: absolute; top: 0; left: 0; width: 150px; height: 150px; background: url(../images/colorpicker/color_overlay.png); }
|
249 |
+
.ot_colorpicker .colorpicker_color div div { position: absolute; top: 0; left: 0; width: 11px; height: 11px; overflow: hidden; background: url(../images/colorpicker/color_select.gif); margin: -5px 0 0 -5px; }
|
250 |
+
.ot_colorpicker .colorpicker_hue { position: absolute; top: 10px; left: 164px; width: 35px; height: 150px; cursor: n-resize; }
|
251 |
+
.ot_colorpicker .colorpicker_hue div { position: absolute; width: 35px; height: 9px; overflow: hidden; background: url(../images/colorpicker/color_indicator.png) left top; margin: -5px 0 0 0; }
|
252 |
+
.ot_colorpicker .colorpicker_new_color { position: absolute; width: 60px; height: 30px; right: 80px; top: 10px; background: #f00; }
|
253 |
+
.ot_colorpicker .colorpicker_current_color { position: absolute; width: 60px; height: 30px; right: 10px; top: 10px; background: #f00; }
|
254 |
+
.ot_colorpicker input { background-color: transparent !important; border: 1px solid transparent !important; position: absolute !important; font-size: 10px !important; font-family: Arial, Helvetica, sans-serif !important; color: #666 !important; top: 0px !important; right: 12px !important; text-align: right !important; margin: 0 !important; padding: 0 !important; height: 22px !important;line-height: 22px !important; }
|
255 |
+
.ot_colorpicker .colorpicker_hex { position: absolute; width: 72px; height: 22px; background: url(../images/colorpicker/color_hex.png) top; left: 201px; bottom: 9px; }
|
256 |
+
.ot_colorpicker .colorpicker_hex input { left: 13px; height: 22px; line-height: 22px; padding: 10px; }
|
257 |
+
.ot_colorpicker .colorpicker_field { height: 22px; width: 62px; background-position: top; position: absolute; }
|
258 |
+
.ot_colorpicker .colorpicker_field span { position: absolute; width: 12px; height: 22px; overflow: hidden; top: 0; right: 0; cursor: n-resize; }
|
259 |
+
.ot_colorpicker .colorpicker_rgb_r { background-image: url(../images/colorpicker/color_rgb_r.png); top: 49px; left: 201px; }
|
260 |
+
.ot_colorpicker .colorpicker_rgb_g { background-image: url(../images/colorpicker/color_rgb_g.png); top: 79px; left: 201px; }
|
261 |
+
.ot_colorpicker .colorpicker_rgb_b { background-image: url(../images/colorpicker/color_rgb_b.png); top: 109px; left: 201px; }
|
262 |
+
.ot_colorpicker .colorpicker_hsb_h { background-image: url(../images/colorpicker/color_hsb_h.png); top: 49px; right: 9px; }
|
263 |
+
.ot_colorpicker .colorpicker_hsb_s { background-image: url(../images/colorpicker/color_hsb_s.png); top: 79px; right: 9px }
|
264 |
+
.ot_colorpicker .colorpicker_hsb_b { background-image: url(../images/colorpicker/color_hsb_b.png); top: 109px; right: 9px; }
|
265 |
+
.ot_colorpicker .colorpicker_submit { position: absolute; width: 16px; height: 16px; background: url(../images/colorpicker/color_wheel.png) top; right: 10px; bottom: 10px; overflow: hidden; }
|
266 |
+
.ot_colorpicker .colorpicker_focus { background-position: center; }
|
267 |
+
.ot_colorpicker .colorpicker_hex.colorpicker_focus { background-position: bottom; }
|
268 |
+
.ot_colorpicker .colorpicker_submit.colorpicker_focus { background-position: bottom; }
|
269 |
+
.ot_colorpicker .colorpicker_slider { background-position: bottom; }
|
270 |
|
271 |
@media not screen and (1) {
|
272 |
.format-settings .cp_box { height: 26px; }
|
assets/js/ot-colorpicker.js
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
inAction,
|
12 |
charMin = 65,
|
13 |
visible,
|
14 |
-
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
15 |
defaults = {
|
16 |
eventName: 'click',
|
17 |
onShow: function () {},
|
11 |
inAction,
|
12 |
charMin = 65,
|
13 |
visible,
|
14 |
+
tpl = '<div class="ot_colorpicker colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
15 |
defaults = {
|
16 |
eventName: 'click',
|
17 |
onShow: function () {},
|
includes/ot-functions-admin.php
CHANGED
@@ -864,7 +864,8 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
864 |
),";
|
865 |
}
|
866 |
$help = substr_replace( $help, '' , -1 );
|
867 |
-
$contextual_help = "
|
|
|
868 |
),";
|
869 |
}
|
870 |
|
@@ -877,9 +878,8 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
877 |
/* check that $contexual_help has a value and add to $build_settings */
|
878 |
if ( '' != $contextual_help ) {
|
879 |
$build_settings.= "
|
880 |
-
'contextual_help' => array(
|
881 |
-
|
882 |
-
)";
|
883 |
}
|
884 |
|
885 |
/* build sections */
|
@@ -898,7 +898,7 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
898 |
|
899 |
/* check that $sections has a value and add to $build_settings */
|
900 |
if ( '' != $sections ) {
|
901 |
-
$build_settings.= "
|
902 |
'sections' => array( $sections
|
903 |
)";
|
904 |
}
|
864 |
),";
|
865 |
}
|
866 |
$help = substr_replace( $help, '' , -1 );
|
867 |
+
$contextual_help = "
|
868 |
+
'content' => array( $help
|
869 |
),";
|
870 |
}
|
871 |
|
878 |
/* check that $contexual_help has a value and add to $build_settings */
|
879 |
if ( '' != $contextual_help ) {
|
880 |
$build_settings.= "
|
881 |
+
'contextual_help' => array( $contextual_help
|
882 |
+
),";
|
|
|
883 |
}
|
884 |
|
885 |
/* build sections */
|
898 |
|
899 |
/* check that $sections has a value and add to $build_settings */
|
900 |
if ( '' != $sections ) {
|
901 |
+
$build_settings.= "
|
902 |
'sections' => array( $sections
|
903 |
)";
|
904 |
}
|
includes/ot-settings-api.php
CHANGED
@@ -765,17 +765,21 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
765 |
|
766 |
echo '<div id="setting_' . $field['id'] . '" class="format-settings">';
|
767 |
|
768 |
-
|
769 |
|
770 |
-
|
771 |
-
|
772 |
-
echo '<
|
773 |
-
|
774 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
|
776 |
-
|
777 |
-
|
778 |
-
call_user_func( $field['callback'], $field['args'] );
|
779 |
|
780 |
echo '</div>';
|
781 |
|
765 |
|
766 |
echo '<div id="setting_' . $field['id'] . '" class="format-settings">';
|
767 |
|
768 |
+
echo '<div class="format-setting-wrap">';
|
769 |
|
770 |
+
if ( $field['args']['type'] != 'textblock' ) {
|
771 |
+
|
772 |
+
echo '<div class="format-setting-label">';
|
773 |
+
|
774 |
+
echo '<h3 class="label">' . $field['title'] . '</h3>';
|
775 |
+
|
776 |
+
echo '</div>';
|
777 |
+
|
778 |
+
}
|
779 |
+
|
780 |
+
call_user_func( $field['callback'], $field['args'] );
|
781 |
|
782 |
+
echo '</div>';
|
|
|
|
|
783 |
|
784 |
echo '</div>';
|
785 |
|
includes/ot-ui-theme-options.php
CHANGED
@@ -31,15 +31,15 @@ if ( function_exists( 'ot_register_settings' ) ) {
|
|
31 |
array(
|
32 |
'id' => 'ot_theme_options',
|
33 |
'parent_slug' => 'themes.php',
|
34 |
-
'page_title' => __( 'Theme Options', 'option-tree' ),
|
35 |
-
'menu_title' => __( 'Theme Options', 'option-tree' ),
|
36 |
'capability' => 'edit_theme_options',
|
37 |
'menu_slug' => 'ot-theme-options',
|
38 |
'icon_url' => null,
|
39 |
'position' => null,
|
40 |
-
'updated_message' => __( 'Theme Options updated.', 'option-tree' ),
|
41 |
-
'reset_message' => __( 'Theme Options reset.', 'option-tree' ),
|
42 |
-
'button_text' => __( 'Save Changes', 'option-tree' ),
|
43 |
'screen_icon' => 'themes',
|
44 |
'contextual_help' => $contextual_help,
|
45 |
'sections' => $sections,
|
31 |
array(
|
32 |
'id' => 'ot_theme_options',
|
33 |
'parent_slug' => 'themes.php',
|
34 |
+
'page_title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ),
|
35 |
+
'menu_title' => apply_filters( 'ot_theme_options_menu_title', __( 'Theme Options', 'option-tree' ) ),
|
36 |
'capability' => 'edit_theme_options',
|
37 |
'menu_slug' => 'ot-theme-options',
|
38 |
'icon_url' => null,
|
39 |
'position' => null,
|
40 |
+
'updated_message' => apply_filters( 'ot_theme_options_updated_message', __( 'Theme Options updated.', 'option-tree' ) ),
|
41 |
+
'reset_message' => apply_filters( 'ot_theme_options_reset_message', __( 'Theme Options reset.', 'option-tree' ) ),
|
42 |
+
'button_text' => apply_filters( 'ot_theme_options_button_text', __( 'Save Changes', 'option-tree' ) ),
|
43 |
'screen_icon' => 'themes',
|
44 |
'contextual_help' => $contextual_help,
|
45 |
'sections' => $sections,
|
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.0.
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
* License: GPLv2
|
@@ -60,7 +60,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
60 |
/**
|
61 |
* Current Version number.
|
62 |
*/
|
63 |
-
define( 'OT_VERSION', '2.0.
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
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.0.11
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
* License: GPLv2
|
60 |
/**
|
61 |
* Current Version number.
|
62 |
*/
|
63 |
+
define( 'OT_VERSION', '2.0.11' );
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bit.ly/NuXI3T
|
|
4 |
Tags: admin, theme options, meta boxes, options, admin interface, ajax
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.5
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2
|
9 |
|
10 |
Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
@@ -41,6 +41,12 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
= 2.0.10 =
|
45 |
* Fixed a bug where the Textarea row count wasn't working for List Items.
|
46 |
* Added an apply_filter to the exported theme-options.php file.
|
@@ -199,7 +205,7 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
199 |
|
200 |
== Upgrade Notice ==
|
201 |
|
202 |
-
= 2.0.
|
203 |
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.
|
204 |
|
205 |
= 1.1.8.1 =
|
4 |
Tags: admin, theme options, meta boxes, options, admin interface, ajax
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.5
|
7 |
+
Stable tag: 2.0.11
|
8 |
License: GPLv2
|
9 |
|
10 |
Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
|
41 |
|
42 |
== Changelog ==
|
43 |
|
44 |
+
= 2.0.11 =
|
45 |
+
* Added filters to the array that builds the Theme Option UI.
|
46 |
+
* Added .format-setting-wrap div to allow for complex CSS layouts.
|
47 |
+
* Added better namespacing for the Colorpicker option type.
|
48 |
+
* Fixed theme-options.php export where it was adding an extra comma.
|
49 |
+
|
50 |
= 2.0.10 =
|
51 |
* Fixed a bug where the Textarea row count wasn't working for List Items.
|
52 |
* Added an apply_filter to the exported theme-options.php file.
|
205 |
|
206 |
== Upgrade Notice ==
|
207 |
|
208 |
+
= 2.0.11 =
|
209 |
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.
|
210 |
|
211 |
= 1.1.8.1 =
|