Version Description
- Removed deprecated assigning of return value in PHP.
- Patch to fix PHP notice regression with the use of load_template in a plugin after Theme Check update.
- Fixed missing required arguments in OT_Loader::add_layout.
- Removed esc_attr() on font-family check.
- Added a 'ot_theme_options_parent_slug' filter in ot-ui-theme-options.php
- Fixed WP_Error from the use of wp_get_remote() instead of file_get_contents().
Download this release
Release Info
Developer | valendesigns |
Plugin | OptionTree |
Version | 2.0.14 |
Comparing to | |
See all releases |
Code changes from version 2.0.13 to 2.0.14
- includes/ot-functions-admin.php +143 -67
- includes/ot-functions-compat.php +8 -0
- includes/ot-functions-option-types.php +1 -1
- includes/ot-functions.php +76 -0
- includes/ot-settings-api.php +57 -2
- includes/ot-ui-theme-options.php +1 -1
- languages/option-tree.pot +69 -69
- ot-loader.php +12 -3
- readme.txt +10 -2
includes/ot-functions-admin.php
CHANGED
@@ -10,71 +10,7 @@
|
|
10 |
* @copyright Copyright (c) 2012, Derek Herman
|
11 |
* @since 2.0
|
12 |
*/
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Helper function to return encoded strings
|
16 |
-
*
|
17 |
-
* @return string
|
18 |
-
*
|
19 |
-
* @access public
|
20 |
-
* @since 2.0.13
|
21 |
-
*/
|
22 |
-
function ot_encode( $value ) {
|
23 |
-
|
24 |
-
return base64_encode( $value );
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Helper function to return decoded strings
|
30 |
-
*
|
31 |
-
* @return string
|
32 |
-
*
|
33 |
-
* @access public
|
34 |
-
* @since 2.0.13
|
35 |
-
*/
|
36 |
-
function ot_decode( $value ) {
|
37 |
-
|
38 |
-
return base64_decode( $value );
|
39 |
-
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Helper function to open a file
|
44 |
-
*
|
45 |
-
* @access public
|
46 |
-
* @since 2.0.13
|
47 |
-
*/
|
48 |
-
function ot_file_open( $handle, $mode ) {
|
49 |
-
|
50 |
-
@fopen( $handle, $mode );
|
51 |
-
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Helper function to close a file
|
56 |
-
*
|
57 |
-
* @access public
|
58 |
-
* @since 2.0.13
|
59 |
-
*/
|
60 |
-
function ot_file_close( $handle ) {
|
61 |
-
|
62 |
-
fclose( $handle );
|
63 |
-
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Helper function to write to an open file
|
68 |
-
*
|
69 |
-
* @access public
|
70 |
-
* @since 2.0.13
|
71 |
-
*/
|
72 |
-
function ot_file_write( $handle, $string ) {
|
73 |
-
|
74 |
-
fwrite( $handle, $string );
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
/**
|
79 |
* Runs directly after the Theme Options are save.
|
80 |
*
|
@@ -798,6 +734,10 @@ if ( ! function_exists( 'ot_import_xml' ) ) {
|
|
798 |
function ot_import_xml( $file ) {
|
799 |
|
800 |
$get_data = wp_remote_get( $file );
|
|
|
|
|
|
|
|
|
801 |
$rawdata = isset( $get_data['body'] ) ? $get_data['body'] : false;
|
802 |
|
803 |
if ( $rawdata ) {
|
@@ -1253,8 +1193,48 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
1253 |
|
1254 |
/* is array: save & show success message */
|
1255 |
if ( is_array( $settings ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1256 |
update_option( 'option_tree_settings', $settings );
|
1257 |
$message = 'success';
|
|
|
1258 |
}
|
1259 |
|
1260 |
/* redirect */
|
@@ -3049,7 +3029,7 @@ if ( ! function_exists( 'ot_contextual_help_view' ) ) {
|
|
3049 |
*/
|
3050 |
if ( ! function_exists( 'ot_layouts_view' ) ) {
|
3051 |
|
3052 |
-
function ot_layout_view( $key, $data, $active_layout ) {
|
3053 |
|
3054 |
return '
|
3055 |
<div class="option-tree-setting">
|
@@ -3062,7 +3042,7 @@ if ( ! function_exists( 'ot_layouts_view' ) ) {
|
|
3062 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3063 |
</a>
|
3064 |
</div>
|
3065 |
-
<input type="hidden" name="option_tree_layouts[' . esc_attr( $key ) . ']" value="' .
|
3066 |
</div>';
|
3067 |
|
3068 |
}
|
@@ -3532,5 +3512,101 @@ function ot_range( $start, $limit, $step = 1 ) {
|
|
3532 |
return $range;
|
3533 |
}
|
3534 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3535 |
/* End of file ot-functions-admin.php */
|
3536 |
/* Location: ./includes/ot-functions-admin.php */
|
10 |
* @copyright Copyright (c) 2012, Derek Herman
|
11 |
* @since 2.0
|
12 |
*/
|
13 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* Runs directly after the Theme Options are save.
|
16 |
*
|
734 |
function ot_import_xml( $file ) {
|
735 |
|
736 |
$get_data = wp_remote_get( $file );
|
737 |
+
|
738 |
+
if ( is_wp_error( $get_data ) )
|
739 |
+
return false;
|
740 |
+
|
741 |
$rawdata = isset( $get_data['body'] ) ? $get_data['body'] : false;
|
742 |
|
743 |
if ( $rawdata ) {
|
1193 |
|
1194 |
/* is array: save & show success message */
|
1195 |
if ( is_array( $settings ) ) {
|
1196 |
+
|
1197 |
+
// WPML unregister ID's that have been removed
|
1198 |
+
if ( function_exists( 'icl_unregister_string' ) ) {
|
1199 |
+
|
1200 |
+
$current = get_option( 'option_tree_settings' );
|
1201 |
+
|
1202 |
+
if ( isset( $current['settings'] ) ) {
|
1203 |
+
|
1204 |
+
// Empty ID array
|
1205 |
+
$new_ids = array();
|
1206 |
+
|
1207 |
+
// Build the IDs
|
1208 |
+
foreach( $settings['settings'] as $setting ) {
|
1209 |
+
|
1210 |
+
if ( $setting['id'] ) {
|
1211 |
+
|
1212 |
+
$new_ids[] = $setting['id'];
|
1213 |
+
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
// Remove IDs from WPML
|
1219 |
+
/*
|
1220 |
+
foreach( $current['settings'] as $setting ) {
|
1221 |
+
|
1222 |
+
if ( ! in_array( $setting['id'], $new_ids ) ) {
|
1223 |
+
|
1224 |
+
wpml_unregister_string( $setting['id'] );
|
1225 |
+
|
1226 |
+
}
|
1227 |
+
|
1228 |
+
}
|
1229 |
+
*/
|
1230 |
+
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
}
|
1234 |
+
|
1235 |
update_option( 'option_tree_settings', $settings );
|
1236 |
$message = 'success';
|
1237 |
+
|
1238 |
}
|
1239 |
|
1240 |
/* redirect */
|
3029 |
*/
|
3030 |
if ( ! function_exists( 'ot_layouts_view' ) ) {
|
3031 |
|
3032 |
+
function ot_layout_view( $key, $data = '', $active_layout = '' ) {
|
3033 |
|
3034 |
return '
|
3035 |
<div class="option-tree-setting">
|
3042 |
<span class="icon trash-can">' . __( 'Delete', 'option-tree' ) . '</span>
|
3043 |
</a>
|
3044 |
</div>
|
3045 |
+
<input type="hidden" name="option_tree_layouts[' . esc_attr( $key ) . ']" value="' . $data . '" />
|
3046 |
</div>';
|
3047 |
|
3048 |
}
|
3512 |
return $range;
|
3513 |
}
|
3514 |
|
3515 |
+
/**
|
3516 |
+
* Helper function to return encoded strings
|
3517 |
+
*
|
3518 |
+
* @return string
|
3519 |
+
*
|
3520 |
+
* @access public
|
3521 |
+
* @since 2.0.13
|
3522 |
+
*/
|
3523 |
+
function ot_encode( $value ) {
|
3524 |
+
|
3525 |
+
return base64_encode( $value );
|
3526 |
+
|
3527 |
+
}
|
3528 |
+
|
3529 |
+
/**
|
3530 |
+
* Helper function to return decoded strings
|
3531 |
+
*
|
3532 |
+
* @return string
|
3533 |
+
*
|
3534 |
+
* @access public
|
3535 |
+
* @since 2.0.13
|
3536 |
+
*/
|
3537 |
+
function ot_decode( $value ) {
|
3538 |
+
|
3539 |
+
return base64_decode( $value );
|
3540 |
+
|
3541 |
+
}
|
3542 |
+
|
3543 |
+
/**
|
3544 |
+
* Helper function to open a file
|
3545 |
+
*
|
3546 |
+
* @access public
|
3547 |
+
* @since 2.0.13
|
3548 |
+
*/
|
3549 |
+
function ot_file_open( $handle, $mode ) {
|
3550 |
+
|
3551 |
+
@fopen( $handle, $mode );
|
3552 |
+
|
3553 |
+
}
|
3554 |
+
|
3555 |
+
/**
|
3556 |
+
* Helper function to close a file
|
3557 |
+
*
|
3558 |
+
* @access public
|
3559 |
+
* @since 2.0.13
|
3560 |
+
*/
|
3561 |
+
function ot_file_close( $handle ) {
|
3562 |
+
|
3563 |
+
fclose( $handle );
|
3564 |
+
|
3565 |
+
}
|
3566 |
+
|
3567 |
+
/**
|
3568 |
+
* Helper function to write to an open file
|
3569 |
+
*
|
3570 |
+
* @access public
|
3571 |
+
* @since 2.0.13
|
3572 |
+
*/
|
3573 |
+
function ot_file_write( $handle, $string ) {
|
3574 |
+
|
3575 |
+
fwrite( $handle, $string );
|
3576 |
+
|
3577 |
+
}
|
3578 |
+
|
3579 |
+
/**
|
3580 |
+
* Helper function to register a WPML string
|
3581 |
+
*
|
3582 |
+
* @access public
|
3583 |
+
* @since 2.0.14
|
3584 |
+
*/
|
3585 |
+
function wpml_register_string( $id, $value ) {
|
3586 |
+
|
3587 |
+
if ( function_exists( 'icl_register_string' ) ) {
|
3588 |
+
|
3589 |
+
icl_register_string( 'OptionTree', $id, $value );
|
3590 |
+
|
3591 |
+
}
|
3592 |
+
|
3593 |
+
}
|
3594 |
+
|
3595 |
+
/**
|
3596 |
+
* Helper function to unregister a WPML string
|
3597 |
+
*
|
3598 |
+
* @access public
|
3599 |
+
* @since 2.0.14
|
3600 |
+
*/
|
3601 |
+
function wpml_unregister_string( $id ) {
|
3602 |
+
|
3603 |
+
if ( function_exists( 'icl_unregister_string' ) ) {
|
3604 |
+
|
3605 |
+
icl_unregister_string( 'OptionTree', $id );
|
3606 |
+
|
3607 |
+
}
|
3608 |
+
|
3609 |
+
}
|
3610 |
+
|
3611 |
/* End of file ot-functions-admin.php */
|
3612 |
/* Location: ./includes/ot-functions-admin.php */
|
includes/ot-functions-compat.php
CHANGED
@@ -73,6 +73,10 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
|
|
73 |
if ( $has_data == true && ! get_option( 'option_tree' ) ) {
|
74 |
|
75 |
$get_data = wp_remote_get( $data_file );
|
|
|
|
|
|
|
|
|
76 |
$rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
|
77 |
$options = unserialize( ot_decode( $rawdata ) );
|
78 |
|
@@ -110,6 +114,10 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
|
|
110 |
if ( $has_layout == true && ! get_option( 'option_tree_layouts' ) ) {
|
111 |
|
112 |
$get_data = wp_remote_get( $data_file );
|
|
|
|
|
|
|
|
|
113 |
$rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
|
114 |
$layouts = unserialize( ot_decode( $rawdata ) );
|
115 |
|
73 |
if ( $has_data == true && ! get_option( 'option_tree' ) ) {
|
74 |
|
75 |
$get_data = wp_remote_get( $data_file );
|
76 |
+
|
77 |
+
if ( is_wp_error( $get_data ) )
|
78 |
+
return false;
|
79 |
+
|
80 |
$rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
|
81 |
$options = unserialize( ot_decode( $rawdata ) );
|
82 |
|
114 |
if ( $has_layout == true && ! get_option( 'option_tree_layouts' ) ) {
|
115 |
|
116 |
$get_data = wp_remote_get( $data_file );
|
117 |
+
|
118 |
+
if ( is_wp_error( $get_data ) )
|
119 |
+
return false;
|
120 |
+
|
121 |
$rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
|
122 |
$layouts = unserialize( ot_decode( $rawdata ) );
|
123 |
|
includes/ot-functions-option-types.php
CHANGED
@@ -1592,7 +1592,7 @@ if ( ! function_exists( 'ot_type_typography' ) ) {
|
|
1592 |
|
1593 |
/* build font family */
|
1594 |
if ( in_array( 'font-family', $ot_recognized_typography_fields ) ) {
|
1595 |
-
$font_family = isset( $field_value['font-family'] ) ?
|
1596 |
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 ) . '">';
|
1597 |
echo '<option value="">font-family</option>';
|
1598 |
foreach ( ot_recognized_font_families( $field_id ) as $key => $value ) {
|
1592 |
|
1593 |
/* build font family */
|
1594 |
if ( in_array( 'font-family', $ot_recognized_typography_fields ) ) {
|
1595 |
+
$font_family = isset( $field_value['font-family'] ) ? $field_value['font-family'] : '';
|
1596 |
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 ) . '">';
|
1597 |
echo '<option value="">font-family</option>';
|
1598 |
foreach ( ot_recognized_font_families( $field_id ) as $key => $value ) {
|
includes/ot-functions.php
CHANGED
@@ -30,7 +30,9 @@ if ( ! function_exists( 'ot_get_option' ) ) {
|
|
30 |
|
31 |
/* look for the saved value */
|
32 |
if ( isset( $options[$option_id] ) && '' != $options[$option_id] ) {
|
|
|
33 |
return $options[$option_id];
|
|
|
34 |
}
|
35 |
|
36 |
return $default;
|
@@ -39,6 +41,80 @@ if ( ! function_exists( 'ot_get_option' ) ) {
|
|
39 |
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* Enqueue the dynamic CSS.
|
44 |
*
|
30 |
|
31 |
/* look for the saved value */
|
32 |
if ( isset( $options[$option_id] ) && '' != $options[$option_id] ) {
|
33 |
+
|
34 |
return $options[$option_id];
|
35 |
+
|
36 |
}
|
37 |
|
38 |
return $default;
|
41 |
|
42 |
}
|
43 |
|
44 |
+
/**
|
45 |
+
* Filter the return values through WPML
|
46 |
+
*
|
47 |
+
* @param array $options The current options
|
48 |
+
* @param string $option_id The option ID
|
49 |
+
* @return mixed
|
50 |
+
*
|
51 |
+
* @access public
|
52 |
+
* @since 2.0.14
|
53 |
+
*/
|
54 |
+
if ( ! function_exists( 'ot_wpml_filter' ) ) {
|
55 |
+
|
56 |
+
function ot_wpml_filter( $options, $option_id ) {
|
57 |
+
|
58 |
+
// Return translated strings using WMPL
|
59 |
+
if ( function_exists('icl_t') ) {
|
60 |
+
|
61 |
+
$settings = get_option( 'option_tree_settings' );
|
62 |
+
|
63 |
+
if ( isset( $settings['settings'] ) ) {
|
64 |
+
|
65 |
+
foreach( $settings['settings'] as $setting ) {
|
66 |
+
|
67 |
+
if ( $option_id == $setting['id'] && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
|
68 |
+
|
69 |
+
$is_list = true;
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
// List Item & Slider
|
78 |
+
if ( isset( $is_list ) ) {
|
79 |
+
|
80 |
+
foreach( $options[$option_id] as $key => $value ) {
|
81 |
+
|
82 |
+
foreach( $value as $ckey => $cvalue ) {
|
83 |
+
|
84 |
+
$id = $option_id . '_' . $ckey . '_' . $key;
|
85 |
+
$_string = icl_t( 'OptionTree', $id, $cvalue );
|
86 |
+
|
87 |
+
if ( ! empty( $_string ) ) {
|
88 |
+
|
89 |
+
$options[$option_id][$key][$ckey] = $_string;
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
}
|
96 |
+
|
97 |
+
// All none array values
|
98 |
+
} else if ( ! is_array( $options[$option_id] ) ) {
|
99 |
+
|
100 |
+
$_string = icl_t( 'OptionTree', $option_id, $options[$option_id] );
|
101 |
+
|
102 |
+
if ( ! empty( $options[$option_id] ) ) {
|
103 |
+
|
104 |
+
$options[$option_id] = $_string;
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
return $options[$option_id];
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
/**
|
119 |
* Enqueue the dynamic CSS.
|
120 |
*
|
includes/ot-settings-api.php
CHANGED
@@ -571,7 +571,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
571 |
|
572 |
/* validate setting */
|
573 |
if ( is_array( $input[$setting['id']] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
|
574 |
-
|
575 |
/* required title setting */
|
576 |
$required_setting = array(
|
577 |
array(
|
@@ -600,6 +600,9 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
600 |
/* merge the two settings array */
|
601 |
$settings = array_merge( $required_setting, $settings );
|
602 |
|
|
|
|
|
|
|
603 |
foreach( $input[$setting['id']] as $k => $setting_array ) {
|
604 |
|
605 |
foreach( $settings as $sub_setting ) {
|
@@ -609,16 +612,66 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
609 |
|
610 |
$input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'] );
|
611 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
}
|
613 |
|
614 |
}
|
615 |
|
616 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
|
618 |
} else {
|
619 |
|
620 |
$input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'] );
|
621 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
}
|
623 |
|
624 |
}
|
@@ -630,6 +683,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
630 |
}
|
631 |
|
632 |
return $input;
|
|
|
633 |
}
|
634 |
|
635 |
/**
|
@@ -828,6 +882,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
828 |
}
|
829 |
|
830 |
return false;
|
|
|
831 |
}
|
832 |
|
833 |
}
|
@@ -851,7 +906,7 @@ if ( ! function_exists( 'ot_register_settings' ) ) {
|
|
851 |
if ( ! $args )
|
852 |
return;
|
853 |
|
854 |
-
$ot_settings
|
855 |
}
|
856 |
|
857 |
}
|
571 |
|
572 |
/* validate setting */
|
573 |
if ( is_array( $input[$setting['id']] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) {
|
574 |
+
|
575 |
/* required title setting */
|
576 |
$required_setting = array(
|
577 |
array(
|
600 |
/* merge the two settings array */
|
601 |
$settings = array_merge( $required_setting, $settings );
|
602 |
|
603 |
+
// Empty ID's array
|
604 |
+
//$new_ids = array();
|
605 |
+
|
606 |
foreach( $input[$setting['id']] as $k => $setting_array ) {
|
607 |
|
608 |
foreach( $settings as $sub_setting ) {
|
612 |
|
613 |
$input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'] );
|
614 |
|
615 |
+
// Item ID
|
616 |
+
//$wmpl_id = $setting['id'] . '_' . $sub_setting['id'] . '_' . $k;
|
617 |
+
|
618 |
+
// WPML Register strings
|
619 |
+
/*
|
620 |
+
if ( ! empty( $input[$setting['id']][$k][$sub_setting['id']] ) ) {
|
621 |
+
|
622 |
+
$new_ids[] = $wmpl_id;
|
623 |
+
|
624 |
+
wpml_register_string( $wmpl_id, $input[$setting['id']][$k][$sub_setting['id']] );
|
625 |
+
|
626 |
+
}
|
627 |
+
*/
|
628 |
+
|
629 |
}
|
630 |
|
631 |
}
|
632 |
|
633 |
}
|
634 |
+
|
635 |
+
// WPML Unregister strings
|
636 |
+
/*
|
637 |
+
$options = get_option( 'option_tree' );
|
638 |
+
if ( isset( $options[$setting['id']] ) ) {
|
639 |
+
|
640 |
+
foreach( $options[$setting['id']] as $key => $value ) {
|
641 |
+
|
642 |
+
foreach( $value as $ckey => $cvalue ) {
|
643 |
+
|
644 |
+
$temp_id = $setting['id'] . '_' . $ckey . '_' . $key;
|
645 |
+
|
646 |
+
if ( ! in_array( $temp_id, $new_ids ) ) {
|
647 |
+
|
648 |
+
wpml_unregister_string( $temp_id );
|
649 |
+
|
650 |
+
}
|
651 |
+
|
652 |
+
}
|
653 |
+
}
|
654 |
+
|
655 |
+
}
|
656 |
+
*/
|
657 |
|
658 |
} else {
|
659 |
|
660 |
$input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'] );
|
661 |
|
662 |
+
// WPML Register and Unregister strings
|
663 |
+
/*
|
664 |
+
if ( ! empty( $input[$setting['id']] ) ) {
|
665 |
+
|
666 |
+
wpml_register_string( $setting['id'], $input[$setting['id']] );
|
667 |
+
|
668 |
+
} else {
|
669 |
+
|
670 |
+
wpml_unregister_string( $setting['id'] );
|
671 |
+
|
672 |
+
}
|
673 |
+
*/
|
674 |
+
|
675 |
}
|
676 |
|
677 |
}
|
683 |
}
|
684 |
|
685 |
return $input;
|
686 |
+
|
687 |
}
|
688 |
|
689 |
/**
|
882 |
}
|
883 |
|
884 |
return false;
|
885 |
+
|
886 |
}
|
887 |
|
888 |
}
|
906 |
if ( ! $args )
|
907 |
return;
|
908 |
|
909 |
+
$ot_settings = new OT_Settings( $args );
|
910 |
}
|
911 |
|
912 |
}
|
includes/ot-ui-theme-options.php
CHANGED
@@ -30,7 +30,7 @@ if ( function_exists( 'ot_register_settings' ) ) {
|
|
30 |
'pages' => array(
|
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' => apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ),
|
30 |
'pages' => array(
|
31 |
array(
|
32 |
'id' => 'ot_theme_options',
|
33 |
+
'parent_slug' => apply_filters( 'ot_theme_options_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' => apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ),
|
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: 2013-03-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,287 +12,287 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: includes/ot-functions-admin.php:
|
16 |
msgid "The Colorpicker only allows valid hexadecimal values."
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: includes/ot-functions-admin.php:
|
20 |
msgid "Send to OptionTree"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: includes/ot-functions-admin.php:
|
24 |
#: includes/ot-functions-option-types.php:152
|
25 |
#: includes/ot-functions-option-types.php:1749
|
26 |
msgid "Remove Media"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: includes/ot-functions-admin.php:
|
30 |
msgid "Are you sure you want to reset back to the defaults?"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/ot-functions-admin.php:
|
34 |
msgid "You can't remove this! But you can edit the values."
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/ot-functions-admin.php:
|
38 |
msgid "Are you sure you want to remove this?"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/ot-functions-admin.php:
|
42 |
msgid "Are you sure you want to activate this layout?"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/ot-functions-admin.php:
|
46 |
msgid "Sorry, you can't have settings three levels deep."
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: includes/ot-functions-admin.php:
|
50 |
msgid "Option Tree"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: includes/ot-functions-admin.php:
|
54 |
msgid "General"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: includes/ot-functions-admin.php:
|
58 |
msgid "Sample Text Field Label"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: includes/ot-functions-admin.php:
|
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:579
|
292 |
msgid "Title"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: includes/ot-functions-admin.php:
|
296 |
msgid "New Layout"
|
297 |
msgstr ""
|
298 |
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
|
7 |
+
"POT-Creation-Date: 2013-03-29 17:10:39+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: includes/ot-functions-admin.php:83
|
16 |
msgid "The Colorpicker only allows valid hexadecimal values."
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: includes/ot-functions-admin.php:163
|
20 |
msgid "Send to OptionTree"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: includes/ot-functions-admin.php:164
|
24 |
#: includes/ot-functions-option-types.php:152
|
25 |
#: includes/ot-functions-option-types.php:1749
|
26 |
msgid "Remove Media"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: includes/ot-functions-admin.php:165
|
30 |
msgid "Are you sure you want to reset back to the defaults?"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: includes/ot-functions-admin.php:166
|
34 |
msgid "You can't remove this! But you can edit the values."
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: includes/ot-functions-admin.php:167
|
38 |
msgid "Are you sure you want to remove this?"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: includes/ot-functions-admin.php:168
|
42 |
msgid "Are you sure you want to activate this layout?"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: includes/ot-functions-admin.php:169
|
46 |
msgid "Sorry, you can't have settings three levels deep."
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: includes/ot-functions-admin.php:215
|
50 |
msgid "Option Tree"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: includes/ot-functions-admin.php:351
|
54 |
msgid "General"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: includes/ot-functions-admin.php:357
|
58 |
msgid "Sample Text Field Label"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: includes/ot-functions-admin.php:358
|
62 |
msgid "Description for the sample text field."
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: includes/ot-functions-admin.php:1510
|
66 |
msgid "Layout activated."
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: includes/ot-functions-admin.php:1523
|
70 |
msgid "Settings updated."
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: includes/ot-functions-admin.php:1527
|
74 |
msgid "Settings could not be saved."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: includes/ot-functions-admin.php:1535
|
78 |
msgid "Settings Imported."
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: includes/ot-functions-admin.php:1539
|
82 |
msgid "Settings could not be imported."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: includes/ot-functions-admin.php:1546
|
86 |
msgid "Data Imported."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: includes/ot-functions-admin.php:1550
|
90 |
msgid "Data could not be imported."
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: includes/ot-functions-admin.php:1558
|
94 |
msgid "Layouts Imported."
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: includes/ot-functions-admin.php:1562
|
98 |
msgid "Layouts could not be imported."
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: includes/ot-functions-admin.php:1570
|
102 |
msgid "Layouts Updated."
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: includes/ot-functions-admin.php:1574
|
106 |
msgid "Layouts could not be updated."
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: includes/ot-functions-admin.php:2125
|
110 |
msgid "Left Sidebar"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/ot-functions-admin.php:2130
|
114 |
msgid "Right Sidebar"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/ot-functions-admin.php:2135
|
118 |
msgid "Full Width (no sidebar)"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: includes/ot-functions-admin.php:2140
|
122 |
msgid "Dual Sidebar"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/ot-functions-admin.php:2145
|
126 |
msgid "Left Dual Sidebar"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/ot-functions-admin.php:2150
|
130 |
msgid "Right Dual Sidebar"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/ot-functions-admin.php:2180 includes/ot-functions-admin.php:2241
|
134 |
msgid "Image"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: includes/ot-functions-admin.php:2191 includes/ot-functions-admin.php:2247
|
138 |
msgid "Link"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: includes/ot-functions-admin.php:2202 includes/ot-functions-admin.php:2253
|
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:2722
|
149 |
msgid "edit"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/ot-functions-admin.php:2723 includes/ot-functions-admin.php:2777
|
153 |
+
#: includes/ot-functions-admin.php:2778 includes/ot-functions-admin.php:2913
|
154 |
+
#: includes/ot-functions-admin.php:2914 includes/ot-functions-admin.php:2979
|
155 |
+
#: includes/ot-functions-admin.php:2980 includes/ot-functions-admin.php:3107
|
156 |
+
#: includes/ot-functions-admin.php:3108
|
157 |
msgid "Edit"
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/ot-functions-admin.php:2725 includes/ot-functions-admin.php:2726
|
161 |
+
#: includes/ot-functions-admin.php:2780 includes/ot-functions-admin.php:2781
|
162 |
+
#: includes/ot-functions-admin.php:2916 includes/ot-functions-admin.php:2917
|
163 |
+
#: includes/ot-functions-admin.php:2982 includes/ot-functions-admin.php:2983
|
164 |
+
#: includes/ot-functions-admin.php:3041 includes/ot-functions-admin.php:3042
|
165 |
+
#: includes/ot-functions-admin.php:3110 includes/ot-functions-admin.php:3111
|
166 |
msgid "Delete"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: includes/ot-functions-admin.php:2732
|
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:2740
|
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:2787
|
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:2795 includes/ot-functions-admin.php:2997
|
188 |
msgid ""
|
189 |
"<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
|
190 |
"allowed."
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: includes/ot-functions-admin.php:2803
|
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:2814
|
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:2822
|
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:2827
|
213 |
msgid "Add Choice"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/ot-functions-admin.php:2833
|
217 |
msgid ""
|
218 |
"<strong>Settings</strong>: This will only affect the List Item option type."
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: includes/ot-functions-admin.php:2838
|
222 |
#: includes/ot-functions-settings-page.php:93
|
223 |
msgid "Add Setting"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: includes/ot-functions-admin.php:2844
|
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:2852
|
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:2860
|
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:2868
|
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:2876
|
255 |
msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/ot-functions-admin.php:2923 includes/ot-functions-docs-page.php:29
|
259 |
msgid "Label"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: includes/ot-functions-admin.php:2933
|
263 |
msgid "Value"
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: includes/ot-functions-admin.php:2943
|
267 |
msgid "Image Source (Radio Image only)"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: includes/ot-functions-admin.php:2989
|
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:3005
|
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:3036
|
283 |
msgid "Layout"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: includes/ot-functions-admin.php:3038 includes/ot-functions-admin.php:3039
|
287 |
msgid "Activate"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: includes/ot-functions-admin.php:3075 includes/ot-meta-box-api.php:181
|
291 |
#: includes/ot-settings-api.php:579
|
292 |
msgid "Title"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: includes/ot-functions-admin.php:3204
|
296 |
msgid "New Layout"
|
297 |
msgstr ""
|
298 |
|
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.
|
@@ -178,6 +178,10 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
178 |
$files[] = 'ot-ui-admin';
|
179 |
}
|
180 |
|
|
|
|
|
|
|
|
|
181 |
/* require the files */
|
182 |
foreach ( $files as $file ) {
|
183 |
load_template( OT_DIR . "includes/{$file}.php" );
|
@@ -198,11 +202,16 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
198 |
*/
|
199 |
public function includes() {
|
200 |
|
|
|
201 |
$files = array(
|
202 |
'ot-functions',
|
203 |
'ot-functions-deprecated'
|
204 |
);
|
205 |
|
|
|
|
|
|
|
|
|
206 |
/* require the files */
|
207 |
foreach ( $files as $file ) {
|
208 |
load_template( OT_DIR . "includes/{$file}.php" );
|
@@ -386,7 +395,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
386 |
*
|
387 |
* @since 2.0
|
388 |
*/
|
389 |
-
$ot_loader
|
390 |
|
391 |
}
|
392 |
|
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.14
|
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.14' );
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
178 |
$files[] = 'ot-ui-admin';
|
179 |
}
|
180 |
|
181 |
+
// Temporary patch to fix PHP notice regression after Theme Check update
|
182 |
+
global $wp_query;
|
183 |
+
$wp_query->query_vars['option_tree'] = true;
|
184 |
+
|
185 |
/* require the files */
|
186 |
foreach ( $files as $file ) {
|
187 |
load_template( OT_DIR . "includes/{$file}.php" );
|
202 |
*/
|
203 |
public function includes() {
|
204 |
|
205 |
+
|
206 |
$files = array(
|
207 |
'ot-functions',
|
208 |
'ot-functions-deprecated'
|
209 |
);
|
210 |
|
211 |
+
// Temporary patch to fix PHP notice regression after Theme Check update
|
212 |
+
global $wp_query;
|
213 |
+
$wp_query->query_vars['option_tree'] = true;
|
214 |
+
|
215 |
/* require the files */
|
216 |
foreach ( $files as $file ) {
|
217 |
load_template( OT_DIR . "includes/{$file}.php" );
|
395 |
*
|
396 |
* @since 2.0
|
397 |
*/
|
398 |
+
$ot_loader = new OT_Loader();
|
399 |
|
400 |
}
|
401 |
|
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.5
|
6 |
Tested up to: 3.5.1
|
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,14 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
41 |
|
42 |
== Changelog ==
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
= 2.0.13 =
|
45 |
* Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'.
|
46 |
* Fix an issue where Media Upload stopped working on some servers.
|
@@ -236,4 +244,4 @@ Added theme integration for developers. It's now possible to have a default XML
|
|
236 |
Having multiple sliders caused a naming collision in the JavaScript and is now fixed. Upgrade ASAP to have multiple sliders available in the UI.
|
237 |
|
238 |
= 1.1.4 =
|
239 |
-
Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme.
|
4 |
Tags: admin, theme options, meta boxes, options, admin interface, ajax
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 2.0.14
|
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.14 =
|
45 |
+
* Removed deprecated assigning of return value in PHP.
|
46 |
+
* Patch to fix PHP notice regression with the use of load_template in a plugin after Theme Check update.
|
47 |
+
* Fixed missing required arguments in OT_Loader::add_layout.
|
48 |
+
* Removed esc_attr() on font-family check.
|
49 |
+
* Added a 'ot_theme_options_parent_slug' filter in ot-ui-theme-options.php
|
50 |
+
* Fixed WP_Error from the use of wp_get_remote() instead of file_get_contents().
|
51 |
+
|
52 |
= 2.0.13 =
|
53 |
* Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'.
|
54 |
* Fix an issue where Media Upload stopped working on some servers.
|
244 |
Having multiple sliders caused a naming collision in the JavaScript and is now fixed. Upgrade ASAP to have multiple sliders available in the UI.
|
245 |
|
246 |
= 1.1.4 =
|
247 |
+
Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme.
|