Version Description
- Fixed a bug where the Textarea row count wasn't working for List Items.
- Added an apply_filter to the exported theme-options.php file.
- Added CSS id's to tabs and settings.
- Allow "New Layout" section to be hidden on the theme options page via a filter.
- Fixed a bug where the Colorpicker was not closing in List Items.
- Change capabilities from manage_options to edit_theme_options.
- Remove Textblock title in List Items & Metaboxes.
- Fixed a List Item bug that incorrectly added ID's based on counting objects - submitted by Spark
- Fixed incorrect text domain paths for both plugin and theme mode.
- Fixed a bug with UI Sortable not properly calculating the container height.
- Fixed Select dropdown selector bug - submitted by Manfred Haltner
- Fixed Radio Image remove class bug - submitted by designst
- Added new typography fields - submitted by darknailblue
- Added dynamic CSS support for new typography fields.
- Added new filters to typography fields, including low/high range & unit types.
Download this release
Release Info
Developer | valendesigns |
Plugin | OptionTree |
Version | 2.0.10 |
Comparing to | |
See all releases |
Code changes from version 2.0.9 to 2.0.10
- assets/css/ot-admin.css +4 -4
- assets/js/ot-admin.js +16 -6
- assets/theme-mode/demo-theme-options.php +3 -0
- includes/ot-functions-admin.php +82 -3
- includes/ot-functions-docs-page.php +6 -0
- includes/ot-functions-option-types.php +50 -12
- includes/ot-meta-box-api.php +7 -3
- includes/ot-settings-api.php +3 -3
- includes/ot-ui-admin.php +3 -3
- includes/ot-ui-theme-options.php +1 -1
- languages/option-tree.pot +66 -66
- ot-loader.php +46 -26
- readme.txt +19 -2
assets/css/ot-admin.css
CHANGED
@@ -148,10 +148,10 @@ input:focus.option-tree-ui-input { border-color: #bbb !important; }
|
|
148 |
---------------------------------------------------*/
|
149 |
.option-tree-setting-wrap { margin-top: 0px; }
|
150 |
.option-tree-setting-wrap li { margin: 4px 0px; }
|
151 |
-
.option-tree-setting { border: 1px solid #ccc;
|
152 |
-
.ui-state-disabled .option-tree-setting { cursor: default; }
|
153 |
.option-tree-setting a { text-decoration: none; }
|
154 |
-
.option-tree-setting .open { background: #fafafa; line-height: 21px; height: 21px; padding: 10px 100px 10px 10px; display: block; }
|
|
|
155 |
.option-tree-setting .open:hover { background: #fafafa url(../images/ot-dots.png) no-repeat 4px 15px; }
|
156 |
|
157 |
.button-section { position: absolute; right: 0px; top: 1px; }
|
@@ -162,7 +162,7 @@ input:focus.option-tree-ui-input { border-color: #bbb !important; }
|
|
162 |
.format-setting .ui-sortable-helper
|
163 |
.option-tree-setting .open { background: #fff url(../images/ot-dots.png) no-repeat 4px 15px; }
|
164 |
|
165 |
-
.ui-state-highlight { border: 1px dashed #ccc;
|
166 |
|
167 |
.option-tree-setting-body { background: #fff; border-top: 1px solid #ccc; display: none; padding: 10px; -webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -moz-border-radius-bottomleft: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; }
|
168 |
|
148 |
---------------------------------------------------*/
|
149 |
.option-tree-setting-wrap { margin-top: 0px; }
|
150 |
.option-tree-setting-wrap li { margin: 4px 0px; }
|
151 |
+
.option-tree-setting { border: 1px solid #ccc; overflow: hidden; position: relative; -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; }
|
|
|
152 |
.option-tree-setting a { text-decoration: none; }
|
153 |
+
.option-tree-setting .open { background: #fafafa; cursor: move; line-height: 21px; height: 21px; padding: 10px 100px 10px 10px; display: block; }
|
154 |
+
.ui-state-disabled .option-tree-setting .open { cursor: default; }
|
155 |
.option-tree-setting .open:hover { background: #fafafa url(../images/ot-dots.png) no-repeat 4px 15px; }
|
156 |
|
157 |
.button-section { position: absolute; right: 0px; top: 1px; }
|
162 |
.format-setting .ui-sortable-helper
|
163 |
.option-tree-setting .open { background: #fff url(../images/ot-dots.png) no-repeat 4px 15px; }
|
164 |
|
165 |
+
.ui-state-highlight { border: 1px dashed #ccc; display: block; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
|
166 |
|
167 |
.option-tree-setting-body { background: #fff; border-top: 1px solid #ccc; display: none; padding: 10px; -webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -moz-border-radius-bottomleft: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; }
|
168 |
|
assets/js/ot-admin.js
CHANGED
@@ -61,7 +61,11 @@
|
|
61 |
elm.show();
|
62 |
elm.sortable({
|
63 |
items: 'li:not(.ui-state-disabled)',
|
|
|
64 |
placeholder: 'ui-state-highlight',
|
|
|
|
|
|
|
65 |
stop: function(evt, ui) {
|
66 |
setTimeout(
|
67 |
function(){
|
@@ -71,10 +75,6 @@
|
|
71 |
)
|
72 |
}
|
73 |
});
|
74 |
-
elm.children('li').disableSelection();
|
75 |
-
elm.find('.option-tree-setting-body').bind('mousedown.ui-disableSelection selectstart.ui-disableSelection', function(e) {
|
76 |
-
e.stopImmediatePropagation();
|
77 |
-
});
|
78 |
}
|
79 |
});
|
80 |
},
|
@@ -199,6 +199,16 @@
|
|
199 |
if ( this.processing === false ) {
|
200 |
this.processing = true;
|
201 |
var count = parseInt(list.children('li').length);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
$.ajax({
|
203 |
url: option_tree.ajax,
|
204 |
type: 'post',
|
@@ -354,7 +364,7 @@
|
|
354 |
},
|
355 |
init_radio_image_select: function() {
|
356 |
$('.option-tree-ui-radio-image').live('click', function() {
|
357 |
-
$('.option-tree-ui-radio-image').removeClass('option-tree-ui-radio-image-selected');
|
358 |
$(this).toggleClass('option-tree-ui-radio-image-selected');
|
359 |
$(this).parent().find('.option-tree-ui-radio').attr('checked', true);
|
360 |
});
|
@@ -363,7 +373,7 @@
|
|
363 |
$('.option-tree-ui-select').each(function () {
|
364 |
if ( ! $(this).parent().hasClass('select-wrapper') ) {
|
365 |
$(this).wrap('<div class="select-wrapper" />');
|
366 |
-
$(this).parent('.select-wrapper
|
367 |
}
|
368 |
});
|
369 |
$('.option-tree-ui-select').live('change', function () {
|
61 |
elm.show();
|
62 |
elm.sortable({
|
63 |
items: 'li:not(.ui-state-disabled)',
|
64 |
+
handle: 'div.open',
|
65 |
placeholder: 'ui-state-highlight',
|
66 |
+
start: function (event, ui) {
|
67 |
+
ui.placeholder.height(ui.item.height()-2);
|
68 |
+
},
|
69 |
stop: function(evt, ui) {
|
70 |
setTimeout(
|
71 |
function(){
|
75 |
)
|
76 |
}
|
77 |
});
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
});
|
80 |
},
|
199 |
if ( this.processing === false ) {
|
200 |
this.processing = true;
|
201 |
var count = parseInt(list.children('li').length);
|
202 |
+
if ( type == 'list_item' ) {
|
203 |
+
list.find('li input.option-tree-setting-title').each(function(){
|
204 |
+
var settingidnumber = $(this).attr('name').replace(/[^0-9]/g, '');
|
205 |
+
settingidnumber = parseInt(settingidnumber);
|
206 |
+
settingidnumber++;
|
207 |
+
if ((settingidnumber) > count) {
|
208 |
+
count = settingidnumber;
|
209 |
+
}
|
210 |
+
});
|
211 |
+
}
|
212 |
$.ajax({
|
213 |
url: option_tree.ajax,
|
214 |
type: 'post',
|
364 |
},
|
365 |
init_radio_image_select: function() {
|
366 |
$('.option-tree-ui-radio-image').live('click', function() {
|
367 |
+
$(this).closest('.type-radio-image').find('.option-tree-ui-radio-image').removeClass('option-tree-ui-radio-image-selected');
|
368 |
$(this).toggleClass('option-tree-ui-radio-image-selected');
|
369 |
$(this).parent().find('.option-tree-ui-radio').attr('checked', true);
|
370 |
});
|
373 |
$('.option-tree-ui-select').each(function () {
|
374 |
if ( ! $(this).parent().hasClass('select-wrapper') ) {
|
375 |
$(this).wrap('<div class="select-wrapper" />');
|
376 |
+
$(this).parent('.select-wrapper').prepend('<span>' + $(this).find('option:selected').text() + '</span>');
|
377 |
}
|
378 |
});
|
379 |
$('.option-tree-ui-select').live('change', function () {
|
assets/theme-mode/demo-theme-options.php
CHANGED
@@ -465,6 +465,9 @@ function _custom_theme_options() {
|
|
465 |
)
|
466 |
);
|
467 |
|
|
|
|
|
|
|
468 |
/* settings are not the same update the DB */
|
469 |
if ( $saved_settings !== $custom_settings ) {
|
470 |
update_option( 'option_tree_settings', $custom_settings );
|
465 |
)
|
466 |
);
|
467 |
|
468 |
+
/* allow settings to be filtered before saving */
|
469 |
+
$custom_settings = apply_filters( 'option_tree_settings_args', $custom_settings );
|
470 |
+
|
471 |
/* settings are not the same update the DB */
|
472 |
if ( $saved_settings !== $custom_settings ) {
|
473 |
update_option( 'option_tree_settings', $custom_settings );
|
includes/ot-functions-admin.php
CHANGED
@@ -1032,7 +1032,10 @@ function custom_theme_options() {
|
|
1032 |
*/
|
1033 |
\$custom_settings = array( $build_settings
|
1034 |
);
|
1035 |
-
|
|
|
|
|
|
|
1036 |
/* settings are not the same update the DB */
|
1037 |
if ( \$saved_settings !== \$custom_settings ) {
|
1038 |
update_option( 'option_tree_settings', \$custom_settings );
|
@@ -1768,6 +1771,67 @@ if ( ! function_exists( 'ot_recognized_font_families' ) ) {
|
|
1768 |
|
1769 |
}
|
1770 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1771 |
/**
|
1772 |
* Recognized background repeat
|
1773 |
*
|
@@ -2165,7 +2229,7 @@ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
|
|
2165 |
$value = $value[0].$value[1];
|
2166 |
|
2167 |
/* typography */
|
2168 |
-
} else if ( ot_array_keys_exists( $value, array( 'font-color', 'font-family', 'font-style', 'font-variant', 'font-weight', '
|
2169 |
$font = array();
|
2170 |
|
2171 |
if ( ! empty( $value['font-color'] ) )
|
@@ -2190,6 +2254,18 @@ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
|
|
2190 |
|
2191 |
if ( ! empty( $value['font-weight'] ) )
|
2192 |
$font[] = "font-weight: " . $value['font-weight'] . ";";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2193 |
|
2194 |
/* set $value with font properties or empty string */
|
2195 |
$value = ! empty( $font ) ? implode( "\n", $font ) : '';
|
@@ -2907,7 +2983,7 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
2907 |
'field_value' => isset( $list_item[$field['id']] ) ? $list_item[$field['id']] : '',
|
2908 |
'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '',
|
2909 |
'field_std' => isset( $field['std'] ) ? $field['std'] : '',
|
2910 |
-
'field_rows' => isset( $rows ) ? $rows : 10,
|
2911 |
'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
|
2912 |
'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
|
2913 |
'field_class' => isset( $field['class'] ) ? $field['class'] : '',
|
@@ -2920,9 +2996,12 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
2920 |
/* option label */
|
2921 |
echo '<div class="format-settings">';
|
2922 |
|
|
|
|
|
2923 |
echo '<div class="format-setting-label">';
|
2924 |
echo '<h3 class="label">' . esc_attr( $field['label'] ) . '</h3>';
|
2925 |
echo '</div>';
|
|
|
2926 |
|
2927 |
/* only allow simple textarea inside a list-item due to known DOM issues with wp_editor() */
|
2928 |
if ( $_args['type'] == 'textarea' )
|
1032 |
*/
|
1033 |
\$custom_settings = array( $build_settings
|
1034 |
);
|
1035 |
+
|
1036 |
+
/* allow settings to be filtered before saving */
|
1037 |
+
\$custom_settings = apply_filters( 'option_tree_settings_args', \$custom_settings );
|
1038 |
+
|
1039 |
/* settings are not the same update the DB */
|
1040 |
if ( \$saved_settings !== \$custom_settings ) {
|
1041 |
update_option( 'option_tree_settings', \$custom_settings );
|
1771 |
|
1772 |
}
|
1773 |
|
1774 |
+
/**
|
1775 |
+
* Recognized text transformations
|
1776 |
+
*
|
1777 |
+
* Returns an array of all recognized text transformations.
|
1778 |
+
* Keys are intended to be stored in the database
|
1779 |
+
* while values are ready for display in html.
|
1780 |
+
*
|
1781 |
+
* @uses apply_filters()
|
1782 |
+
*
|
1783 |
+
* @return array
|
1784 |
+
*
|
1785 |
+
* @access public
|
1786 |
+
* @since 2.0.10
|
1787 |
+
*/
|
1788 |
+
if ( ! function_exists( 'ot_recognized_text_transformations' ) ) {
|
1789 |
+
|
1790 |
+
function ot_recognized_text_transformations( $field_id = '' ) {
|
1791 |
+
|
1792 |
+
return apply_filters( 'ot_recognized_text_transformations', array(
|
1793 |
+
'capitalize' => 'Capitalize',
|
1794 |
+
'inherit' => 'Inherit',
|
1795 |
+
'lowercase' => 'Lowercase',
|
1796 |
+
'none' => 'None',
|
1797 |
+
'uppercase' => 'Uppercase'
|
1798 |
+
), $field_id );
|
1799 |
+
|
1800 |
+
}
|
1801 |
+
|
1802 |
+
}
|
1803 |
+
|
1804 |
+
/**
|
1805 |
+
* Recognized text decorations
|
1806 |
+
*
|
1807 |
+
* Returns an array of all recognized text decorations.
|
1808 |
+
* Keys are intended to be stored in the database
|
1809 |
+
* while values are ready for display in html.
|
1810 |
+
*
|
1811 |
+
* @uses apply_filters()
|
1812 |
+
*
|
1813 |
+
* @return array
|
1814 |
+
*
|
1815 |
+
* @access public
|
1816 |
+
* @since 2.0.10
|
1817 |
+
*/
|
1818 |
+
if ( ! function_exists( 'ot_recognized_text_decorations' ) ) {
|
1819 |
+
|
1820 |
+
function ot_recognized_text_decorations( $field_id = '' ) {
|
1821 |
+
|
1822 |
+
return apply_filters( 'ot_recognized_text_decorations', array(
|
1823 |
+
'blink' => 'Blink',
|
1824 |
+
'inherit' => 'Inherit',
|
1825 |
+
'line-through' => 'Line Through',
|
1826 |
+
'none' => 'None',
|
1827 |
+
'overline' => 'Overline',
|
1828 |
+
'underline' => 'Underline'
|
1829 |
+
), $field_id );
|
1830 |
+
|
1831 |
+
}
|
1832 |
+
|
1833 |
+
}
|
1834 |
+
|
1835 |
/**
|
1836 |
* Recognized background repeat
|
1837 |
*
|
2229 |
$value = $value[0].$value[1];
|
2230 |
|
2231 |
/* typography */
|
2232 |
+
} else if ( ot_array_keys_exists( $value, array( 'font-color', 'font-family', 'font-size', 'font-style', 'font-variant', 'font-weight', 'letter-spacing', 'line-height', 'text-decoration', 'text-transform' ) ) ) {
|
2233 |
$font = array();
|
2234 |
|
2235 |
if ( ! empty( $value['font-color'] ) )
|
2254 |
|
2255 |
if ( ! empty( $value['font-weight'] ) )
|
2256 |
$font[] = "font-weight: " . $value['font-weight'] . ";";
|
2257 |
+
|
2258 |
+
if ( ! empty( $value['letter-spacing'] ) )
|
2259 |
+
$font[] = "letter-spacing: " . $value['letter-spacing'] . ";";
|
2260 |
+
|
2261 |
+
if ( ! empty( $value['line-height'] ) )
|
2262 |
+
$font[] = "line-height: " . $value['line-height'] . ";";
|
2263 |
+
|
2264 |
+
if ( ! empty( $value['text-decoration'] ) )
|
2265 |
+
$font[] = "text-decoration: " . $value['text-decoration'] . ";";
|
2266 |
+
|
2267 |
+
if ( ! empty( $value['text-transform'] ) )
|
2268 |
+
$font[] = "text-transform: " . $value['text-transform'] . ";";
|
2269 |
|
2270 |
/* set $value with font properties or empty string */
|
2271 |
$value = ! empty( $font ) ? implode( "\n", $font ) : '';
|
2983 |
'field_value' => isset( $list_item[$field['id']] ) ? $list_item[$field['id']] : '',
|
2984 |
'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '',
|
2985 |
'field_std' => isset( $field['std'] ) ? $field['std'] : '',
|
2986 |
+
'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10,
|
2987 |
'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post',
|
2988 |
'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category',
|
2989 |
'field_class' => isset( $field['class'] ) ? $field['class'] : '',
|
2996 |
/* option label */
|
2997 |
echo '<div class="format-settings">';
|
2998 |
|
2999 |
+
/* don't show title with textblocks */
|
3000 |
+
if ( $_args['type'] != 'textblock' ) {
|
3001 |
echo '<div class="format-setting-label">';
|
3002 |
echo '<h3 class="label">' . esc_attr( $field['label'] ) . '</h3>';
|
3003 |
echo '</div>';
|
3004 |
+
}
|
3005 |
|
3006 |
/* only allow simple textarea inside a list-item due to known DOM issues with wp_editor() */
|
3007 |
if ( $_args['type'] == 'textarea' )
|
includes/ot-functions-docs-page.php
CHANGED
@@ -771,6 +771,12 @@ if ( ! function_exists( 'ot_type_theme_mode' ) ) {
|
|
771 |
*/
|
772 |
add_filter( \'ot_show_pages\', \'__return_false\' );
|
773 |
|
|
|
|
|
|
|
|
|
|
|
|
|
774 |
/**
|
775 |
* Required: set \'ot_theme_mode\' filter to true.
|
776 |
*/
|
771 |
*/
|
772 |
add_filter( \'ot_show_pages\', \'__return_false\' );
|
773 |
|
774 |
+
/**
|
775 |
+
* Optional: set \'ot_show_new_layout\' filter to false.
|
776 |
+
* This will hide the "New Layout" section on the Theme Options page.
|
777 |
+
*/
|
778 |
+
add_filter( \'ot_show_new_layout\', \'__return_false\' );
|
779 |
+
|
780 |
/**
|
781 |
* Required: set \'ot_theme_mode\' filter to true.
|
782 |
*/
|
includes/ot-functions-option-types.php
CHANGED
@@ -1571,7 +1571,7 @@ if ( ! function_exists( 'ot_type_typography' ) ) {
|
|
1571 |
$border_color = in_array( $background_color, array( '#FFFFFF', '#FFF', '#ffffff', '#fff' ) ) ? '#ccc' : $background_color;
|
1572 |
|
1573 |
/* input */
|
1574 |
-
echo '<input type="text" name="' . esc_attr( $field_name ) . '[font-color]" id="' . esc_attr( $field_id ) . '-picker" value="' . esc_attr( $background_color ) . '" class="widefat option-tree-ui-input cp_input ' . esc_attr( $field_class ) . '" autocomplete="off" />';
|
1575 |
|
1576 |
echo '<div id="cp_' . esc_attr( $field_id ) . '-picker" class="cp_box"' . ( $background_color ? " style='background-color:$background_color; border-color:$border_color;'" : '' ) . '></div>';
|
1577 |
|
@@ -1579,16 +1579,26 @@ if ( ! function_exists( 'ot_type_typography' ) ) {
|
|
1579 |
|
1580 |
/* build font family */
|
1581 |
$font_family = isset( $field_value['font-family'] ) ? esc_attr( $field_value['font-family'] ) : '';
|
1582 |
-
echo '<select name="' . esc_attr( $field_name ) . '[font-family]" id="' . esc_attr( $field_id ) . '-family" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1583 |
echo '<option value="">font-family</option>';
|
1584 |
foreach ( ot_recognized_font_families( $field_id ) as $key => $value ) {
|
1585 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_family, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1586 |
}
|
1587 |
echo '</select>';
|
1588 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1589 |
/* build font style */
|
1590 |
$font_style = isset( $field_value['font-style'] ) ? esc_attr( $field_value['font-style'] ) : '';
|
1591 |
-
echo '<select name="' . esc_attr( $field_name ) . '[font-style]" id="' . esc_attr( $field_id ) . '-style" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1592 |
echo '<option value="">font-style</option>';
|
1593 |
foreach ( ot_recognized_font_styles( $field_id ) as $key => $value ) {
|
1594 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_style, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
@@ -1597,7 +1607,7 @@ if ( ! function_exists( 'ot_type_typography' ) ) {
|
|
1597 |
|
1598 |
/* build font variant */
|
1599 |
$font_variant = isset( $field_value['font-variant'] ) ? esc_attr( $field_value['font-variant'] ) : '';
|
1600 |
-
echo '<select name="' . esc_attr( $field_name ) . '[font-variant]" id="' . esc_attr( $field_id ) . '-variant" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1601 |
echo '<option value="">font-variant</option>';
|
1602 |
foreach ( ot_recognized_font_variants( $field_id ) as $key => $value ) {
|
1603 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_variant, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
@@ -1606,23 +1616,51 @@ if ( ! function_exists( 'ot_type_typography' ) ) {
|
|
1606 |
|
1607 |
/* build font weight */
|
1608 |
$font_weight = isset( $field_value['font-weight'] ) ? esc_attr( $field_value['font-weight'] ) : '';
|
1609 |
-
echo '<select name="' . esc_attr( $field_name ) . '[font-weight]" id="' . esc_attr( $field_id ) . '-weight" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1610 |
echo '<option value="">font-weight</option>';
|
1611 |
foreach ( ot_recognized_font_weights( $field_id ) as $key => $value ) {
|
1612 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_weight, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1613 |
}
|
1614 |
echo '</select>';
|
1615 |
|
1616 |
-
/* build
|
1617 |
-
$
|
1618 |
-
echo '<select name="' . esc_attr( $field_name ) . '[
|
1619 |
-
echo '<option value="">
|
1620 |
-
for ( $i =
|
1621 |
-
$size = $i . 'px';
|
1622 |
-
echo '<option value="' . esc_attr( $size ) . '" ' . selected( $
|
1623 |
}
|
1624 |
echo '</select>';
|
1625 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1626 |
echo '</div>';
|
1627 |
|
1628 |
echo '</div>';
|
1571 |
$border_color = in_array( $background_color, array( '#FFFFFF', '#FFF', '#ffffff', '#fff' ) ) ? '#ccc' : $background_color;
|
1572 |
|
1573 |
/* input */
|
1574 |
+
echo '<input type="text" name="' . esc_attr( $field_name ) . '[font-color]" id="' . esc_attr( $field_id ) . '-picker" value="' . esc_attr( $background_color ) . '" class="widefat option-tree-ui-input cp_input ' . esc_attr( $field_class ) . '" autocomplete="off" placeholder="font-color" />';
|
1575 |
|
1576 |
echo '<div id="cp_' . esc_attr( $field_id ) . '-picker" class="cp_box"' . ( $background_color ? " style='background-color:$background_color; border-color:$border_color;'" : '' ) . '></div>';
|
1577 |
|
1579 |
|
1580 |
/* build font family */
|
1581 |
$font_family = isset( $field_value['font-family'] ) ? esc_attr( $field_value['font-family'] ) : '';
|
1582 |
+
echo '<select name="' . esc_attr( $field_name ) . '[font-family]" id="' . esc_attr( $field_id ) . '-font-family" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1583 |
echo '<option value="">font-family</option>';
|
1584 |
foreach ( ot_recognized_font_families( $field_id ) as $key => $value ) {
|
1585 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_family, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1586 |
}
|
1587 |
echo '</select>';
|
1588 |
|
1589 |
+
/* build font size */
|
1590 |
+
$font_size = isset( $field_value['font-size'] ) ? esc_attr( $field_value['font-size'] ) : '';
|
1591 |
+
echo '<select name="' . esc_attr( $field_name ) . '[font-size]" id="' . esc_attr( $field_id ) . '-font-size" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1592 |
+
echo '<option value="">font-size</option>';
|
1593 |
+
for ( $i = apply_filters( 'ot_font_size_low_range', 0, $field_id ); $i <= apply_filters( 'ot_font_size_high_range', 150, $field_id ); $i++ ) {
|
1594 |
+
$size = $i . apply_filters( 'ot_font_size_unit_type', 'px', $field_id );
|
1595 |
+
echo '<option value="' . esc_attr( $size ) . '" ' . selected( $font_size, $size, false ) . '>' . esc_attr( $size ) . '</option>';
|
1596 |
+
}
|
1597 |
+
echo '</select>';
|
1598 |
+
|
1599 |
/* build font style */
|
1600 |
$font_style = isset( $field_value['font-style'] ) ? esc_attr( $field_value['font-style'] ) : '';
|
1601 |
+
echo '<select name="' . esc_attr( $field_name ) . '[font-style]" id="' . esc_attr( $field_id ) . '-font-style" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1602 |
echo '<option value="">font-style</option>';
|
1603 |
foreach ( ot_recognized_font_styles( $field_id ) as $key => $value ) {
|
1604 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_style, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1607 |
|
1608 |
/* build font variant */
|
1609 |
$font_variant = isset( $field_value['font-variant'] ) ? esc_attr( $field_value['font-variant'] ) : '';
|
1610 |
+
echo '<select name="' . esc_attr( $field_name ) . '[font-variant]" id="' . esc_attr( $field_id ) . '-font-variant" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1611 |
echo '<option value="">font-variant</option>';
|
1612 |
foreach ( ot_recognized_font_variants( $field_id ) as $key => $value ) {
|
1613 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_variant, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1616 |
|
1617 |
/* build font weight */
|
1618 |
$font_weight = isset( $field_value['font-weight'] ) ? esc_attr( $field_value['font-weight'] ) : '';
|
1619 |
+
echo '<select name="' . esc_attr( $field_name ) . '[font-weight]" id="' . esc_attr( $field_id ) . '-font-weight" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1620 |
echo '<option value="">font-weight</option>';
|
1621 |
foreach ( ot_recognized_font_weights( $field_id ) as $key => $value ) {
|
1622 |
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $font_weight, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1623 |
}
|
1624 |
echo '</select>';
|
1625 |
|
1626 |
+
/* build letter spacing */
|
1627 |
+
$letter_spacing = isset( $field_value['letter-spacing'] ) ? esc_attr( $field_value['letter-spacing'] ) : '';
|
1628 |
+
echo '<select name="' . esc_attr( $field_name ) . '[letter-spacing]" id="' . esc_attr( $field_id ) . '-letter-spacing" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1629 |
+
echo '<option value="">letter-spacing</option>';
|
1630 |
+
for ( $i = apply_filters( 'ot_letter_spacing_low_range', 0, $field_id ); $i <= apply_filters( 'ot_letter_spacing_high_range', 150, $field_id ); $i++ ) {
|
1631 |
+
$size = $i . apply_filters( 'ot_letter_spacing_unit_type', 'px', $field_id );
|
1632 |
+
echo '<option value="' . esc_attr( $size ) . '" ' . selected( $letter_spacing, $size, false ) . '>' . esc_attr( $size ) . '</option>';
|
1633 |
}
|
1634 |
echo '</select>';
|
1635 |
|
1636 |
+
/* build line height */
|
1637 |
+
$line_height = isset( $field_value['line-height'] ) ? esc_attr( $field_value['line-height'] ) : '';
|
1638 |
+
echo '<select name="' . esc_attr( $field_name ) . '[line-height]" id="' . esc_attr( $field_id ) . '-line-height" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1639 |
+
echo '<option value="">line-height</option>';
|
1640 |
+
for ( $i = apply_filters( 'ot_line_height_low_range', 0, $field_id ); $i <= apply_filters( 'ot_line_height_high_range', 150, $field_id ); $i++ ) {
|
1641 |
+
$size = $i . apply_filters( 'ot_line_height_unit_type', 'px', $field_id );
|
1642 |
+
echo '<option value="' . esc_attr( $size ) . '" ' . selected( $line_height, $size, false ) . '>' . esc_attr( $size ) . '</option>';
|
1643 |
+
}
|
1644 |
+
echo '</select>';
|
1645 |
+
|
1646 |
+
/* build text decoration */
|
1647 |
+
$text_decoration = isset( $field_value['text-decoration'] ) ? esc_attr( $field_value['text-decoration'] ) : '';
|
1648 |
+
echo '<select name="' . esc_attr( $field_name ) . '[text-decoration]" id="' . esc_attr( $field_id ) . '-text-decoration" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1649 |
+
echo '<option value="">text-decoration</option>';
|
1650 |
+
foreach ( ot_recognized_text_decorations( $field_id ) as $key => $value ) {
|
1651 |
+
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $text_decoration, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1652 |
+
}
|
1653 |
+
echo '</select>';
|
1654 |
+
|
1655 |
+
/* build text transform */
|
1656 |
+
$text_transform = isset( $field_value['text-transform'] ) ? esc_attr( $field_value['text-transform'] ) : '';
|
1657 |
+
echo '<select name="' . esc_attr( $field_name ) . '[text-transform]" id="' . esc_attr( $field_id ) . '-text-transform" class="option-tree-ui-select ' . esc_attr( $field_class ) . '">';
|
1658 |
+
echo '<option value="">text-transform</option>';
|
1659 |
+
foreach ( ot_recognized_text_transformations( $field_id ) as $key => $value ) {
|
1660 |
+
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $text_transform, $key, false ) . '>' . esc_attr( $value ) . '</option>';
|
1661 |
+
}
|
1662 |
+
echo '</select>';
|
1663 |
+
|
1664 |
echo '</div>';
|
1665 |
|
1666 |
echo '</div>';
|
includes/ot-meta-box-api.php
CHANGED
@@ -108,9 +108,13 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
|
108 |
|
109 |
/* option label */
|
110 |
echo '<div class="format-settings">';
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
114 |
|
115 |
/* get the option HTML */
|
116 |
echo ot_display_by_type( $_args );
|
108 |
|
109 |
/* option label */
|
110 |
echo '<div class="format-settings">';
|
111 |
+
|
112 |
+
/* don't show title with textblocks */
|
113 |
+
if ( $_args['type'] != 'textblock' ) {
|
114 |
+
echo '<div class="format-setting-label">';
|
115 |
+
echo '<label for="' . $_args['field_id'] . '" class="label">' . $field['label'] . '</label>';
|
116 |
+
echo '</div>';
|
117 |
+
}
|
118 |
|
119 |
/* get the option HTML */
|
120 |
echo ot_display_by_type( $_args );
|
includes/ot-settings-api.php
CHANGED
@@ -258,7 +258,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
258 |
echo '</ul>';
|
259 |
|
260 |
/* layouts form */
|
261 |
-
if ( $page['id'] == 'ot_theme_options' )
|
262 |
ot_theme_options_layouts_form();
|
263 |
|
264 |
echo '</div>';
|
@@ -294,7 +294,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
294 |
|
295 |
/* loop through page sections */
|
296 |
foreach( (array) $page['sections'] as $section ) {
|
297 |
-
echo '<li><a href="#section_' . $section['id'] . '">' . $section['title'] . '</a></li>';
|
298 |
}
|
299 |
|
300 |
echo '</ul>';
|
@@ -763,7 +763,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
763 |
|
764 |
foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
|
765 |
|
766 |
-
echo '<div class="format-settings">';
|
767 |
|
768 |
if ( $field['args']['type'] != 'textblock' ) {
|
769 |
|
258 |
echo '</ul>';
|
259 |
|
260 |
/* layouts form */
|
261 |
+
if ( $page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true )
|
262 |
ot_theme_options_layouts_form();
|
263 |
|
264 |
echo '</div>';
|
294 |
|
295 |
/* loop through page sections */
|
296 |
foreach( (array) $page['sections'] as $section ) {
|
297 |
+
echo '<li id="tab_' . $section['id'] . '"><a href="#section_' . $section['id'] . '">' . $section['title'] . '</a></li>';
|
298 |
}
|
299 |
|
300 |
echo '</ul>';
|
763 |
|
764 |
foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
|
765 |
|
766 |
+
echo '<div id="setting_' . $field['id'] . '" class="format-settings">';
|
767 |
|
768 |
if ( $field['args']['type'] != 'textblock' ) {
|
769 |
|
includes/ot-ui-admin.php
CHANGED
@@ -18,7 +18,7 @@ if ( function_exists( 'ot_register_settings' ) ) {
|
|
18 |
'id' => 'ot',
|
19 |
'page_title' => __( 'OptionTree', 'option-tree' ),
|
20 |
'menu_title' => __( 'OptionTree', 'option-tree' ),
|
21 |
-
'capability' => '
|
22 |
'menu_slug' => 'ot-settings',
|
23 |
'icon_url' => OT_URL . '/assets/images/ot-logo-mini.png',
|
24 |
'position' => 61,
|
@@ -29,7 +29,7 @@ if ( function_exists( 'ot_register_settings' ) ) {
|
|
29 |
'parent_slug' => 'ot-settings',
|
30 |
'page_title' => __( 'Settings', 'option-tree' ),
|
31 |
'menu_title' => __( 'Settings', 'option-tree' ),
|
32 |
-
'capability' => '
|
33 |
'menu_slug' => 'ot-settings',
|
34 |
'icon_url' => null,
|
35 |
'position' => null,
|
@@ -124,7 +124,7 @@ if ( function_exists( 'ot_register_settings' ) ) {
|
|
124 |
'parent_slug' => 'ot-settings',
|
125 |
'page_title' => __( 'Documentation', 'option-tree' ),
|
126 |
'menu_title' => __( 'Documentation', 'option-tree' ),
|
127 |
-
'capability' => '
|
128 |
'menu_slug' => 'ot-documentation',
|
129 |
'icon_url' => null,
|
130 |
'position' => null,
|
18 |
'id' => 'ot',
|
19 |
'page_title' => __( 'OptionTree', 'option-tree' ),
|
20 |
'menu_title' => __( 'OptionTree', 'option-tree' ),
|
21 |
+
'capability' => 'edit_theme_options',
|
22 |
'menu_slug' => 'ot-settings',
|
23 |
'icon_url' => OT_URL . '/assets/images/ot-logo-mini.png',
|
24 |
'position' => 61,
|
29 |
'parent_slug' => 'ot-settings',
|
30 |
'page_title' => __( 'Settings', 'option-tree' ),
|
31 |
'menu_title' => __( 'Settings', 'option-tree' ),
|
32 |
+
'capability' => 'edit_theme_options',
|
33 |
'menu_slug' => 'ot-settings',
|
34 |
'icon_url' => null,
|
35 |
'position' => null,
|
124 |
'parent_slug' => 'ot-settings',
|
125 |
'page_title' => __( 'Documentation', 'option-tree' ),
|
126 |
'menu_title' => __( 'Documentation', 'option-tree' ),
|
127 |
+
'capability' => 'edit_theme_options',
|
128 |
'menu_slug' => 'ot-documentation',
|
129 |
'icon_url' => null,
|
130 |
'position' => null,
|
includes/ot-ui-theme-options.php
CHANGED
@@ -33,7 +33,7 @@ if ( function_exists( 'ot_register_settings' ) ) {
|
|
33 |
'parent_slug' => 'themes.php',
|
34 |
'page_title' => __( 'Theme Options', 'option-tree' ),
|
35 |
'menu_title' => __( 'Theme Options', 'option-tree' ),
|
36 |
-
'capability' => '
|
37 |
'menu_slug' => 'ot-theme-options',
|
38 |
'icon_url' => null,
|
39 |
'position' => null,
|
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,
|
languages/option-tree.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
|
7 |
-
"POT-Creation-Date: 2012-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -22,7 +22,7 @@ msgstr ""
|
|
22 |
|
23 |
#: includes/ot-functions-admin.php:164
|
24 |
#: includes/ot-functions-option-types.php:152
|
25 |
-
#: includes/ot-functions-option-types.php:
|
26 |
msgid "Remove Media"
|
27 |
msgstr ""
|
28 |
|
@@ -62,237 +62,237 @@ msgstr ""
|
|
62 |
msgid "Description for the sample text field."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: includes/ot-functions-admin.php:
|
66 |
msgid "Layout activated."
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: includes/ot-functions-admin.php:
|
70 |
msgid "Settings updated."
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: includes/ot-functions-admin.php:
|
74 |
msgid "Settings could not be saved."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/ot-functions-admin.php:
|
78 |
msgid "Settings Imported."
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: includes/ot-functions-admin.php:
|
82 |
msgid "Settings could not be imported."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: includes/ot-functions-admin.php:
|
86 |
msgid "Data Imported."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: includes/ot-functions-admin.php:
|
90 |
msgid "Data could not be imported."
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: includes/ot-functions-admin.php:
|
94 |
msgid "Layouts Imported."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: includes/ot-functions-admin.php:
|
98 |
msgid "Layouts could not be imported."
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/ot-functions-admin.php:
|
102 |
msgid "Layouts Updated."
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: includes/ot-functions-admin.php:
|
106 |
msgid "Layouts could not be updated."
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: includes/ot-functions-admin.php:
|
110 |
msgid "Left Sidebar"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/ot-functions-admin.php:
|
114 |
msgid "Right Sidebar"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/ot-functions-admin.php:
|
118 |
msgid "Full Width (no sidebar)"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/ot-functions-admin.php:
|
122 |
msgid "Dual Sidebar"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: includes/ot-functions-admin.php:
|
126 |
msgid "Left Dual Sidebar"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: includes/ot-functions-admin.php:
|
130 |
msgid "Right Dual Sidebar"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/ot-functions-admin.php:
|
134 |
msgid "Image"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: includes/ot-functions-admin.php:
|
138 |
msgid "Link"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: includes/ot-functions-admin.php:
|
142 |
#: includes/ot-functions-docs-page.php:43
|
143 |
#: includes/ot-functions-docs-page.php:367
|
144 |
#: includes/ot-functions-docs-page.php:417
|
145 |
msgid "Description"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/ot-functions-admin.php:
|
149 |
msgid "edit"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/ot-functions-admin.php:
|
153 |
-
#: includes/ot-functions-admin.php:
|
154 |
-
#: includes/ot-functions-admin.php:
|
155 |
-
#: includes/ot-functions-admin.php:
|
156 |
-
#: includes/ot-functions-admin.php:
|
157 |
msgid "Edit"
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: includes/ot-functions-admin.php:
|
161 |
-
#: includes/ot-functions-admin.php:
|
162 |
-
#: includes/ot-functions-admin.php:
|
163 |
-
#: includes/ot-functions-admin.php:
|
164 |
-
#: includes/ot-functions-admin.php:
|
165 |
-
#: includes/ot-functions-admin.php:
|
166 |
msgid "Delete"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/ot-functions-admin.php:
|
170 |
msgid ""
|
171 |
"<strong>Section Title</strong>: Displayed as a menu item on the Theme "
|
172 |
"Options page."
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: includes/ot-functions-admin.php:
|
176 |
msgid ""
|
177 |
"<strong>Section ID</strong>: A unique lower case alphanumeric string, "
|
178 |
"underscores allowed."
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: includes/ot-functions-admin.php:
|
182 |
msgid ""
|
183 |
"<strong>Label</strong>: Displayed as the label of a form element on the "
|
184 |
"Theme Options page."
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: includes/ot-functions-admin.php:
|
188 |
msgid ""
|
189 |
"<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
|
190 |
"allowed."
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: includes/ot-functions-admin.php:
|
194 |
msgid ""
|
195 |
"<strong>Type</strong>: Choose one of the available option types from the "
|
196 |
"dropdown."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: includes/ot-functions-admin.php:
|
200 |
msgid ""
|
201 |
"<strong>Description</strong>: Enter a detailed description for the users to "
|
202 |
"read on the Theme Options page, HTML is allowed. This is also where you "
|
203 |
"enter content for both the Textblock & Textblock Titled option types."
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/ot-functions-admin.php:
|
207 |
msgid ""
|
208 |
"<strong>Choices</strong>: This will only affect the following option types: "
|
209 |
"Checkbox, Radio, Select & Select Image."
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: includes/ot-functions-admin.php:
|
213 |
msgid "Add Choice"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: includes/ot-functions-admin.php:
|
217 |
msgid ""
|
218 |
"<strong>Settings</strong>: This will only affect the List Item option type."
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: includes/ot-functions-admin.php:
|
222 |
#: includes/ot-functions-settings-page.php:93
|
223 |
msgid "Add Setting"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/ot-functions-admin.php:
|
227 |
msgid ""
|
228 |
"<strong>Standard</strong>: Setting the standard value for your option only "
|
229 |
"works for some option types. Read the <code>OptionTree->Documentation</code> "
|
230 |
"for more information on which ones."
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: includes/ot-functions-admin.php:
|
234 |
msgid ""
|
235 |
"<strong>Rows</strong>: Enter a numeric value for the number of rows in your "
|
236 |
"textarea. This will only affect the following option types: CSS, Textarea, & "
|
237 |
"Textarea Simple."
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: includes/ot-functions-admin.php:
|
241 |
msgid ""
|
242 |
"<strong>Post Type</strong>: Add a comma separated list of post type like "
|
243 |
"'post,page'. This will only affect the following option types: Custom Post "
|
244 |
"Type Checkbox, & Custom Post Type Select."
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: includes/ot-functions-admin.php:
|
248 |
msgid ""
|
249 |
"<strong>Taxonomy</strong>: Add a comma separated list of any registered "
|
250 |
"taxonomy like 'category,post_tag'. This will only affect the following "
|
251 |
"option types: Taxonomy Checkbox, & Taxonomy Select."
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: includes/ot-functions-admin.php:
|
255 |
msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: includes/ot-functions-admin.php:
|
259 |
msgid "Label"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: includes/ot-functions-admin.php:
|
263 |
msgid "Value"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: includes/ot-functions-admin.php:
|
267 |
msgid "Image Source (Radio Image only)"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: includes/ot-functions-admin.php:
|
271 |
msgid ""
|
272 |
"<strong>Title</strong>: Displayed as a contextual help menu item on the "
|
273 |
"Theme Options page."
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: includes/ot-functions-admin.php:
|
277 |
msgid ""
|
278 |
"<strong>Content</strong>: Enter the HTML content about this contextual help "
|
279 |
"item displayed on the Theme Option page for end users to read."
|
280 |
msgstr ""
|
281 |
|
282 |
-
#: includes/ot-functions-admin.php:
|
283 |
msgid "Layout"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: includes/ot-functions-admin.php:
|
287 |
msgid "Activate"
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: includes/ot-functions-admin.php:
|
291 |
#: includes/ot-settings-api.php:572
|
292 |
msgid "Title"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: includes/ot-functions-admin.php:
|
296 |
msgid "New Layout"
|
297 |
msgstr ""
|
298 |
|
@@ -1188,7 +1188,7 @@ msgid ""
|
|
1188 |
msgstr ""
|
1189 |
|
1190 |
#: includes/ot-functions-docs-page.php:686
|
1191 |
-
#: includes/ot-functions-docs-page.php:
|
1192 |
msgid "Add the following code to your <code>functions.php</code>."
|
1193 |
msgstr ""
|
1194 |
|
@@ -1238,39 +1238,39 @@ msgid ""
|
|
1238 |
"Add the following code to the beginning of your <code>functions.php</code>."
|
1239 |
msgstr ""
|
1240 |
|
1241 |
-
#: includes/ot-functions-docs-page.php:
|
1242 |
msgid ""
|
1243 |
"It's that simple! You now have OptionTree built into your theme and anytime "
|
1244 |
"there's an update to the plugin you just replace the old version and you're "
|
1245 |
"good to go.."
|
1246 |
msgstr ""
|
1247 |
|
1248 |
-
#: includes/ot-functions-docs-page.php:
|
1249 |
msgid "Step 2: Create Theme Options without using the UI Builder."
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: includes/ot-functions-docs-page.php:
|
1253 |
msgid ""
|
1254 |
"Create a file and name it anything you want, maybe <code>theme-options.php</"
|
1255 |
"code>, or use the built in file export to create it for you. Remember, you "
|
1256 |
"should always check the file for errors before including it in your theme."
|
1257 |
msgstr ""
|
1258 |
|
1259 |
-
#: includes/ot-functions-docs-page.php:
|
1260 |
msgid ""
|
1261 |
"As well, you'll probably want to create a directory named <code>includes</"
|
1262 |
"code> to put your <code>theme-options.php</code> into which will help keep "
|
1263 |
"you file structure nice and tidy."
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: includes/ot-functions-docs-page.php:
|
1267 |
msgid ""
|
1268 |
"Add a variation of the following code to your <code>theme-options.php</"
|
1269 |
"code>. You'll obviously need to fill it in with all your custom array values "
|
1270 |
"for contextual help (optional), sections (required), and settings (required)."
|
1271 |
msgstr ""
|
1272 |
|
1273 |
-
#: includes/ot-functions-docs-page.php:
|
1274 |
msgid ""
|
1275 |
"The code below is a boilerplate to get your started. For a full list of the "
|
1276 |
"available option types click the \"Option Types\" tab above. Also a quick "
|
@@ -1298,7 +1298,7 @@ msgid "background-position"
|
|
1298 |
msgstr ""
|
1299 |
|
1300 |
#: includes/ot-functions-option-types.php:140
|
1301 |
-
#: includes/ot-functions-option-types.php:
|
1302 |
msgid "Add Media"
|
1303 |
msgstr ""
|
1304 |
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
|
7 |
+
"POT-Creation-Date: 2012-11-05 07:09:00+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
22 |
|
23 |
#: includes/ot-functions-admin.php:164
|
24 |
#: includes/ot-functions-option-types.php:152
|
25 |
+
#: includes/ot-functions-option-types.php:1721
|
26 |
msgid "Remove Media"
|
27 |
msgstr ""
|
28 |
|
62 |
msgid "Description for the sample text field."
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: includes/ot-functions-admin.php:1463
|
66 |
msgid "Layout activated."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/ot-functions-admin.php:1476
|
70 |
msgid "Settings updated."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: includes/ot-functions-admin.php:1480
|
74 |
msgid "Settings could not be saved."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/ot-functions-admin.php:1488
|
78 |
msgid "Settings Imported."
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: includes/ot-functions-admin.php:1492
|
82 |
msgid "Settings could not be imported."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: includes/ot-functions-admin.php:1499
|
86 |
msgid "Data Imported."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/ot-functions-admin.php:1503
|
90 |
msgid "Data could not be imported."
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: includes/ot-functions-admin.php:1511
|
94 |
msgid "Layouts Imported."
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: includes/ot-functions-admin.php:1515
|
98 |
msgid "Layouts could not be imported."
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: includes/ot-functions-admin.php:1523
|
102 |
msgid "Layouts Updated."
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: includes/ot-functions-admin.php:1527
|
106 |
msgid "Layouts could not be updated."
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: includes/ot-functions-admin.php:1977
|
110 |
msgid "Left Sidebar"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/ot-functions-admin.php:1982
|
114 |
msgid "Right Sidebar"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/ot-functions-admin.php:1987
|
118 |
msgid "Full Width (no sidebar)"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: includes/ot-functions-admin.php:1992
|
122 |
msgid "Dual Sidebar"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/ot-functions-admin.php:1997
|
126 |
msgid "Left Dual Sidebar"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/ot-functions-admin.php:2002
|
130 |
msgid "Right Dual Sidebar"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/ot-functions-admin.php:2032 includes/ot-functions-admin.php:2093
|
134 |
msgid "Image"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: includes/ot-functions-admin.php:2043 includes/ot-functions-admin.php:2099
|
138 |
msgid "Link"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: includes/ot-functions-admin.php:2054 includes/ot-functions-admin.php:2105
|
142 |
#: includes/ot-functions-docs-page.php:43
|
143 |
#: includes/ot-functions-docs-page.php:367
|
144 |
#: includes/ot-functions-docs-page.php:417
|
145 |
msgid "Description"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/ot-functions-admin.php:2574
|
149 |
msgid "edit"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/ot-functions-admin.php:2575 includes/ot-functions-admin.php:2629
|
153 |
+
#: includes/ot-functions-admin.php:2630 includes/ot-functions-admin.php:2765
|
154 |
+
#: includes/ot-functions-admin.php:2766 includes/ot-functions-admin.php:2831
|
155 |
+
#: includes/ot-functions-admin.php:2832 includes/ot-functions-admin.php:2959
|
156 |
+
#: includes/ot-functions-admin.php:2960
|
157 |
msgid "Edit"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/ot-functions-admin.php:2577 includes/ot-functions-admin.php:2578
|
161 |
+
#: includes/ot-functions-admin.php:2632 includes/ot-functions-admin.php:2633
|
162 |
+
#: includes/ot-functions-admin.php:2768 includes/ot-functions-admin.php:2769
|
163 |
+
#: includes/ot-functions-admin.php:2834 includes/ot-functions-admin.php:2835
|
164 |
+
#: includes/ot-functions-admin.php:2893 includes/ot-functions-admin.php:2894
|
165 |
+
#: includes/ot-functions-admin.php:2962 includes/ot-functions-admin.php:2963
|
166 |
msgid "Delete"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: includes/ot-functions-admin.php:2584
|
170 |
msgid ""
|
171 |
"<strong>Section Title</strong>: Displayed as a menu item on the Theme "
|
172 |
"Options page."
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: includes/ot-functions-admin.php:2592
|
176 |
msgid ""
|
177 |
"<strong>Section ID</strong>: A unique lower case alphanumeric string, "
|
178 |
"underscores allowed."
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: includes/ot-functions-admin.php:2639
|
182 |
msgid ""
|
183 |
"<strong>Label</strong>: Displayed as the label of a form element on the "
|
184 |
"Theme Options page."
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: includes/ot-functions-admin.php:2647 includes/ot-functions-admin.php:2849
|
188 |
msgid ""
|
189 |
"<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
|
190 |
"allowed."
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: includes/ot-functions-admin.php:2655
|
194 |
msgid ""
|
195 |
"<strong>Type</strong>: Choose one of the available option types from the "
|
196 |
"dropdown."
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: includes/ot-functions-admin.php:2666
|
200 |
msgid ""
|
201 |
"<strong>Description</strong>: Enter a detailed description for the users to "
|
202 |
"read on the Theme Options page, HTML is allowed. This is also where you "
|
203 |
"enter content for both the Textblock & Textblock Titled option types."
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: includes/ot-functions-admin.php:2674
|
207 |
msgid ""
|
208 |
"<strong>Choices</strong>: This will only affect the following option types: "
|
209 |
"Checkbox, Radio, Select & Select Image."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: includes/ot-functions-admin.php:2679
|
213 |
msgid "Add Choice"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/ot-functions-admin.php:2685
|
217 |
msgid ""
|
218 |
"<strong>Settings</strong>: This will only affect the List Item option type."
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: includes/ot-functions-admin.php:2690
|
222 |
#: includes/ot-functions-settings-page.php:93
|
223 |
msgid "Add Setting"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: includes/ot-functions-admin.php:2696
|
227 |
msgid ""
|
228 |
"<strong>Standard</strong>: Setting the standard value for your option only "
|
229 |
"works for some option types. Read the <code>OptionTree->Documentation</code> "
|
230 |
"for more information on which ones."
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: includes/ot-functions-admin.php:2704
|
234 |
msgid ""
|
235 |
"<strong>Rows</strong>: Enter a numeric value for the number of rows in your "
|
236 |
"textarea. This will only affect the following option types: CSS, Textarea, & "
|
237 |
"Textarea Simple."
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: includes/ot-functions-admin.php:2712
|
241 |
msgid ""
|
242 |
"<strong>Post Type</strong>: Add a comma separated list of post type like "
|
243 |
"'post,page'. This will only affect the following option types: Custom Post "
|
244 |
"Type Checkbox, & Custom Post Type Select."
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: includes/ot-functions-admin.php:2720
|
248 |
msgid ""
|
249 |
"<strong>Taxonomy</strong>: Add a comma separated list of any registered "
|
250 |
"taxonomy like 'category,post_tag'. This will only affect the following "
|
251 |
"option types: Taxonomy Checkbox, & Taxonomy Select."
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: includes/ot-functions-admin.php:2728
|
255 |
msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/ot-functions-admin.php:2775 includes/ot-functions-docs-page.php:29
|
259 |
msgid "Label"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/ot-functions-admin.php:2785
|
263 |
msgid "Value"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: includes/ot-functions-admin.php:2795
|
267 |
msgid "Image Source (Radio Image only)"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: includes/ot-functions-admin.php:2841
|
271 |
msgid ""
|
272 |
"<strong>Title</strong>: Displayed as a contextual help menu item on the "
|
273 |
"Theme Options page."
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: includes/ot-functions-admin.php:2857
|
277 |
msgid ""
|
278 |
"<strong>Content</strong>: Enter the HTML content about this contextual help "
|
279 |
"item displayed on the Theme Option page for end users to read."
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: includes/ot-functions-admin.php:2888
|
283 |
msgid "Layout"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: includes/ot-functions-admin.php:2890 includes/ot-functions-admin.php:2891
|
287 |
msgid "Activate"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: includes/ot-functions-admin.php:2927 includes/ot-meta-box-api.php:181
|
291 |
#: includes/ot-settings-api.php:572
|
292 |
msgid "Title"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: includes/ot-functions-admin.php:3056
|
296 |
msgid "New Layout"
|
297 |
msgstr ""
|
298 |
|
1188 |
msgstr ""
|
1189 |
|
1190 |
#: includes/ot-functions-docs-page.php:686
|
1191 |
+
#: includes/ot-functions-docs-page.php:797
|
1192 |
msgid "Add the following code to your <code>functions.php</code>."
|
1193 |
msgstr ""
|
1194 |
|
1238 |
"Add the following code to the beginning of your <code>functions.php</code>."
|
1239 |
msgstr ""
|
1240 |
|
1241 |
+
#: includes/ot-functions-docs-page.php:791
|
1242 |
msgid ""
|
1243 |
"It's that simple! You now have OptionTree built into your theme and anytime "
|
1244 |
"there's an update to the plugin you just replace the old version and you're "
|
1245 |
"good to go.."
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: includes/ot-functions-docs-page.php:793
|
1249 |
msgid "Step 2: Create Theme Options without using the UI Builder."
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: includes/ot-functions-docs-page.php:795
|
1253 |
msgid ""
|
1254 |
"Create a file and name it anything you want, maybe <code>theme-options.php</"
|
1255 |
"code>, or use the built in file export to create it for you. Remember, you "
|
1256 |
"should always check the file for errors before including it in your theme."
|
1257 |
msgstr ""
|
1258 |
|
1259 |
+
#: includes/ot-functions-docs-page.php:796
|
1260 |
msgid ""
|
1261 |
"As well, you'll probably want to create a directory named <code>includes</"
|
1262 |
"code> to put your <code>theme-options.php</code> into which will help keep "
|
1263 |
"you file structure nice and tidy."
|
1264 |
msgstr ""
|
1265 |
|
1266 |
+
#: includes/ot-functions-docs-page.php:807
|
1267 |
msgid ""
|
1268 |
"Add a variation of the following code to your <code>theme-options.php</"
|
1269 |
"code>. You'll obviously need to fill it in with all your custom array values "
|
1270 |
"for contextual help (optional), sections (required), and settings (required)."
|
1271 |
msgstr ""
|
1272 |
|
1273 |
+
#: includes/ot-functions-docs-page.php:810
|
1274 |
msgid ""
|
1275 |
"The code below is a boilerplate to get your started. For a full list of the "
|
1276 |
"available option types click the \"Option Types\" tab above. Also a quick "
|
1298 |
msgstr ""
|
1299 |
|
1300 |
#: includes/ot-functions-option-types.php:140
|
1301 |
+
#: includes/ot-functions-option-types.php:1709
|
1302 |
msgid "Add Media"
|
1303 |
msgstr ""
|
1304 |
|
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
|
@@ -34,9 +34,6 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
34 |
/* setup the constants */
|
35 |
$this->constants();
|
36 |
|
37 |
-
/* load text domain */
|
38 |
-
$this->load_textdomain();
|
39 |
-
|
40 |
/* include the required admin files */
|
41 |
$this->admin_includes();
|
42 |
|
@@ -63,7 +60,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
63 |
/**
|
64 |
* Current Version number.
|
65 |
*/
|
66 |
-
define( 'OT_VERSION', '2.0.
|
67 |
|
68 |
/**
|
69 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
@@ -99,6 +96,16 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
99 |
*/
|
100 |
define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) );
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* For developers: Meta Boxes.
|
104 |
*
|
@@ -112,10 +119,9 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
112 |
/**
|
113 |
* Check if in theme mode.
|
114 |
*
|
115 |
-
* If
|
116 |
-
* like
|
117 |
-
*
|
118 |
-
* OT_CHILD_MODE is set to true.
|
119 |
*
|
120 |
* @since 2.0
|
121 |
*/
|
@@ -126,23 +132,13 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
126 |
define( 'OT_DIR', trailingslashit( get_template_directory() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
127 |
define( 'OT_URL', trailingslashit( get_template_directory_uri() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
128 |
}
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
*
|
137 |
-
* @access private
|
138 |
-
* @since 2.0
|
139 |
-
*/
|
140 |
-
public function load_textdomain() {
|
141 |
-
if ( false == OT_THEME_MODE ) {
|
142 |
-
load_plugin_textdomain( 'option-tree', false, OT_DIR . 'languages' );
|
143 |
-
} else {
|
144 |
-
load_theme_textdomain( 'option-tree', OT_DIR . 'languages' );
|
145 |
-
}
|
146 |
}
|
147 |
|
148 |
/**
|
@@ -224,6 +220,14 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
224 |
*/
|
225 |
public function hooks() {
|
226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
if ( OT_META_BOXES == true ) {
|
228 |
|
229 |
/* add scripts for metaboxes to post-new.php & post.php */
|
@@ -292,6 +296,22 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
292 |
|
293 |
}
|
294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
/**
|
296 |
* Adds the global CSS to fix the menu icon.
|
297 |
*/
|
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.10
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
* License: GPLv2
|
34 |
/* setup the constants */
|
35 |
$this->constants();
|
36 |
|
|
|
|
|
|
|
37 |
/* include the required admin files */
|
38 |
$this->admin_includes();
|
39 |
|
60 |
/**
|
61 |
* Current Version number.
|
62 |
*/
|
63 |
+
define( 'OT_VERSION', '2.0.10' );
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
96 |
*/
|
97 |
define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) );
|
98 |
|
99 |
+
/**
|
100 |
+
* For developers: Show New Layout.
|
101 |
+
*
|
102 |
+
* Run a filter and set to false if you don't want to show the
|
103 |
+
* "New Layout" section at the top of the theme options page.
|
104 |
+
*
|
105 |
+
* @since 2.0.10
|
106 |
+
*/
|
107 |
+
define( 'OT_SHOW_NEW_LAYOUT', apply_filters( 'ot_show_new_layout', true ) );
|
108 |
+
|
109 |
/**
|
110 |
* For developers: Meta Boxes.
|
111 |
*
|
119 |
/**
|
120 |
* Check if in theme mode.
|
121 |
*
|
122 |
+
* If OT_THEME_MODE is false, set the directory path & URL
|
123 |
+
* like any other plugin. Otherwise, use the parent themes
|
124 |
+
* root directory.
|
|
|
125 |
*
|
126 |
* @since 2.0
|
127 |
*/
|
132 |
define( 'OT_DIR', trailingslashit( get_template_directory() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
133 |
define( 'OT_URL', trailingslashit( get_template_directory_uri() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
134 |
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Relative path to the languages directory.
|
138 |
+
*
|
139 |
+
* @since 2.0.10
|
140 |
+
*/
|
141 |
+
define( 'OT_LANG_DIR', dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
|
144 |
/**
|
220 |
*/
|
221 |
public function hooks() {
|
222 |
|
223 |
+
/* load the text domain */
|
224 |
+
if ( false == OT_THEME_MODE ) {
|
225 |
+
add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
|
226 |
+
} else {
|
227 |
+
add_action( 'after_setup_theme', array( &$this, 'load_textdomain' ) );
|
228 |
+
}
|
229 |
+
|
230 |
+
/* load the Meta Box assets */
|
231 |
if ( OT_META_BOXES == true ) {
|
232 |
|
233 |
/* add scripts for metaboxes to post-new.php & post.php */
|
296 |
|
297 |
}
|
298 |
|
299 |
+
/**
|
300 |
+
* Load the text domain.
|
301 |
+
*
|
302 |
+
* @return void
|
303 |
+
*
|
304 |
+
* @access private
|
305 |
+
* @since 2.0
|
306 |
+
*/
|
307 |
+
public function load_textdomain() {
|
308 |
+
if ( false == OT_THEME_MODE ) {
|
309 |
+
load_plugin_textdomain( 'option-tree', false, OT_LANG_DIR . 'plugin' );
|
310 |
+
} else {
|
311 |
+
load_theme_textdomain( 'option-tree', OT_LANG_DIR . 'theme-mode' );
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
/**
|
316 |
* Adds the global CSS to fix the menu icon.
|
317 |
*/
|
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,23 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
= 2.0.9 =
|
45 |
* Fixed the issue where the Textarea Simple and CSS option types were mysteriously being ran through wpautop.
|
46 |
* Added missing class setting to Textarea, Textarea Simple, & CSS option types.
|
@@ -182,7 +199,7 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
182 |
|
183 |
== Upgrade Notice ==
|
184 |
|
185 |
-
= 2.0.
|
186 |
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.
|
187 |
|
188 |
= 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.10
|
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.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.
|
47 |
+
* Added CSS id's to tabs and settings.
|
48 |
+
* Allow "New Layout" section to be hidden on the theme options page via a filter.
|
49 |
+
* Fixed a bug where the Colorpicker was not closing in List Items.
|
50 |
+
* Change capabilities from manage_options to edit_theme_options.
|
51 |
+
* Remove Textblock title in List Items & Metaboxes.
|
52 |
+
* Fixed a List Item bug that incorrectly added ID's based on counting objects - submitted by Spark
|
53 |
+
* Fixed incorrect text domain paths for both plugin and theme mode.
|
54 |
+
* Fixed a bug with UI Sortable not properly calculating the container height.
|
55 |
+
* Fixed Select dropdown selector bug - submitted by Manfred Haltner
|
56 |
+
* Fixed Radio Image remove class bug - submitted by designst
|
57 |
+
* Added new typography fields - submitted by darknailblue
|
58 |
+
* Added dynamic CSS support for new typography fields.
|
59 |
+
* Added new filters to typography fields, including low/high range & unit types.
|
60 |
+
|
61 |
= 2.0.9 =
|
62 |
* Fixed the issue where the Textarea Simple and CSS option types were mysteriously being ran through wpautop.
|
63 |
* Added missing class setting to Textarea, Textarea Simple, & CSS option types.
|
199 |
|
200 |
== Upgrade Notice ==
|
201 |
|
202 |
+
= 2.0.10 =
|
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 =
|