Version Description
- Added support for Child Theme mode.
- Improved handling of standard values when settings are written manually.
- Add filter for CSS insertion value.
- Added 'ot_before_theme_options_save' action hook.
- Fix 'indexOf' JS error when upload is closed without uploading.
- Add textarea std value when option type is 'textarea', 'textarea-simple', or 'css'.
- Remove load_template and revert back to include_once.
- Fixed dynamic.css regression from 2.0.13 that caused the file to not save.
Download this release
Release Info
Developer | valendesigns |
Plugin | OptionTree |
Version | 2.0.15 |
Comparing to | |
See all releases |
Code changes from version 2.0.14 to 2.0.15
- assets/js/ot-admin.js +1 -1
- includes/ot-functions-admin.php +100 -77
- includes/ot-functions-option-types.php +1 -1
- includes/ot-functions.php +0 -74
- includes/ot-meta-box-api.php +3 -3
- includes/ot-settings-api.php +9 -58
- languages/option-tree.pot +18 -1648
- ot-loader.php +49 -27
- readme.txt +11 -1
assets/js/ot-admin.js
CHANGED
@@ -291,7 +291,7 @@
|
|
291 |
backup = window.send_to_editor,
|
292 |
btnContent = '',
|
293 |
intval = window.setInterval(function() {
|
294 |
-
if ( $('#TB_iframeContent').attr('src').indexOf( "&field_id=" ) !== -1 ) {
|
295 |
$('#TB_iframeContent').contents().find('#tab-type_url').hide();
|
296 |
}
|
297 |
$('#TB_iframeContent').contents().find('.savesend .button').val(option_tree.upload_text);
|
291 |
backup = window.send_to_editor,
|
292 |
btnContent = '',
|
293 |
intval = window.setInterval(function() {
|
294 |
+
if ( $('#TB_iframeContent').length > 0 && $('#TB_iframeContent').attr('src').indexOf( "&field_id=" ) !== -1 ) {
|
295 |
$('#TB_iframeContent').contents().find('#tab-type_url').hide();
|
296 |
}
|
297 |
$('#TB_iframeContent').contents().find('.savesend .button').val(option_tree.upload_text);
|
includes/ot-functions-admin.php
CHANGED
@@ -96,7 +96,7 @@ if ( ! function_exists( 'ot_validate_setting' ) ) {
|
|
96 |
|
97 |
$input[0] = sanitize_text_field( $input[0] );
|
98 |
|
99 |
-
} else if ( 'typography' == $type ) {
|
100 |
|
101 |
$input['font-color'] = ot_validate_setting( $input['font-color'], 'colorpicker', $field_id );
|
102 |
|
@@ -390,6 +390,9 @@ if ( ! function_exists( 'ot_default_settings' ) ) {
|
|
390 |
|
391 |
}
|
392 |
|
|
|
|
|
|
|
393 |
/* update the option tree array */
|
394 |
update_option( 'option_tree', $options );
|
395 |
|
@@ -615,6 +618,9 @@ if ( ! function_exists( 'ot_import' ) ) {
|
|
615 |
|
616 |
}
|
617 |
|
|
|
|
|
|
|
618 |
/* update the option tree array */
|
619 |
update_option( 'option_tree', $options );
|
620 |
|
@@ -673,8 +679,13 @@ if ( ! function_exists( 'ot_import' ) ) {
|
|
673 |
|
674 |
/* update the option tree array */
|
675 |
if ( isset( $layouts['active_layout'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
676 |
|
677 |
-
update_option( 'option_tree',
|
678 |
|
679 |
}
|
680 |
|
@@ -943,6 +954,17 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
943 |
),";
|
944 |
}
|
945 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
946 |
$setting_settings = '';
|
947 |
if ( isset( $value['settings'] ) && ! empty( $value['settings'] ) ) {
|
948 |
foreach( $value['settings'] as $setting ) {
|
@@ -974,13 +996,24 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
974 |
'choices' => array( $setting_choices
|
975 |
),";
|
976 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
977 |
|
978 |
$setting_settings.= "
|
979 |
array(
|
980 |
'id' => '$_setting_id',
|
981 |
'label' => '$_setting_label',
|
982 |
'desc' => '$_setting_desc',
|
983 |
-
'std' =>
|
984 |
'type' => '$_setting_type',
|
985 |
'rows' => '$_setting_rows',
|
986 |
'post_type' => '$_setting_post_type',
|
@@ -999,7 +1032,7 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
999 |
'id' => '$_id',
|
1000 |
'label' => '$_label',
|
1001 |
'desc' => '$_desc',
|
1002 |
-
'std' =>
|
1003 |
'type' => '$_type',
|
1004 |
'section' => '$_section',
|
1005 |
'rows' => '$_rows',
|
@@ -1020,9 +1053,9 @@ if ( ! function_exists( 'ot_export_php_settings_array' ) ) {
|
|
1020 |
|
1021 |
$content.= "<?php
|
1022 |
/**
|
1023 |
-
* Initialize the
|
1024 |
*/
|
1025 |
-
add_action( 'admin_init', 'custom_theme_options'
|
1026 |
|
1027 |
/**
|
1028 |
* Build the custom settings & update OptionTree.
|
@@ -1194,44 +1227,6 @@ if ( ! function_exists( 'ot_save_settings' ) ) {
|
|
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 |
|
@@ -1438,7 +1433,12 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
|
|
1438 |
/* rebuild the theme options */
|
1439 |
$rebuild_option_tree = unserialize( ot_decode( $rebuild[$rebuild['active_layout']] ) );
|
1440 |
if ( is_array( $rebuild_option_tree ) ) {
|
|
|
|
|
|
|
|
|
1441 |
update_option( 'option_tree', $rebuild_option_tree );
|
|
|
1442 |
}
|
1443 |
|
1444 |
/* rebuild the layouts */
|
@@ -2343,7 +2343,7 @@ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
|
|
2343 |
|
2344 |
/* Loop through CSS */
|
2345 |
foreach( $matches[0] as $option ) {
|
2346 |
-
|
2347 |
$value = '';
|
2348 |
$option_id = str_replace( array( '{{', '}}' ), '', $option );
|
2349 |
$option_array = explode( '|', $option_id );
|
@@ -2449,6 +2449,9 @@ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
|
|
2449 |
|
2450 |
}
|
2451 |
|
|
|
|
|
|
|
2452 |
/* insert CSS, even if the value is empty */
|
2453 |
$insertion = stripslashes( str_replace( $option, $value, $insertion ) );
|
2454 |
|
@@ -2769,7 +2772,20 @@ if ( ! function_exists( 'ot_settings_view' ) ) {
|
|
2769 |
function ot_settings_view( $name, $key, $setting = array() ) {
|
2770 |
|
2771 |
$child = ( strpos( $name, '][settings]') !== false ) ? true : false;
|
2772 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2773 |
return '
|
2774 |
<div class="option-tree-setting">
|
2775 |
<div class="open">' . ( isset( $setting['label'] ) ? esc_attr( $setting['label'] ) : 'Setting ' . ( $key + 1 ) ) . '</div>
|
@@ -2802,9 +2818,9 @@ if ( ! function_exists( 'ot_settings_view' ) ) {
|
|
2802 |
<div class="format-setting type-select wide-desc">
|
2803 |
<div class="description">' . __( '<strong>Type</strong>: Choose one of the available option types from the dropdown.', 'option-tree' ) . '</div>
|
2804 |
<div class="format-setting-inner">
|
2805 |
-
<select name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][type]" value="' .
|
2806 |
-
' .
|
2807 |
-
|
2808 |
</select>
|
2809 |
</div>
|
2810 |
</div>
|
@@ -2843,7 +2859,7 @@ if ( ! function_exists( 'ot_settings_view' ) ) {
|
|
2843 |
<div class="format-setting type-text wide-desc">
|
2844 |
<div class="description">' . __( '<strong>Standard</strong>: Setting the standard value for your option only works for some option types. Read the <code>OptionTree->Documentation</code> for more information on which ones.', 'option-tree' ) . '</div>
|
2845 |
<div class="format-setting-inner">
|
2846 |
-
|
2847 |
</div>
|
2848 |
</div>
|
2849 |
</div>
|
@@ -3115,9 +3131,12 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
3115 |
|
3116 |
foreach( $settings as $field ) {
|
3117 |
|
|
|
|
|
|
|
3118 |
/* set default to standard value */
|
3119 |
-
if (
|
3120 |
-
$
|
3121 |
}
|
3122 |
|
3123 |
/* make life easier */
|
@@ -3128,7 +3147,7 @@ if ( ! function_exists( 'ot_list_item_view' ) ) {
|
|
3128 |
'type' => $field['type'],
|
3129 |
'field_id' => $name . '_' . $field['id'] . '_' . $key,
|
3130 |
'field_name' => $_field_name . '[' . $key . '][' . $field['id'] . ']',
|
3131 |
-
'field_value' =>
|
3132 |
'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '',
|
3133 |
'field_std' => isset( $field['std'] ) ? $field['std'] : '',
|
3134 |
'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10,
|
@@ -3548,7 +3567,7 @@ function ot_decode( $value ) {
|
|
3548 |
*/
|
3549 |
function ot_file_open( $handle, $mode ) {
|
3550 |
|
3551 |
-
@fopen( $handle, $mode );
|
3552 |
|
3553 |
}
|
3554 |
|
@@ -3560,7 +3579,7 @@ function ot_file_open( $handle, $mode ) {
|
|
3560 |
*/
|
3561 |
function ot_file_close( $handle ) {
|
3562 |
|
3563 |
-
fclose( $handle );
|
3564 |
|
3565 |
}
|
3566 |
|
@@ -3572,39 +3591,43 @@ function ot_file_close( $handle ) {
|
|
3572 |
*/
|
3573 |
function ot_file_write( $handle, $string ) {
|
3574 |
|
3575 |
-
fwrite( $handle, $string );
|
3576 |
|
3577 |
}
|
3578 |
|
3579 |
/**
|
3580 |
-
* Helper function to
|
3581 |
*
|
3582 |
-
* @
|
3583 |
-
* @
|
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.
|
3600 |
*/
|
3601 |
-
function
|
3602 |
-
|
3603 |
-
|
|
|
|
|
|
|
|
|
3604 |
|
3605 |
-
|
3606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3607 |
}
|
|
|
|
|
3608 |
|
3609 |
}
|
3610 |
|
96 |
|
97 |
$input[0] = sanitize_text_field( $input[0] );
|
98 |
|
99 |
+
} else if ( 'typography' == $type && isset( $input['font-color'] ) ) {
|
100 |
|
101 |
$input['font-color'] = ot_validate_setting( $input['font-color'], 'colorpicker', $field_id );
|
102 |
|
390 |
|
391 |
}
|
392 |
|
393 |
+
/* execute the action hook and pass the theme options to it */
|
394 |
+
do_action( 'ot_before_theme_options_save', $options );
|
395 |
+
|
396 |
/* update the option tree array */
|
397 |
update_option( 'option_tree', $options );
|
398 |
|
618 |
|
619 |
}
|
620 |
|
621 |
+
/* execute the action hook and pass the theme options to it */
|
622 |
+
do_action( 'ot_before_theme_options_save', $options );
|
623 |
+
|
624 |
/* update the option tree array */
|
625 |
update_option( 'option_tree', $options );
|
626 |
|
679 |
|
680 |
/* update the option tree array */
|
681 |
if ( isset( $layouts['active_layout'] ) ) {
|
682 |
+
|
683 |
+
$new_options = unserialize( ot_decode( $layouts[$layouts['active_layout']] ) );
|
684 |
+
|
685 |
+
/* execute the action hook and pass the theme options to it */
|
686 |
+
do_action( 'ot_before_theme_options_save', $new_options );
|
687 |
|
688 |
+
update_option( 'option_tree', $new_options );
|
689 |
|
690 |
}
|
691 |
|
954 |
),";
|
955 |
}
|
956 |
|
957 |
+
$std = "'$_std'";
|
958 |
+
if ( is_array( $_std ) ) {
|
959 |
+
$std_array = array();
|
960 |
+
foreach( $_std as $_sk => $_sv ) {
|
961 |
+
$std_array[] = "'$_sk' => '$_sv'";
|
962 |
+
}
|
963 |
+
$std = 'array(
|
964 |
+
' . implode( ",\n", $std_array ) . '
|
965 |
+
)';
|
966 |
+
}
|
967 |
+
|
968 |
$setting_settings = '';
|
969 |
if ( isset( $value['settings'] ) && ! empty( $value['settings'] ) ) {
|
970 |
foreach( $value['settings'] as $setting ) {
|
996 |
'choices' => array( $setting_choices
|
997 |
),";
|
998 |
}
|
999 |
+
|
1000 |
+
$setting_std = "'$_setting_std'";
|
1001 |
+
if ( is_array( $_setting_std ) ) {
|
1002 |
+
$setting_std_array = array();
|
1003 |
+
foreach( $_setting_std as $_ssk => $_ssv ) {
|
1004 |
+
$setting_std_array[] = "'$_ssk' => '$_ssv'";
|
1005 |
+
}
|
1006 |
+
$setting_std = 'array(
|
1007 |
+
' . implode( ",\n", $setting_std_array ) . '
|
1008 |
+
)';
|
1009 |
+
}
|
1010 |
|
1011 |
$setting_settings.= "
|
1012 |
array(
|
1013 |
'id' => '$_setting_id',
|
1014 |
'label' => '$_setting_label',
|
1015 |
'desc' => '$_setting_desc',
|
1016 |
+
'std' => $setting_std,
|
1017 |
'type' => '$_setting_type',
|
1018 |
'rows' => '$_setting_rows',
|
1019 |
'post_type' => '$_setting_post_type',
|
1032 |
'id' => '$_id',
|
1033 |
'label' => '$_label',
|
1034 |
'desc' => '$_desc',
|
1035 |
+
'std' => $std,
|
1036 |
'type' => '$_type',
|
1037 |
'section' => '$_section',
|
1038 |
'rows' => '$_rows',
|
1053 |
|
1054 |
$content.= "<?php
|
1055 |
/**
|
1056 |
+
* Initialize the custom theme options.
|
1057 |
*/
|
1058 |
+
add_action( 'admin_init', 'custom_theme_options' );
|
1059 |
|
1060 |
/**
|
1061 |
* Build the custom settings & update OptionTree.
|
1227 |
/* is array: save & show success message */
|
1228 |
if ( is_array( $settings ) ) {
|
1229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1230 |
update_option( 'option_tree_settings', $settings );
|
1231 |
$message = 'success';
|
1232 |
|
1433 |
/* rebuild the theme options */
|
1434 |
$rebuild_option_tree = unserialize( ot_decode( $rebuild[$rebuild['active_layout']] ) );
|
1435 |
if ( is_array( $rebuild_option_tree ) ) {
|
1436 |
+
|
1437 |
+
/* execute the action hook and pass the theme options to it */
|
1438 |
+
do_action( 'ot_before_theme_options_save', $rebuild_option_tree );
|
1439 |
+
|
1440 |
update_option( 'option_tree', $rebuild_option_tree );
|
1441 |
+
|
1442 |
}
|
1443 |
|
1444 |
/* rebuild the layouts */
|
2343 |
|
2344 |
/* Loop through CSS */
|
2345 |
foreach( $matches[0] as $option ) {
|
2346 |
+
|
2347 |
$value = '';
|
2348 |
$option_id = str_replace( array( '{{', '}}' ), '', $option );
|
2349 |
$option_array = explode( '|', $option_id );
|
2449 |
|
2450 |
}
|
2451 |
|
2452 |
+
// Filter the CSS
|
2453 |
+
$value = apply_filters( 'ot_insert_css_with_markers_value', $value, $option_id );
|
2454 |
+
|
2455 |
/* insert CSS, even if the value is empty */
|
2456 |
$insertion = stripslashes( str_replace( $option, $value, $insertion ) );
|
2457 |
|
2772 |
function ot_settings_view( $name, $key, $setting = array() ) {
|
2773 |
|
2774 |
$child = ( strpos( $name, '][settings]') !== false ) ? true : false;
|
2775 |
+
$type = isset( $setting['type'] ) ? $setting['type'] : '';
|
2776 |
+
$std = isset( $setting['std'] ) ? $setting['std'] : '';
|
2777 |
+
|
2778 |
+
// Serialize the standard value just incase
|
2779 |
+
if ( is_array( $std ) ) {
|
2780 |
+
$std = maybe_serialize( $std );
|
2781 |
+
}
|
2782 |
+
|
2783 |
+
if ( in_array( $type, array( 'textarea', 'textarea-simple', 'css' ) ) ) {
|
2784 |
+
$std_form_element = '<textarea class="textarea" rows="10" cols="40" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][std]">' . esc_html( $std ) . '</textarea>';
|
2785 |
+
} else {
|
2786 |
+
$std_form_element = '<input type="text" name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][std]" value="' . esc_attr( $std ) . '" class="widefat option-tree-ui-input" autocomplete="off" />';
|
2787 |
+
}
|
2788 |
+
|
2789 |
return '
|
2790 |
<div class="option-tree-setting">
|
2791 |
<div class="open">' . ( isset( $setting['label'] ) ? esc_attr( $setting['label'] ) : 'Setting ' . ( $key + 1 ) ) . '</div>
|
2818 |
<div class="format-setting type-select wide-desc">
|
2819 |
<div class="description">' . __( '<strong>Type</strong>: Choose one of the available option types from the dropdown.', 'option-tree' ) . '</div>
|
2820 |
<div class="format-setting-inner">
|
2821 |
+
<select name="' . esc_attr( $name ) . '[' . esc_attr( $key ) . '][type]" value="' . esc_attr( $type ) . '" class="option-tree-ui-select">
|
2822 |
+
' . ot_loop_through_option_types( $type, $child ) . '
|
2823 |
+
|
2824 |
</select>
|
2825 |
</div>
|
2826 |
</div>
|
2859 |
<div class="format-setting type-text wide-desc">
|
2860 |
<div class="description">' . __( '<strong>Standard</strong>: Setting the standard value for your option only works for some option types. Read the <code>OptionTree->Documentation</code> for more information on which ones.', 'option-tree' ) . '</div>
|
2861 |
<div class="format-setting-inner">
|
2862 |
+
' . $std_form_element . '
|
2863 |
</div>
|
2864 |
</div>
|
2865 |
</div>
|
3131 |
|
3132 |
foreach( $settings as $field ) {
|
3133 |
|
3134 |
+
// Set field value
|
3135 |
+
$field_value = isset( $list_item[$field['id']] ) ? $list_item[$field['id']] : '';
|
3136 |
+
|
3137 |
/* set default to standard value */
|
3138 |
+
if ( isset( $field['std'] ) ) {
|
3139 |
+
$field_value = ot_filter_std_value( $field_value, $field['std'] );
|
3140 |
}
|
3141 |
|
3142 |
/* make life easier */
|
3147 |
'type' => $field['type'],
|
3148 |
'field_id' => $name . '_' . $field['id'] . '_' . $key,
|
3149 |
'field_name' => $_field_name . '[' . $key . '][' . $field['id'] . ']',
|
3150 |
+
'field_value' => $field_value,
|
3151 |
'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '',
|
3152 |
'field_std' => isset( $field['std'] ) ? $field['std'] : '',
|
3153 |
'field_rows' => isset( $field['rows'] ) ? $field['rows'] : 10,
|
3567 |
*/
|
3568 |
function ot_file_open( $handle, $mode ) {
|
3569 |
|
3570 |
+
return @fopen( $handle, $mode );
|
3571 |
|
3572 |
}
|
3573 |
|
3579 |
*/
|
3580 |
function ot_file_close( $handle ) {
|
3581 |
|
3582 |
+
return fclose( $handle );
|
3583 |
|
3584 |
}
|
3585 |
|
3591 |
*/
|
3592 |
function ot_file_write( $handle, $string ) {
|
3593 |
|
3594 |
+
return fwrite( $handle, $string );
|
3595 |
|
3596 |
}
|
3597 |
|
3598 |
/**
|
3599 |
+
* Helper function to filter standard option values.
|
3600 |
*
|
3601 |
+
* @param mixed $value Saved string or array value
|
3602 |
+
* @param mixed $std Standard string or array value
|
3603 |
+
* @return mixed String or array
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3604 |
*
|
3605 |
* @access public
|
3606 |
+
* @since 2.0.15
|
3607 |
*/
|
3608 |
+
function ot_filter_std_value( $value = '', $std = '' ) {
|
3609 |
+
|
3610 |
+
$std = maybe_unserialize( $std );
|
3611 |
+
|
3612 |
+
if ( is_array( $value ) && is_array( $std ) ) {
|
3613 |
+
|
3614 |
+
foreach( $value as $k => $v ) {
|
3615 |
|
3616 |
+
if ( empty( $value[$k] ) && isset( $std[$k] ) ) {
|
3617 |
|
3618 |
+
$value[$k] = $std[$k];
|
3619 |
+
|
3620 |
+
}
|
3621 |
+
|
3622 |
+
}
|
3623 |
+
|
3624 |
+
} else if ( empty( $value ) && ! empty( $std ) ) {
|
3625 |
+
|
3626 |
+
$value = $std;
|
3627 |
+
|
3628 |
}
|
3629 |
+
|
3630 |
+
return $value;
|
3631 |
|
3632 |
}
|
3633 |
|
includes/ot-functions-option-types.php
CHANGED
@@ -1041,7 +1041,7 @@ if ( ! function_exists( 'ot_type_radio_image' ) ) {
|
|
1041 |
foreach ( (array) $field_choices as $key => $choice ) {
|
1042 |
echo '<div class="option-tree-ui-radio-images">';
|
1043 |
echo '<p style="display:none"><input type="radio" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '"' . checked( $field_value, $choice['value'], false ) . ' class="option-tree-ui-radio option-tree-ui-images" /><label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '">' . esc_attr( $choice['label'] ) . '</label></p>';
|
1044 |
-
echo '<img src="' . esc_url( $choice['src'] ) . '" alt="" title="' . esc_attr( $choice['label'] ) .'" class="option-tree-ui-radio-image ' . esc_attr( $field_class ) . ( $field_value == $choice['value'] ? ' option-tree-ui-radio-image-selected' : '' ) . '" />';
|
1045 |
echo '</div>';
|
1046 |
}
|
1047 |
|
1041 |
foreach ( (array) $field_choices as $key => $choice ) {
|
1042 |
echo '<div class="option-tree-ui-radio-images">';
|
1043 |
echo '<p style="display:none"><input type="radio" name="' . esc_attr( $field_name ) . '" id="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '" value="' . esc_attr( $choice['value'] ) . '"' . checked( $field_value, $choice['value'], false ) . ' class="option-tree-ui-radio option-tree-ui-images" /><label for="' . esc_attr( $field_id ) . '-' . esc_attr( $key ) . '">' . esc_attr( $choice['label'] ) . '</label></p>';
|
1044 |
+
echo '<img src="' . esc_url( $choice['src'] ) . '" alt="' . esc_attr( $choice['label'] ) .'" title="' . esc_attr( $choice['label'] ) .'" class="option-tree-ui-radio-image ' . esc_attr( $field_class ) . ( $field_value == $choice['value'] ? ' option-tree-ui-radio-image-selected' : '' ) . '" />';
|
1045 |
echo '</div>';
|
1046 |
}
|
1047 |
|
includes/ot-functions.php
CHANGED
@@ -41,80 +41,6 @@ if ( ! function_exists( 'ot_get_option' ) ) {
|
|
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 |
*
|
41 |
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/**
|
45 |
* Enqueue the dynamic CSS.
|
46 |
*
|
includes/ot-meta-box-api.php
CHANGED
@@ -79,9 +79,9 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
|
|
79 |
/* get current post meta data */
|
80 |
$field_value = get_post_meta( $post->ID, $field['id'], true );
|
81 |
|
82 |
-
/* set
|
83 |
-
if (
|
84 |
-
$field_value =
|
85 |
}
|
86 |
|
87 |
/* build the arguments array */
|
79 |
/* get current post meta data */
|
80 |
$field_value = get_post_meta( $post->ID, $field['id'], true );
|
81 |
|
82 |
+
/* set standard value */
|
83 |
+
if ( isset( $field['std'] ) ) {
|
84 |
+
$field_value = ot_filter_std_value( $field_value, $field['std'] );
|
85 |
}
|
86 |
|
87 |
/* build the arguments array */
|
includes/ot-settings-api.php
CHANGED
@@ -477,9 +477,12 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
477 |
/* get current saved data */
|
478 |
$options = get_option( $get_option, false );
|
479 |
|
480 |
-
|
481 |
-
|
482 |
-
|
|
|
|
|
|
|
483 |
}
|
484 |
|
485 |
/* build the arguments array */
|
@@ -487,7 +490,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
487 |
'type' => $type,
|
488 |
'field_id' => $id,
|
489 |
'field_name' => 'option_tree[' . $id . ']',
|
490 |
-
'field_value' =>
|
491 |
'field_desc' => isset( $desc ) ? $desc : '',
|
492 |
'field_std' => isset( $std ) ? $std : '',
|
493 |
'field_rows' => isset( $rows ) && ! empty( $rows ) ? $rows : 15,
|
@@ -600,9 +603,6 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
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,66 +612,17 @@ if ( ! class_exists( 'OT_Settings' ) ) {
|
|
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 |
}
|
477 |
/* get current saved data */
|
478 |
$options = get_option( $get_option, false );
|
479 |
|
480 |
+
// Set field value
|
481 |
+
$field_value = isset( $options[$id] ) ? $options[$id] : '';
|
482 |
+
|
483 |
+
/* set standard value */
|
484 |
+
if ( isset( $std ) ) {
|
485 |
+
$field_value = ot_filter_std_value( $field_value, $std );
|
486 |
}
|
487 |
|
488 |
/* build the arguments array */
|
490 |
'type' => $type,
|
491 |
'field_id' => $id,
|
492 |
'field_name' => 'option_tree[' . $id . ']',
|
493 |
+
'field_value' => $field_value,
|
494 |
'field_desc' => isset( $desc ) ? $desc : '',
|
495 |
'field_std' => isset( $std ) ? $std : '',
|
496 |
'field_rows' => isset( $rows ) && ! empty( $rows ) ? $rows : 15,
|
603 |
/* merge the two settings array */
|
604 |
$settings = array_merge( $required_setting, $settings );
|
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 |
|
616 |
}
|
617 |
|
618 |
}
|
619 |
|
620 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
|
622 |
} else {
|
623 |
|
624 |
$input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'] );
|
625 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
626 |
}
|
627 |
|
628 |
}
|
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,1668 +12,38 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#:
|
16 |
-
msgid "
|
17 |
msgstr ""
|
18 |
|
19 |
-
#:
|
20 |
-
msgid "
|
21 |
msgstr ""
|
22 |
|
23 |
-
#:
|
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 |
-
|
299 |
-
#: includes/ot-functions-docs-page.php:30
|
300 |
-
msgid ""
|
301 |
-
"The Label field should be a short but descriptive block of text 100 "
|
302 |
-
"characters or less with no HTML."
|
303 |
-
msgstr ""
|
304 |
-
|
305 |
-
#: includes/ot-functions-docs-page.php:32
|
306 |
-
msgid "ID"
|
307 |
-
msgstr ""
|
308 |
-
|
309 |
-
#: includes/ot-functions-docs-page.php:33
|
310 |
-
msgid ""
|
311 |
-
"The ID field is a unique alphanumeric key used to differentiate each theme "
|
312 |
-
"option (underscores are acceptable). Also, the plugin will change all text "
|
313 |
-
"you write in this field to lowercase and replace spaces and special "
|
314 |
-
"characters with an underscore automatically."
|
315 |
-
msgstr ""
|
316 |
-
|
317 |
-
#: includes/ot-functions-docs-page.php:35
|
318 |
-
msgid "Type"
|
319 |
-
msgstr ""
|
320 |
-
|
321 |
-
#: includes/ot-functions-docs-page.php:36
|
322 |
-
msgid ""
|
323 |
-
"You are required to choose one of the supported option types when creating a "
|
324 |
-
"new option. Here is a list of the available option types. For more "
|
325 |
-
"information about each type click the <code>Option Types</code> tab to the "
|
326 |
-
"left."
|
327 |
-
msgstr ""
|
328 |
-
|
329 |
-
#: includes/ot-functions-docs-page.php:44
|
330 |
-
msgid ""
|
331 |
-
"Enter a detailed description for the users to read on the Theme Options "
|
332 |
-
"page, HTML is allowed. This is also where you enter content for both the "
|
333 |
-
"Textblock & Textblock Titled option types."
|
334 |
-
msgstr ""
|
335 |
-
|
336 |
-
#: includes/ot-functions-docs-page.php:46
|
337 |
-
msgid "Choices"
|
338 |
-
msgstr ""
|
339 |
-
|
340 |
-
#: includes/ot-functions-docs-page.php:47
|
341 |
-
msgid ""
|
342 |
-
"Click the \"Add Choice\" button to add an item to the choices array. This "
|
343 |
-
"will only affect the following option types: Checkbox, Radio, Select & "
|
344 |
-
"Select Image."
|
345 |
-
msgstr ""
|
346 |
-
|
347 |
-
#: includes/ot-functions-docs-page.php:49 includes/ot-ui-admin.php:30
|
348 |
-
#: includes/ot-ui-admin.php:31 includes/ot-ui-admin.php:74
|
349 |
-
#: includes/ot-ui-admin.php:98
|
350 |
-
msgid "Settings"
|
351 |
-
msgstr ""
|
352 |
-
|
353 |
-
#: includes/ot-functions-docs-page.php:50
|
354 |
-
msgid ""
|
355 |
-
"Click the \"Add Setting\" button found inside a newly created setting to add "
|
356 |
-
"an item to the settings array. This will only affect the List Item type."
|
357 |
-
msgstr ""
|
358 |
-
|
359 |
-
#: includes/ot-functions-docs-page.php:52
|
360 |
-
msgid "Standard"
|
361 |
-
msgstr ""
|
362 |
-
|
363 |
-
#: includes/ot-functions-docs-page.php:53
|
364 |
-
msgid ""
|
365 |
-
"Setting the standard value for your option only works for some option types. "
|
366 |
-
"Those types are one that have a single string value saved to them and not an "
|
367 |
-
"array of values."
|
368 |
-
msgstr ""
|
369 |
-
|
370 |
-
#: includes/ot-functions-docs-page.php:55
|
371 |
-
msgid "Rows"
|
372 |
-
msgstr ""
|
373 |
-
|
374 |
-
#: includes/ot-functions-docs-page.php:56
|
375 |
-
msgid ""
|
376 |
-
"Enter a numeric value for the number of rows in your textarea. This will "
|
377 |
-
"only affect the following option types: CSS, Textarea, & Textarea Simple."
|
378 |
-
msgstr ""
|
379 |
-
|
380 |
-
#: includes/ot-functions-docs-page.php:58
|
381 |
-
msgid "Post Type"
|
382 |
-
msgstr ""
|
383 |
-
|
384 |
-
#: includes/ot-functions-docs-page.php:59
|
385 |
-
msgid ""
|
386 |
-
"Add a comma separated list of post type like <code>post,page</code>. This "
|
387 |
-
"will only affect the following option types: Custom Post Type Checkbox, & "
|
388 |
-
"Custom Post Type Select. Below are the default post types available with "
|
389 |
-
"WordPress and that are also compatible with OptionTree. You can also add "
|
390 |
-
"your own custom <code>post_type</code>. At this time <code>any</code> does "
|
391 |
-
"not seem to return results properly and is something I plan on looking into."
|
392 |
-
msgstr ""
|
393 |
-
|
394 |
-
#: includes/ot-functions-docs-page.php:67
|
395 |
-
msgid "Taxonomy"
|
396 |
-
msgstr ""
|
397 |
-
|
398 |
-
#: includes/ot-functions-docs-page.php:68
|
399 |
-
msgid ""
|
400 |
-
"Add a comma separated list of any registered taxonomy like <code>category,"
|
401 |
-
"post_tag</code>. This will only affect the following option types: Taxonomy "
|
402 |
-
"Checkbox, & Taxonomy Select."
|
403 |
-
msgstr ""
|
404 |
-
|
405 |
-
#: includes/ot-functions-docs-page.php:98
|
406 |
-
msgid "Background"
|
407 |
-
msgstr ""
|
408 |
-
|
409 |
-
#: includes/ot-functions-docs-page.php:99
|
410 |
-
msgid ""
|
411 |
-
"The Background option type is for adding background styles to your theme "
|
412 |
-
"either dynamically via the CSS option type below or manually with "
|
413 |
-
"<code>ot_get_option()</code>. Background has filters that allow you to "
|
414 |
-
"change the defaults. For example, you can filter on "
|
415 |
-
"<code>ot_recognized_background_repeat</code>, "
|
416 |
-
"<code>ot_recognized_background_attachment</code>, and "
|
417 |
-
"<code>ot_recognized_background_position</code>. These filters allow you to "
|
418 |
-
"fine tune the select lists for your specific CSS needs."
|
419 |
-
msgstr ""
|
420 |
-
|
421 |
-
#: includes/ot-functions-docs-page.php:101
|
422 |
-
msgid "Category Select"
|
423 |
-
msgstr ""
|
424 |
-
|
425 |
-
#: includes/ot-functions-docs-page.php:102
|
426 |
-
msgid ""
|
427 |
-
"The Category Select option type displays a list of category IDs. It allows "
|
428 |
-
"the user to select only one category ID and will return that value for use "
|
429 |
-
"in a custom function or loop."
|
430 |
-
msgstr ""
|
431 |
-
|
432 |
-
#: includes/ot-functions-docs-page.php:104
|
433 |
-
msgid "Category Checkbox"
|
434 |
-
msgstr ""
|
435 |
-
|
436 |
-
#: includes/ot-functions-docs-page.php:105
|
437 |
-
msgid ""
|
438 |
-
"The Category Checkbox option type displays a list of category IDs. It allows "
|
439 |
-
"the user to check multiple category IDs and will return that value as an "
|
440 |
-
"array for use in a custom function or loop."
|
441 |
-
msgstr ""
|
442 |
-
|
443 |
-
#: includes/ot-functions-docs-page.php:107
|
444 |
-
msgid "Checkbox"
|
445 |
-
msgstr ""
|
446 |
-
|
447 |
-
#: includes/ot-functions-docs-page.php:108
|
448 |
-
msgid ""
|
449 |
-
"The Checkbox option type is fairly self explanatory. Typically used to ask "
|
450 |
-
"questions. For example, \"Do you want to activate asynchronous Google "
|
451 |
-
"analytics?\" would be a single checkbox with a value of yes. You could have "
|
452 |
-
"more complex usages but the idea is that you can easily grab the value of "
|
453 |
-
"the checkbox and use it in you theme. In this situation you would test if "
|
454 |
-
"the checkbox has a value and execute a block of code if it does and do "
|
455 |
-
"nothing if it doesn't."
|
456 |
-
msgstr ""
|
457 |
-
|
458 |
-
#: includes/ot-functions-docs-page.php:110
|
459 |
-
msgid "Colorpicker"
|
460 |
-
msgstr ""
|
461 |
-
|
462 |
-
#: includes/ot-functions-docs-page.php:111
|
463 |
-
msgid ""
|
464 |
-
"The Colorpicker option type saves a hexadecimal color code for use in CSS. "
|
465 |
-
"Use it to modify the color of something in your theme."
|
466 |
-
msgstr ""
|
467 |
-
|
468 |
-
#: includes/ot-functions-docs-page.php:113
|
469 |
-
msgid "CSS"
|
470 |
-
msgstr ""
|
471 |
-
|
472 |
-
#: includes/ot-functions-docs-page.php:114
|
473 |
-
msgid ""
|
474 |
-
"The CSS option type is a textarea that when used properly can add dynamic "
|
475 |
-
"CSS to your theme from within OptionTree. Unfortunately, due server "
|
476 |
-
"limitations you will need to create a file named <code>dynamic.css</code> at "
|
477 |
-
"the root level of your theme and change permissions using chmod so the "
|
478 |
-
"server can write to the file. I have had the most success setting this "
|
479 |
-
"single file to 0777 but feel free to play around with permissions until "
|
480 |
-
"everything is working. A good starting point is 0666. When the server can "
|
481 |
-
"save to the file CSS will automatically be updated each time you save your "
|
482 |
-
"theme options."
|
483 |
-
msgstr ""
|
484 |
-
|
485 |
-
#: includes/ot-functions-docs-page.php:116
|
486 |
-
msgid ""
|
487 |
-
"An example of the CSS option type: This assumes you have an option with the "
|
488 |
-
"ID of <code>custom_background_css</code> which will display the saved values "
|
489 |
-
"for that option."
|
490 |
-
msgstr ""
|
491 |
-
|
492 |
-
#: includes/ot-functions-docs-page.php:118
|
493 |
-
msgid "Input"
|
494 |
-
msgstr ""
|
495 |
-
|
496 |
-
#: includes/ot-functions-docs-page.php:124
|
497 |
-
msgid "Output"
|
498 |
-
msgstr ""
|
499 |
-
|
500 |
-
#: includes/ot-functions-docs-page.php:132
|
501 |
-
msgid "Custom Post Type Select"
|
502 |
-
msgstr ""
|
503 |
-
|
504 |
-
#: includes/ot-functions-docs-page.php:133
|
505 |
-
msgid ""
|
506 |
-
"The Custom Post Type Select option type displays a list of IDs from any "
|
507 |
-
"available WordPress post type or custom post type. It will return a single "
|
508 |
-
"post ID for use in a custom function or loop. Requires at least one valid "
|
509 |
-
"<code>post_type</code> when created in the settings. For some reason "
|
510 |
-
"<code>any</code> does not work correctly and will looked into in future "
|
511 |
-
"version."
|
512 |
-
msgstr ""
|
513 |
-
|
514 |
-
#: includes/ot-functions-docs-page.php:135
|
515 |
-
msgid "Custom Post Type Checkbox"
|
516 |
-
msgstr ""
|
517 |
-
|
518 |
-
#: includes/ot-functions-docs-page.php:136
|
519 |
-
msgid ""
|
520 |
-
"The Custom Post Type Select option type displays a list of IDs from any "
|
521 |
-
"available WordPress post type or custom post type. It allows the user to "
|
522 |
-
"check multiple post IDs for use in a custom function or loop. Requires at "
|
523 |
-
"least one valid <code>post_type</code> when created in the settings. For "
|
524 |
-
"some reason <code>any</code> does not work correctly and will looked into in "
|
525 |
-
"future version."
|
526 |
-
msgstr ""
|
527 |
-
|
528 |
-
#: includes/ot-functions-docs-page.php:138
|
529 |
-
msgid "List Item"
|
530 |
-
msgstr ""
|
531 |
-
|
532 |
-
#: includes/ot-functions-docs-page.php:139
|
533 |
-
msgid ""
|
534 |
-
"The list Item replaced the old Slider option type. It allows for a great "
|
535 |
-
"deal of customization. You can add settings to the List Item and those "
|
536 |
-
"settings will be displayed to the user when they add a new List Item. "
|
537 |
-
"Typical use is for creating sliding content or blocks of code for custom "
|
538 |
-
"layouts."
|
539 |
-
msgstr ""
|
540 |
-
|
541 |
-
#: includes/ot-functions-docs-page.php:141
|
542 |
-
msgid "Measurement"
|
543 |
-
msgstr ""
|
544 |
-
|
545 |
-
#: includes/ot-functions-docs-page.php:142
|
546 |
-
msgid ""
|
547 |
-
"The Measurement option type is a mix of input and select fields. The text "
|
548 |
-
"input excepts a value and the select lets you choose the unit of measurement "
|
549 |
-
"to add to that value. Currently the default units are <code>px</code>, <code>"
|
550 |
-
"%</code>, <code>em</code>, <code>pt</code>. However, you can change them "
|
551 |
-
"with the <code>ot_measurement_unit_types</code> filter."
|
552 |
-
msgstr ""
|
553 |
-
|
554 |
-
#: includes/ot-functions-docs-page.php:144
|
555 |
-
msgid ""
|
556 |
-
"Example filter to add new units to the Measurement option type. Added to "
|
557 |
-
"<code>functions.php</code>."
|
558 |
-
msgstr ""
|
559 |
-
|
560 |
-
#: includes/ot-functions-docs-page.php:157
|
561 |
-
msgid ""
|
562 |
-
"Example filter to completely change the units in the Measurement option "
|
563 |
-
"type. Added to <code>functions.php</code>."
|
564 |
-
msgstr ""
|
565 |
-
|
566 |
-
#: includes/ot-functions-docs-page.php:172
|
567 |
-
msgid "Page Select"
|
568 |
-
msgstr ""
|
569 |
-
|
570 |
-
#: includes/ot-functions-docs-page.php:173
|
571 |
-
msgid ""
|
572 |
-
"The Page Select option type displays a list of page IDs. It will return a "
|
573 |
-
"single page ID for use in a custom function or loop."
|
574 |
-
msgstr ""
|
575 |
-
|
576 |
-
#: includes/ot-functions-docs-page.php:175
|
577 |
-
msgid "Page Checkbox"
|
578 |
-
msgstr ""
|
579 |
-
|
580 |
-
#: includes/ot-functions-docs-page.php:176
|
581 |
-
msgid ""
|
582 |
-
"The Page Select option type displays a list of page IDs. It allows the user "
|
583 |
-
"to check multiple page IDs for use in a custom function or loop."
|
584 |
-
msgstr ""
|
585 |
-
|
586 |
-
#: includes/ot-functions-docs-page.php:178
|
587 |
-
msgid "Post Select"
|
588 |
-
msgstr ""
|
589 |
-
|
590 |
-
#: includes/ot-functions-docs-page.php:179
|
591 |
-
msgid ""
|
592 |
-
"The Post Select option type displays a list of post IDs. It will return a "
|
593 |
-
"single post ID for use in a custom function or loop."
|
594 |
-
msgstr ""
|
595 |
-
|
596 |
-
#: includes/ot-functions-docs-page.php:181
|
597 |
-
msgid "Post Checkbox"
|
598 |
-
msgstr ""
|
599 |
-
|
600 |
-
#: includes/ot-functions-docs-page.php:182
|
601 |
-
msgid ""
|
602 |
-
"The Post Select option type displays a list of post IDs. It allows the user "
|
603 |
-
"to check multiple post IDs for use in a custom function or loop."
|
604 |
-
msgstr ""
|
605 |
-
|
606 |
-
#: includes/ot-functions-docs-page.php:184
|
607 |
-
msgid "Radio"
|
608 |
-
msgstr ""
|
609 |
-
|
610 |
-
#: includes/ot-functions-docs-page.php:185
|
611 |
-
msgid ""
|
612 |
-
"The Radio option type could ask a question. For example, \"Do you want to "
|
613 |
-
"activate the custom navigation?\" could require a yes or no answer with a "
|
614 |
-
"radio option. In this situation you would test if the radio has a value of "
|
615 |
-
"'yes' and execute a block of code, or if it's 'no' execute a different block "
|
616 |
-
"of code."
|
617 |
-
msgstr ""
|
618 |
-
|
619 |
-
#: includes/ot-functions-docs-page.php:187
|
620 |
-
msgid "Radio Image"
|
621 |
-
msgstr ""
|
622 |
-
|
623 |
-
#: includes/ot-functions-docs-page.php:188
|
624 |
-
msgid ""
|
625 |
-
"the Radio Images option type is primarily used for layouts. However, you can "
|
626 |
-
"filter the image list using <code>ot_radio_images</code>. As well, you can "
|
627 |
-
"add your own custom images using the choices array."
|
628 |
-
msgstr ""
|
629 |
-
|
630 |
-
#: includes/ot-functions-docs-page.php:190
|
631 |
-
msgid ""
|
632 |
-
"This example executes the <code>ot_radio_images</code> filter on layout "
|
633 |
-
"images attached to the <code>my_radio_images</code> field. Added to "
|
634 |
-
"<code>functions.php</code>."
|
635 |
-
msgstr ""
|
636 |
-
|
637 |
-
#: includes/ot-functions-docs-page.php:214
|
638 |
-
msgid "Select"
|
639 |
-
msgstr ""
|
640 |
-
|
641 |
-
#: includes/ot-functions-docs-page.php:215
|
642 |
-
msgid ""
|
643 |
-
"The Select option type is used to list anything you want that would be "
|
644 |
-
"chosen from a select list."
|
645 |
-
msgstr ""
|
646 |
-
|
647 |
-
#: includes/ot-functions-docs-page.php:217
|
648 |
-
msgid "Slider"
|
649 |
-
msgstr ""
|
650 |
-
|
651 |
-
#: includes/ot-functions-docs-page.php:218
|
652 |
-
msgid ""
|
653 |
-
"The Slider option type is technically deprecated. Use the List Item option "
|
654 |
-
"type instead, as it's infinitely more customizable. Typical use is for "
|
655 |
-
"creating sliding image content."
|
656 |
-
msgstr ""
|
657 |
-
|
658 |
-
#: includes/ot-functions-docs-page.php:220
|
659 |
-
msgid "Tag Checkbox"
|
660 |
-
msgstr ""
|
661 |
-
|
662 |
-
#: includes/ot-functions-docs-page.php:221
|
663 |
-
msgid ""
|
664 |
-
"The Tag Checkbox option type displays a list of tag IDs. It allows the user "
|
665 |
-
"to check multiple tag IDs and will return that value as an array for use in "
|
666 |
-
"a custom function or loop."
|
667 |
-
msgstr ""
|
668 |
-
|
669 |
-
#: includes/ot-functions-docs-page.php:223
|
670 |
-
msgid "Tag Select"
|
671 |
-
msgstr ""
|
672 |
-
|
673 |
-
#: includes/ot-functions-docs-page.php:224
|
674 |
-
msgid ""
|
675 |
-
"The Tag Select option type displays a list of tag IDs. It allows the user to "
|
676 |
-
"select only one tag ID and will return that value for use in a custom "
|
677 |
-
"function or loop."
|
678 |
-
msgstr ""
|
679 |
-
|
680 |
-
#: includes/ot-functions-docs-page.php:226
|
681 |
-
msgid "Taxonomy Checkbox"
|
682 |
-
msgstr ""
|
683 |
-
|
684 |
-
#: includes/ot-functions-docs-page.php:227
|
685 |
-
msgid ""
|
686 |
-
"The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows "
|
687 |
-
"the user to check multiple taxonomy IDs and will return that value as an "
|
688 |
-
"array for use in a custom function or loop."
|
689 |
-
msgstr ""
|
690 |
-
|
691 |
-
#: includes/ot-functions-docs-page.php:229
|
692 |
-
msgid "Taxonomy Select"
|
693 |
-
msgstr ""
|
694 |
-
|
695 |
-
#: includes/ot-functions-docs-page.php:230
|
696 |
-
msgid ""
|
697 |
-
"The Taxonomy Select option type displays a list of taxonomy IDs. It allows "
|
698 |
-
"the user to select only one taxonomy ID and will return that value for use "
|
699 |
-
"in a custom function or loop."
|
700 |
-
msgstr ""
|
701 |
-
|
702 |
-
#: includes/ot-functions-docs-page.php:232
|
703 |
-
msgid "Text (Input)"
|
704 |
-
msgstr ""
|
705 |
-
|
706 |
-
#: includes/ot-functions-docs-page.php:233
|
707 |
-
msgid ""
|
708 |
-
"The Text option type would be used to save a string value. For example, a "
|
709 |
-
"link to feedburner, your Twitter username, or Google Analytics ID are all "
|
710 |
-
"good candidates. Any optional or required text that is of reasonably short "
|
711 |
-
"character length."
|
712 |
-
msgstr ""
|
713 |
-
|
714 |
-
#: includes/ot-functions-docs-page.php:235
|
715 |
-
msgid "Textarea"
|
716 |
-
msgstr ""
|
717 |
-
|
718 |
-
#: includes/ot-functions-docs-page.php:236
|
719 |
-
msgid ""
|
720 |
-
"The Textarea option type is a large string value used for custom code or "
|
721 |
-
"text in the theme. The new Textarea has a WYSIWYG editor that can be "
|
722 |
-
"filtered to change the buttons shown. For example, you can filter on "
|
723 |
-
"<code>wpautop</code>, <code>media_buttons</code>, <code>tinymce</code>, and "
|
724 |
-
"<code>quicktags</code>."
|
725 |
-
msgstr ""
|
726 |
-
|
727 |
-
#: includes/ot-functions-docs-page.php:238
|
728 |
-
msgid ""
|
729 |
-
"Example filters to alter the Textarea option type. Added to <code>functions."
|
730 |
-
"php</code>."
|
731 |
-
msgstr ""
|
732 |
-
|
733 |
-
#: includes/ot-functions-docs-page.php:240
|
734 |
-
msgid ""
|
735 |
-
"This example keeps WordPress from executing the <code>wpautop</code> filter "
|
736 |
-
"on the line breaks. The default is <code>true</code> which means it wraps "
|
737 |
-
"line breaks with an HTML <code>p</code> tag."
|
738 |
-
msgstr ""
|
739 |
-
|
740 |
-
#: includes/ot-functions-docs-page.php:253
|
741 |
-
msgid ""
|
742 |
-
"This example keeps WordPress from executing the <code>media_buttons</code> "
|
743 |
-
"filter on the textarea WYSIWYG. The default is <code>true</code> which means "
|
744 |
-
"show the buttons."
|
745 |
-
msgstr ""
|
746 |
-
|
747 |
-
#: includes/ot-functions-docs-page.php:266
|
748 |
-
msgid ""
|
749 |
-
"This example keeps WordPress from executing the <code>tinymce</code> filter "
|
750 |
-
"on the textarea WYSIWYG. The default is <code>true</code> which means show "
|
751 |
-
"the tinymce."
|
752 |
-
msgstr ""
|
753 |
-
|
754 |
-
#: includes/ot-functions-docs-page.php:279
|
755 |
-
msgid ""
|
756 |
-
"This example alters the <code>quicktags</code> filter on the textarea "
|
757 |
-
"WYSIWYG. The default is <code>array( 'buttons' => 'strong,em,link,block,del,"
|
758 |
-
"ins,img,ul,ol,li,code,spell,close' )</code> which means show those "
|
759 |
-
"quicktags. It also means you can filter in your own custom quicktags."
|
760 |
-
msgstr ""
|
761 |
-
|
762 |
-
#: includes/ot-functions-docs-page.php:294
|
763 |
-
msgid "Textarea Simple"
|
764 |
-
msgstr ""
|
765 |
-
|
766 |
-
#: includes/ot-functions-docs-page.php:295
|
767 |
-
msgid ""
|
768 |
-
"The Textarea Simple option type is a large string value used for custom code "
|
769 |
-
"or text in the theme. The new Textarea Simple does not have a WYSIWYG "
|
770 |
-
"editor. But you can still filter on <code>wpautop</code>."
|
771 |
-
msgstr ""
|
772 |
-
|
773 |
-
#: includes/ot-functions-docs-page.php:297
|
774 |
-
msgid ""
|
775 |
-
"This example tells WordPress to execute the <code>wpautop</code> filter on "
|
776 |
-
"the line breaks. The default is <code>false</code> which means it does not "
|
777 |
-
"wraps line breaks with an HTML <code>p</code> tag. Added to <code>functions."
|
778 |
-
"php</code>."
|
779 |
-
msgstr ""
|
780 |
-
|
781 |
-
#: includes/ot-functions-docs-page.php:310
|
782 |
-
msgid "Textblock"
|
783 |
-
msgstr ""
|
784 |
-
|
785 |
-
#: includes/ot-functions-docs-page.php:311
|
786 |
-
msgid ""
|
787 |
-
"The Textblock option type is used only on the Theme Option page. It will "
|
788 |
-
"allow you to create & display HTML on your Theme Options page but has no "
|
789 |
-
"title above the text block. You can then use the Textblock to add a more "
|
790 |
-
"detailed set of instruction on how the options are used in your theme. You "
|
791 |
-
"would NEVER use this in your themes template files as it does not save a "
|
792 |
-
"value."
|
793 |
-
msgstr ""
|
794 |
-
|
795 |
-
#: includes/ot-functions-docs-page.php:313
|
796 |
-
msgid "Textblock Titled"
|
797 |
-
msgstr ""
|
798 |
-
|
799 |
-
#: includes/ot-functions-docs-page.php:314
|
800 |
-
msgid ""
|
801 |
-
"The Textblock Titled option type is used only on the Theme Option page. It "
|
802 |
-
"will allow you to create & display HTML on your Theme Options page and has a "
|
803 |
-
"title above the text block. You can then use the Textblock Titled to add a "
|
804 |
-
"more detailed set of instruction on how the options are used in your theme. "
|
805 |
-
"You would NEVER use this in your themes template files as it does not save a "
|
806 |
-
"value."
|
807 |
-
msgstr ""
|
808 |
-
|
809 |
-
#: includes/ot-functions-docs-page.php:316
|
810 |
-
msgid "Typography"
|
811 |
-
msgstr ""
|
812 |
-
|
813 |
-
#: includes/ot-functions-docs-page.php:317
|
814 |
-
msgid ""
|
815 |
-
"The Typography option type is for adding typographic styles to your theme "
|
816 |
-
"either dynamically via the CSS option type below or manually with "
|
817 |
-
"<code>ot_get_option()</code>. Typography has filters that allow you to "
|
818 |
-
"change the defaults. For example, you can filter on "
|
819 |
-
"<code>ot_recognized_font_styles</code>, <code>ot_recognized_font_weights</"
|
820 |
-
"code>, <code>ot_recognized_font_variants</code>, and "
|
821 |
-
"<code>ot_recognized_font_families</code>. These filters allow you to fine "
|
822 |
-
"tune the select lists for your specific CSS needs. The most important one "
|
823 |
-
"though is <code>ot_recognized_font_families</code> as you can add your "
|
824 |
-
"Google Fonts to create custom font stacks."
|
825 |
-
msgstr ""
|
826 |
-
|
827 |
-
#: includes/ot-functions-docs-page.php:319
|
828 |
-
msgid ""
|
829 |
-
"This example would filter <code>ot_recognized_font_families</code> to build "
|
830 |
-
"your own font stack. Added to <code>functions.php</code>."
|
831 |
-
msgstr ""
|
832 |
-
|
833 |
-
#: includes/ot-functions-docs-page.php:336
|
834 |
-
msgid "Upload"
|
835 |
-
msgstr ""
|
836 |
-
|
837 |
-
#: includes/ot-functions-docs-page.php:337
|
838 |
-
msgid ""
|
839 |
-
"The Upload option type is used to upload any WordPress supported media. "
|
840 |
-
"After uploading, users are required to press the \"Send to OptionTree\" "
|
841 |
-
"button in order to populate the input with the URI of that media. There is "
|
842 |
-
"one caveat of this feature. If you import the theme options and have "
|
843 |
-
"uploaded media on one site the old URI will not reflect the URI of your new "
|
844 |
-
"site. You'll have to re-upload or FTP any media to your new server and "
|
845 |
-
"change the URIs if necessary."
|
846 |
-
msgstr ""
|
847 |
-
|
848 |
-
#: includes/ot-functions-docs-page.php:369
|
849 |
-
msgid ""
|
850 |
-
"This function returns a value from the \"option_tree\" array of saved values "
|
851 |
-
"or the default value supplied. The returned value would be mixed. Meaning it "
|
852 |
-
"could be a string, integer, boolean, or array."
|
853 |
-
msgstr ""
|
854 |
-
|
855 |
-
#: includes/ot-functions-docs-page.php:371
|
856 |
-
#: includes/ot-functions-docs-page.php:421
|
857 |
-
msgid "Usage"
|
858 |
-
msgstr ""
|
859 |
-
|
860 |
-
#: includes/ot-functions-docs-page.php:375
|
861 |
-
#: includes/ot-functions-docs-page.php:425
|
862 |
-
msgid "Parameters"
|
863 |
-
msgstr ""
|
864 |
-
|
865 |
-
#: includes/ot-functions-docs-page.php:379
|
866 |
-
#: includes/ot-functions-docs-page.php:383
|
867 |
-
#: includes/ot-functions-docs-page.php:429
|
868 |
-
msgid "string"
|
869 |
-
msgstr ""
|
870 |
-
|
871 |
-
#: includes/ot-functions-docs-page.php:379
|
872 |
-
#: includes/ot-functions-docs-page.php:429
|
873 |
-
msgid "required"
|
874 |
-
msgstr ""
|
875 |
-
|
876 |
-
#: includes/ot-functions-docs-page.php:379
|
877 |
-
msgid "Enter the options unique identifier."
|
878 |
-
msgstr ""
|
879 |
-
|
880 |
-
#: includes/ot-functions-docs-page.php:379
|
881 |
-
#: includes/ot-functions-docs-page.php:429
|
882 |
-
msgid "Default:"
|
883 |
-
msgstr ""
|
884 |
-
|
885 |
-
#: includes/ot-functions-docs-page.php:379
|
886 |
-
#: includes/ot-functions-docs-page.php:383
|
887 |
-
#: includes/ot-functions-docs-page.php:429
|
888 |
-
#: includes/ot-functions-docs-page.php:433
|
889 |
-
msgid "None"
|
890 |
-
msgstr ""
|
891 |
-
|
892 |
-
#: includes/ot-functions-docs-page.php:383
|
893 |
-
#: includes/ot-functions-docs-page.php:433
|
894 |
-
#: includes/ot-functions-docs-page.php:437
|
895 |
-
#: includes/ot-functions-docs-page.php:441
|
896 |
-
#: includes/ot-functions-docs-page.php:445
|
897 |
-
msgid "optional"
|
898 |
-
msgstr ""
|
899 |
-
|
900 |
-
#: includes/ot-functions-docs-page.php:383
|
901 |
-
msgid ""
|
902 |
-
"Enter a default return value. This is just incase the request returns null."
|
903 |
-
msgstr ""
|
904 |
-
|
905 |
-
#: includes/ot-functions-docs-page.php:383
|
906 |
-
#: includes/ot-functions-docs-page.php:433
|
907 |
-
#: includes/ot-functions-docs-page.php:437
|
908 |
-
#: includes/ot-functions-docs-page.php:441
|
909 |
-
#: includes/ot-functions-docs-page.php:445
|
910 |
-
msgid "Default"
|
911 |
-
msgstr ""
|
912 |
-
|
913 |
-
#: includes/ot-functions-docs-page.php:413
|
914 |
-
msgid ""
|
915 |
-
"This function has been deprecated. That means it has been replaced by a new "
|
916 |
-
"function or is no longer supported, and may be removed from future versions. "
|
917 |
-
"All code that uses this function should be converted to use its replacement."
|
918 |
-
msgstr ""
|
919 |
-
|
920 |
-
#: includes/ot-functions-docs-page.php:415
|
921 |
-
msgid "Use"
|
922 |
-
msgstr ""
|
923 |
-
|
924 |
-
#: includes/ot-functions-docs-page.php:415
|
925 |
-
msgid "instead"
|
926 |
-
msgstr ""
|
927 |
-
|
928 |
-
#: includes/ot-functions-docs-page.php:419
|
929 |
-
msgid ""
|
930 |
-
"This function returns, or echos if asked, a value from the \"option_tree\" "
|
931 |
-
"array of saved values."
|
932 |
-
msgstr ""
|
933 |
-
|
934 |
-
#: includes/ot-functions-docs-page.php:429
|
935 |
-
msgid "Enter a unique Option Key to get a returned value or array."
|
936 |
-
msgstr ""
|
937 |
-
|
938 |
-
#: includes/ot-functions-docs-page.php:433
|
939 |
-
msgid "array"
|
940 |
-
msgstr ""
|
941 |
-
|
942 |
-
#: includes/ot-functions-docs-page.php:433
|
943 |
-
msgid "Used to cut down on database queries in template files."
|
944 |
-
msgstr ""
|
945 |
-
|
946 |
-
#: includes/ot-functions-docs-page.php:437
|
947 |
-
#: includes/ot-functions-docs-page.php:441
|
948 |
-
msgid "boolean"
|
949 |
-
msgstr ""
|
950 |
-
|
951 |
-
#: includes/ot-functions-docs-page.php:437
|
952 |
-
msgid "Echo the output."
|
953 |
-
msgstr ""
|
954 |
-
|
955 |
-
#: includes/ot-functions-docs-page.php:441
|
956 |
-
msgid "Used to indicate the $item_id is an array of values."
|
957 |
-
msgstr ""
|
958 |
-
|
959 |
-
#: includes/ot-functions-docs-page.php:445
|
960 |
-
msgid "integer"
|
961 |
-
msgstr ""
|
962 |
-
|
963 |
-
#: includes/ot-functions-docs-page.php:445
|
964 |
-
msgid ""
|
965 |
-
"Numeric offset key for the $item_id array, -1 will return all values (an "
|
966 |
-
"array starts at 0)."
|
967 |
-
msgstr ""
|
968 |
-
|
969 |
-
#: includes/ot-functions-docs-page.php:473
|
970 |
-
msgid ""
|
971 |
-
"If you're using the plugin version of OptionTree it is highly recommended to "
|
972 |
-
"include a <code>function_exists</code> check in your code, as described in "
|
973 |
-
"the examples below. If you've integrated OptionTree directly into your "
|
974 |
-
"themes root directory, you will <strong>not</strong> need to wrap your code "
|
975 |
-
"with <code>function_exists</code>, as you're guaranteed to have the "
|
976 |
-
"<code>ot_get_option()</code> function available."
|
977 |
-
msgstr ""
|
978 |
-
|
979 |
-
#: includes/ot-functions-docs-page.php:475
|
980 |
-
msgid "String Examples"
|
981 |
-
msgstr ""
|
982 |
-
|
983 |
-
#: includes/ot-functions-docs-page.php:477
|
984 |
-
msgid "Returns the value of <code>test_input</code>."
|
985 |
-
msgstr ""
|
986 |
-
|
987 |
-
#: includes/ot-functions-docs-page.php:483
|
988 |
-
msgid ""
|
989 |
-
"Returns the value of <code>test_input</code>, but also has a default value "
|
990 |
-
"if it returns empty."
|
991 |
-
msgstr ""
|
992 |
-
|
993 |
-
#: includes/ot-functions-docs-page.php:489
|
994 |
-
msgid "Array Examples"
|
995 |
-
msgstr ""
|
996 |
-
|
997 |
-
#: includes/ot-functions-docs-page.php:491
|
998 |
-
msgid ""
|
999 |
-
"Assigns the value of <code>navigation_ids</code> to the variable <code>$ids</"
|
1000 |
-
"code>. It then echos an unordered list of links (navigation) using "
|
1001 |
-
"<code>wp_list_pages()</code>."
|
1002 |
-
msgstr ""
|
1003 |
-
|
1004 |
-
#: includes/ot-functions-docs-page.php:511
|
1005 |
-
msgid ""
|
1006 |
-
"The next two examples demonstrate how to use the <strong>Measurement</"
|
1007 |
-
"strong> option type. The Measurement option type is an array with two key/"
|
1008 |
-
"value pairs. The first is the value of measurement and the second is the "
|
1009 |
-
"unit of measurement."
|
1010 |
-
msgstr ""
|
1011 |
-
|
1012 |
-
#: includes/ot-functions-docs-page.php:537
|
1013 |
-
msgid "This example displays a very basic slider loop."
|
1014 |
-
msgstr ""
|
1015 |
-
|
1016 |
-
#: includes/ot-functions-docs-page.php:582
|
1017 |
-
msgid "It's Super Simple"
|
1018 |
-
msgstr ""
|
1019 |
-
|
1020 |
-
#: includes/ot-functions-docs-page.php:584
|
1021 |
-
msgid ""
|
1022 |
-
"Layouts make your theme awesome! With theme options data that you can save/"
|
1023 |
-
"import/export you can package themes with different color variations, or "
|
1024 |
-
"make it easy to do A/B testing on text and so much more. Basically, you save "
|
1025 |
-
"a snapshot of your data as a layout."
|
1026 |
-
msgstr ""
|
1027 |
-
|
1028 |
-
#: includes/ot-functions-docs-page.php:586
|
1029 |
-
msgid ""
|
1030 |
-
"Once you have created all your different layouts, or theme variations, you "
|
1031 |
-
"can save them to a separate text file for repackaging with your theme. "
|
1032 |
-
"Alternatively, you could just make different variations for yourself and "
|
1033 |
-
"change your theme with the click of a button, all without deleting your "
|
1034 |
-
"previous options data."
|
1035 |
-
msgstr ""
|
1036 |
-
|
1037 |
-
#: includes/ot-functions-docs-page.php:588
|
1038 |
-
msgid ""
|
1039 |
-
" Adding a layout is ridiculously easy, follow these steps and you'll be on "
|
1040 |
-
"your way to having a WordPress super theme."
|
1041 |
-
msgstr ""
|
1042 |
-
|
1043 |
-
#: includes/ot-functions-docs-page.php:590
|
1044 |
-
msgid "For Developers"
|
1045 |
-
msgstr ""
|
1046 |
-
|
1047 |
-
#: includes/ot-functions-docs-page.php:593
|
1048 |
-
#: includes/ot-functions-docs-page.php:623
|
1049 |
-
msgid "Creating a Layout"
|
1050 |
-
msgstr ""
|
1051 |
-
|
1052 |
-
#: includes/ot-functions-docs-page.php:595
|
1053 |
-
#: includes/ot-functions-docs-page.php:602
|
1054 |
-
#: includes/ot-functions-docs-page.php:608
|
1055 |
-
msgid "Go to the <code>OptionTre->Settings->Layouts</code> tab."
|
1056 |
-
msgstr ""
|
1057 |
-
|
1058 |
-
#: includes/ot-functions-docs-page.php:596
|
1059 |
-
msgid ""
|
1060 |
-
"Enter a name for your layout in the text field and hit \"Save Layouts\", "
|
1061 |
-
"you've created your first layout."
|
1062 |
-
msgstr ""
|
1063 |
-
|
1064 |
-
#: includes/ot-functions-docs-page.php:597
|
1065 |
-
#: includes/ot-functions-docs-page.php:627
|
1066 |
-
msgid "Adding a new layout is as easy as repeating the steps above."
|
1067 |
-
msgstr ""
|
1068 |
-
|
1069 |
-
#: includes/ot-functions-docs-page.php:600
|
1070 |
-
#: includes/ot-functions-docs-page.php:630
|
1071 |
-
msgid "Activating a Layout"
|
1072 |
-
msgstr ""
|
1073 |
-
|
1074 |
-
#: includes/ot-functions-docs-page.php:603
|
1075 |
-
msgid "Click on the activate layout button in the actions list."
|
1076 |
-
msgstr ""
|
1077 |
-
|
1078 |
-
#: includes/ot-functions-docs-page.php:606
|
1079 |
-
#: includes/ot-functions-docs-page.php:636
|
1080 |
-
msgid "Deleting a Layout"
|
1081 |
-
msgstr ""
|
1082 |
-
|
1083 |
-
#: includes/ot-functions-docs-page.php:609
|
1084 |
-
msgid "Click on the delete layout button in the actions list."
|
1085 |
-
msgstr ""
|
1086 |
-
|
1087 |
-
#: includes/ot-functions-docs-page.php:612
|
1088 |
-
#: includes/ot-functions-docs-page.php:641
|
1089 |
-
msgid "Edit Layout Data"
|
1090 |
-
msgstr ""
|
1091 |
-
|
1092 |
-
#: includes/ot-functions-docs-page.php:614
|
1093 |
-
#: includes/ot-functions-docs-page.php:625
|
1094 |
-
#: includes/ot-functions-docs-page.php:632
|
1095 |
-
msgid "Go to the <code>Appearance->Theme Options</code> page."
|
1096 |
-
msgstr ""
|
1097 |
-
|
1098 |
-
#: includes/ot-functions-docs-page.php:615
|
1099 |
-
#: includes/ot-functions-docs-page.php:644
|
1100 |
-
msgid ""
|
1101 |
-
"Modify and save your theme options and the layout will be updated "
|
1102 |
-
"automatically."
|
1103 |
-
msgstr ""
|
1104 |
-
|
1105 |
-
#: includes/ot-functions-docs-page.php:616
|
1106 |
-
#: includes/ot-functions-docs-page.php:645
|
1107 |
-
msgid ""
|
1108 |
-
"Saving theme options data will update the currently active layout, so before "
|
1109 |
-
"you start saving make sure you want to modify the current layout."
|
1110 |
-
msgstr ""
|
1111 |
-
|
1112 |
-
#: includes/ot-functions-docs-page.php:617
|
1113 |
-
msgid ""
|
1114 |
-
"If you want to edit a new layout, first create it then save your theme "
|
1115 |
-
"options."
|
1116 |
-
msgstr ""
|
1117 |
-
|
1118 |
-
#: includes/ot-functions-docs-page.php:620
|
1119 |
-
msgid "End-Users Mode"
|
1120 |
-
msgstr ""
|
1121 |
-
|
1122 |
-
#: includes/ot-functions-docs-page.php:626
|
1123 |
-
msgid ""
|
1124 |
-
"Enter a name for your layout in the text field and hit \"New Layout\", "
|
1125 |
-
"you've created your first layout."
|
1126 |
-
msgstr ""
|
1127 |
-
|
1128 |
-
#: includes/ot-functions-docs-page.php:633
|
1129 |
-
msgid ""
|
1130 |
-
"Choose a layout from the select list and click the \"Activate Layout\" "
|
1131 |
-
"button."
|
1132 |
-
msgstr ""
|
1133 |
-
|
1134 |
-
#: includes/ot-functions-docs-page.php:638
|
1135 |
-
msgid "End-Users mode does not allow deleting layouts."
|
1136 |
-
msgstr ""
|
1137 |
-
|
1138 |
-
#: includes/ot-functions-docs-page.php:643
|
1139 |
-
msgid "Go to the <code>Appearance->Theme Options</code> tab."
|
1140 |
-
msgstr ""
|
1141 |
-
|
1142 |
-
#: includes/ot-functions-docs-page.php:674
|
1143 |
-
#: includes/ot-functions-docs-page.php:756
|
1144 |
-
msgid "How-to-guide"
|
1145 |
-
msgstr ""
|
1146 |
-
|
1147 |
-
#: includes/ot-functions-docs-page.php:676
|
1148 |
-
msgid ""
|
1149 |
-
"There are a few simple steps you need to take in order to use OptionTree's "
|
1150 |
-
"built in Meta Box API. In the code below I'll show you a basic demo of how "
|
1151 |
-
"to create your very own custom meta box using any number of the option types "
|
1152 |
-
"you have at your disposal. If you would like to see some demo code, there is "
|
1153 |
-
"a directory named <code>theme-mode</code> inside the <code>assets</code> "
|
1154 |
-
"directory that contains a file named <code>demo-meta-boxes.php</code> you "
|
1155 |
-
"can reference."
|
1156 |
-
msgstr ""
|
1157 |
-
|
1158 |
-
#: includes/ot-functions-docs-page.php:678
|
1159 |
-
msgid ""
|
1160 |
-
"It's important to note that Meta Boxes do not support WYSIWYG editors at "
|
1161 |
-
"this time and if you set one of your options to Textarea it will "
|
1162 |
-
"automatically revert to a Textarea Simple until a valid solution is found. "
|
1163 |
-
"WordPress released this statement regarding the wp_editor() function:"
|
1164 |
-
msgstr ""
|
1165 |
-
|
1166 |
-
#: includes/ot-functions-docs-page.php:680
|
1167 |
-
msgid ""
|
1168 |
-
"Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. "
|
1169 |
-
"What this means in practical terms, is that you cannot put it in meta-boxes "
|
1170 |
-
"that can be dragged and placed elsewhere on the page."
|
1171 |
-
msgstr ""
|
1172 |
-
|
1173 |
-
#: includes/ot-functions-docs-page.php:682
|
1174 |
-
msgid "Create and include your custom meta boxes file."
|
1175 |
-
msgstr ""
|
1176 |
-
|
1177 |
-
#: includes/ot-functions-docs-page.php:684
|
1178 |
-
msgid ""
|
1179 |
-
"Create a file and name it anything you want, maybe <code>meta-boxes.php</"
|
1180 |
-
"code>."
|
1181 |
-
msgstr ""
|
1182 |
-
|
1183 |
-
#: includes/ot-functions-docs-page.php:685
|
1184 |
-
msgid ""
|
1185 |
-
"As well, you'll probably want to create a directory named <code>includes</"
|
1186 |
-
"code> to put your <code>meta-boxes.php</code> into which will help keep you "
|
1187 |
-
"file structure nice and tidy."
|
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 |
-
|
1195 |
-
#: includes/ot-functions-docs-page.php:696
|
1196 |
-
msgid ""
|
1197 |
-
"Add a variation of the following code to your <code>meta-boxes.php</code>. "
|
1198 |
-
"You'll obviously need to fill it in with all your custom array values. It's "
|
1199 |
-
"important to note here that we use the <code>admin_init</code> filter "
|
1200 |
-
"because if you were to call the <code>ot_register_meta_box</code> function "
|
1201 |
-
"before OptionTree was loaded the sky would fall on your head."
|
1202 |
-
msgstr ""
|
1203 |
-
|
1204 |
-
#: includes/ot-functions-docs-page.php:758
|
1205 |
-
msgid ""
|
1206 |
-
"There are a few simple steps you need to take in order to use OptionTree as "
|
1207 |
-
"a theme included module. In the code below I'll show you a basic demo of how "
|
1208 |
-
"to include the entire plugin as a module, which will allow you to have the "
|
1209 |
-
"most up-to-date version of OptionTree without ever needing to hack the core "
|
1210 |
-
"of the plugin. If you would like to see some demo code, there is a directory "
|
1211 |
-
"named <code>theme-mode</code> inside the <code>assets</code> directory that "
|
1212 |
-
"contains a file named <code>demo-theme-options.php</code> you can reference."
|
1213 |
-
msgstr ""
|
1214 |
-
|
1215 |
-
#: includes/ot-functions-docs-page.php:760
|
1216 |
-
msgid "Step 1: Include the plugin & turn on theme mode."
|
1217 |
-
msgstr ""
|
1218 |
-
|
1219 |
-
#: includes/ot-functions-docs-page.php:762
|
1220 |
-
msgid ""
|
1221 |
-
"Download the latest version of <a href=\"http://wordpress.org/extend/plugins/"
|
1222 |
-
"option-tree/\" rel=\"nofollow\" target=\"_blank\">OptionTree</a>."
|
1223 |
-
msgstr ""
|
1224 |
-
|
1225 |
-
#: includes/ot-functions-docs-page.php:763
|
1226 |
-
msgid "Unpack the ZIP archive."
|
1227 |
-
msgstr ""
|
1228 |
-
|
1229 |
-
#: includes/ot-functions-docs-page.php:764
|
1230 |
-
msgid ""
|
1231 |
-
"Put the <code>option-tree</code> directory in the root of your theme. For "
|
1232 |
-
"example, the server path would be <code>/wp-content/themes/theme-name/option-"
|
1233 |
-
"tree/</code>."
|
1234 |
-
msgstr ""
|
1235 |
-
|
1236 |
-
#: includes/ot-functions-docs-page.php:765
|
1237 |
-
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: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 "
|
1277 |
-
"note, you don't need to put OptionTree in theme mode to manually create "
|
1278 |
-
"options but you will want to hide the docs and settings as each time you "
|
1279 |
-
"load the admin area the settings be be written over with the code below if "
|
1280 |
-
"they've changed in any way. However, this ensures your settings do not get "
|
1281 |
-
"tampered with by the end-user."
|
1282 |
-
msgstr ""
|
1283 |
-
|
1284 |
-
#: includes/ot-functions-option-types.php:46
|
1285 |
-
msgid "Sorry, this function does not exist"
|
1286 |
-
msgstr ""
|
1287 |
-
|
1288 |
-
#: includes/ot-functions-option-types.php:107
|
1289 |
-
msgid "background-repeat"
|
1290 |
-
msgstr ""
|
1291 |
-
|
1292 |
-
#: includes/ot-functions-option-types.php:116
|
1293 |
-
msgid "background-attachment"
|
1294 |
-
msgstr ""
|
1295 |
-
|
1296 |
-
#: includes/ot-functions-option-types.php:125
|
1297 |
-
msgid "background-position"
|
1298 |
-
msgstr ""
|
1299 |
-
|
1300 |
-
#: includes/ot-functions-option-types.php:140
|
1301 |
-
#: includes/ot-functions-option-types.php:1737
|
1302 |
-
msgid "Add Media"
|
1303 |
-
msgstr ""
|
1304 |
-
|
1305 |
-
#: includes/ot-functions-option-types.php:210
|
1306 |
-
#: includes/ot-functions-option-types.php:264
|
1307 |
-
msgid "No Categories Found"
|
1308 |
-
msgstr ""
|
1309 |
-
|
1310 |
-
#: includes/ot-functions-option-types.php:259
|
1311 |
-
#: includes/ot-functions-option-types.php:519
|
1312 |
-
#: includes/ot-functions-option-types.php:758
|
1313 |
-
#: includes/ot-functions-option-types.php:942
|
1314 |
-
#: includes/ot-functions-option-types.php:1196
|
1315 |
-
#: includes/ot-functions-option-types.php:1312
|
1316 |
-
msgid "Choose One"
|
1317 |
-
msgstr ""
|
1318 |
-
|
1319 |
-
#: includes/ot-functions-option-types.php:467
|
1320 |
-
#: includes/ot-functions-option-types.php:525
|
1321 |
-
#: includes/ot-functions-option-types.php:893
|
1322 |
-
#: includes/ot-functions-option-types.php:948
|
1323 |
-
msgid "No Posts Found"
|
1324 |
-
msgstr ""
|
1325 |
-
|
1326 |
-
#: includes/ot-functions-option-types.php:596
|
1327 |
-
#: includes/ot-functions-option-types.php:835
|
1328 |
-
msgid "Add New"
|
1329 |
-
msgstr ""
|
1330 |
-
|
1331 |
-
#: includes/ot-functions-option-types.php:599
|
1332 |
-
#: includes/ot-functions-option-types.php:838
|
1333 |
-
msgid "You can re-order with drag & drop, the order will update after saving."
|
1334 |
-
msgstr ""
|
1335 |
-
|
1336 |
-
#: includes/ot-functions-option-types.php:709
|
1337 |
-
#: includes/ot-functions-option-types.php:764
|
1338 |
-
msgid "No Pages Found"
|
1339 |
-
msgstr ""
|
1340 |
-
|
1341 |
-
#: includes/ot-functions-option-types.php:1147
|
1342 |
-
#: includes/ot-functions-option-types.php:1201
|
1343 |
-
msgid "No Tags Found"
|
1344 |
-
msgstr ""
|
1345 |
-
|
1346 |
-
#: includes/ot-functions-option-types.php:1260
|
1347 |
-
#: includes/ot-functions-option-types.php:1317
|
1348 |
-
msgid "No Taxonomies Found"
|
1349 |
-
msgstr ""
|
1350 |
-
|
1351 |
-
#: includes/ot-functions-settings-page.php:35
|
1352 |
-
msgid "Warning!"
|
1353 |
-
msgstr ""
|
1354 |
-
|
1355 |
-
#: includes/ot-functions-settings-page.php:36
|
1356 |
-
msgid ""
|
1357 |
-
"Go to the %s page if you want to save data, this page is for adding settings."
|
1358 |
-
msgstr ""
|
1359 |
-
|
1360 |
-
#: includes/ot-functions-settings-page.php:37
|
1361 |
-
msgid ""
|
1362 |
-
"If you're unsure or not completely positive that you should be editing these "
|
1363 |
-
"settings, you should read the %s first."
|
1364 |
-
msgstr ""
|
1365 |
-
|
1366 |
-
#: includes/ot-functions-settings-page.php:38
|
1367 |
-
msgid ""
|
1368 |
-
"Things could break or be improperly displayed to the end-user if you do one "
|
1369 |
-
"of the following:"
|
1370 |
-
msgstr ""
|
1371 |
-
|
1372 |
-
#: includes/ot-functions-settings-page.php:39
|
1373 |
-
msgid ""
|
1374 |
-
"Give two sections the same ID, give two settings the same ID, give two "
|
1375 |
-
"contextual help content areas the same ID, don't create any settings, or "
|
1376 |
-
"have a section at the end of the settings list."
|
1377 |
-
msgstr ""
|
1378 |
-
|
1379 |
-
#: includes/ot-functions-settings-page.php:40
|
1380 |
-
msgid ""
|
1381 |
-
"You can create as many settings as your project requires and use them how "
|
1382 |
-
"you see fit. When you add a setting here, it will be available on the Theme "
|
1383 |
-
"Options page for use in your theme. To separate your settings into sections, "
|
1384 |
-
"click the \"Add Section\" button, fill in the input fields, and a new "
|
1385 |
-
"navigation menu item will be created."
|
1386 |
-
msgstr ""
|
1387 |
-
|
1388 |
-
#: includes/ot-functions-settings-page.php:41
|
1389 |
-
msgid ""
|
1390 |
-
"All of the settings can be sorted and rearranged to your liking with Drag & "
|
1391 |
-
"Drop. Don't worry about the order in which you create your settings, you can "
|
1392 |
-
"always reorder them."
|
1393 |
-
msgstr ""
|
1394 |
-
|
1395 |
-
#: includes/ot-functions-settings-page.php:92
|
1396 |
-
msgid "Add Section"
|
1397 |
-
msgstr ""
|
1398 |
-
|
1399 |
-
#: includes/ot-functions-settings-page.php:94
|
1400 |
-
#: includes/ot-functions-settings-page.php:133
|
1401 |
-
#: includes/ot-ui-theme-options.php:42
|
1402 |
-
msgid "Save Changes"
|
1403 |
-
msgstr ""
|
1404 |
-
|
1405 |
-
#: includes/ot-functions-settings-page.php:99
|
1406 |
-
msgid "Contextual Help"
|
1407 |
-
msgstr ""
|
1408 |
-
|
1409 |
-
#: includes/ot-functions-settings-page.php:103
|
1410 |
-
msgid "Contextual Help Sidebar"
|
1411 |
-
msgstr ""
|
1412 |
-
|
1413 |
-
#: includes/ot-functions-settings-page.php:103
|
1414 |
-
msgid ""
|
1415 |
-
"If you decide to add contextual help to the Theme Option page, enter the "
|
1416 |
-
"optional \"Sidebar\" HTML here. This would be an extremely useful place to "
|
1417 |
-
"add links to your themes documentation or support forum. Only after you've "
|
1418 |
-
"added some content below will this display to the user."
|
1419 |
-
msgstr ""
|
1420 |
-
|
1421 |
-
#: includes/ot-functions-settings-page.php:132
|
1422 |
-
msgid "Add Contextual Help Content"
|
1423 |
-
msgstr ""
|
1424 |
-
|
1425 |
-
#: includes/ot-functions-settings-page.php:168
|
1426 |
-
msgid ""
|
1427 |
-
"This import method has been deprecated. That means it has been replaced by a "
|
1428 |
-
"new method and is no longer supported, and may be removed from future "
|
1429 |
-
"versions. All themes that use this import method should be converted to use "
|
1430 |
-
"its replacement below."
|
1431 |
-
msgstr ""
|
1432 |
-
|
1433 |
-
#: includes/ot-functions-settings-page.php:170
|
1434 |
-
msgid ""
|
1435 |
-
"If you were given a Theme Options XML file with a premium or free theme, "
|
1436 |
-
"locate it on your hard drive and upload that file by clicking the blue "
|
1437 |
-
"upload button. A popup window will appear, upload the XML file and click "
|
1438 |
-
"\"Send to OptionTree\". The file URL should be in the upload input, if it is "
|
1439 |
-
"click \"Import XML\"."
|
1440 |
-
msgstr ""
|
1441 |
-
|
1442 |
-
#: includes/ot-functions-settings-page.php:173
|
1443 |
-
msgid "Import XML"
|
1444 |
-
msgstr ""
|
1445 |
-
|
1446 |
-
#: includes/ot-functions-settings-page.php:189
|
1447 |
-
msgid "Add XML"
|
1448 |
-
msgstr ""
|
1449 |
-
|
1450 |
-
#: includes/ot-functions-settings-page.php:226
|
1451 |
-
msgid ""
|
1452 |
-
"To import your Settings copy and paste what appears to be a random string of "
|
1453 |
-
"alpha numeric characters into this textarea and press the \"Import Settings"
|
1454 |
-
"\" button."
|
1455 |
-
msgstr ""
|
1456 |
-
|
1457 |
-
#: includes/ot-functions-settings-page.php:229
|
1458 |
-
msgid "Import Settings"
|
1459 |
-
msgstr ""
|
1460 |
-
|
1461 |
-
#: includes/ot-functions-settings-page.php:271
|
1462 |
-
msgid ""
|
1463 |
-
"Only after you've imported the Settings should you try and update your Theme "
|
1464 |
-
"Options."
|
1465 |
-
msgstr ""
|
1466 |
-
|
1467 |
-
#: includes/ot-functions-settings-page.php:273
|
1468 |
-
msgid ""
|
1469 |
-
"To import your Theme Options copy and paste what appears to be a random "
|
1470 |
-
"string of alpha numeric characters into this textarea and press the \"Import "
|
1471 |
-
"Theme Options\" button."
|
1472 |
-
msgstr ""
|
1473 |
-
|
1474 |
-
#: includes/ot-functions-settings-page.php:276
|
1475 |
-
msgid "Import Theme Options"
|
1476 |
-
msgstr ""
|
1477 |
-
|
1478 |
-
#: includes/ot-functions-settings-page.php:318
|
1479 |
-
msgid ""
|
1480 |
-
"Only after you've imported the Settings should you try and update your "
|
1481 |
-
"Layouts."
|
1482 |
-
msgstr ""
|
1483 |
-
|
1484 |
-
#: includes/ot-functions-settings-page.php:320
|
1485 |
-
msgid ""
|
1486 |
-
"To import your Layouts copy and paste what appears to be a random string of "
|
1487 |
-
"alpha numeric characters into this textarea and press the \"Import Layouts\" "
|
1488 |
-
"button. Keep in mind that when you import your layouts, the active layout's "
|
1489 |
-
"saved data will write over the current data set for your Theme Options."
|
1490 |
-
msgstr ""
|
1491 |
-
|
1492 |
-
#: includes/ot-functions-settings-page.php:323
|
1493 |
-
msgid "Import Layouts"
|
1494 |
-
msgstr ""
|
1495 |
-
|
1496 |
-
#: includes/ot-functions-settings-page.php:366
|
1497 |
-
msgid ""
|
1498 |
-
"Export your Settings into a fully functional <code>theme-options.php</code> "
|
1499 |
-
"file by clicking this button. For more information on how to use this file "
|
1500 |
-
"read the theme mode %s. Remember, you should always check the file for "
|
1501 |
-
"errors before including it in your theme."
|
1502 |
-
msgstr ""
|
1503 |
-
|
1504 |
-
#: includes/ot-functions-settings-page.php:373
|
1505 |
-
msgid "Export Settings File"
|
1506 |
-
msgstr ""
|
1507 |
-
|
1508 |
-
#: includes/ot-functions-settings-page.php:403
|
1509 |
-
msgid ""
|
1510 |
-
"Export your Settings by highlighting this text and doing a copy/paste into a "
|
1511 |
-
"blank .txt file. Then save the file for importing into another install of "
|
1512 |
-
"WordPress later. Alternatively, you could just paste it into the "
|
1513 |
-
"<code>OptionTree->Settings->Import</code> <strong>Settings</strong> textarea "
|
1514 |
-
"on another web site."
|
1515 |
-
msgstr ""
|
1516 |
-
|
1517 |
-
#: includes/ot-functions-settings-page.php:439
|
1518 |
-
msgid ""
|
1519 |
-
"Export your Theme Options data by highlighting this text and doing a copy/"
|
1520 |
-
"paste into a blank .txt file. Then save the file for importing into another "
|
1521 |
-
"install of WordPress later. Alternatively, you could just paste it into the "
|
1522 |
-
"<code>OptionTree->Settings->Import</code> <strong>Theme Options</strong> "
|
1523 |
-
"textarea on another web site."
|
1524 |
-
msgstr ""
|
1525 |
-
|
1526 |
-
#: includes/ot-functions-settings-page.php:475
|
1527 |
-
msgid ""
|
1528 |
-
"Export your Layouts by highlighting this text and doing a copy/paste into a "
|
1529 |
-
"blank .txt file. Then save the file for importing into another install of "
|
1530 |
-
"WordPress later. Alternatively, you could just paste it into the "
|
1531 |
-
"<code>OptionTree->Settings->Import</code> <strong>Layouts</strong> textarea "
|
1532 |
-
"on another web site."
|
1533 |
-
msgstr ""
|
1534 |
-
|
1535 |
-
#: includes/ot-functions-settings-page.php:517
|
1536 |
-
msgid ""
|
1537 |
-
"To add a new layout enter a unique lower case alphanumeric string (dashes "
|
1538 |
-
"allowed) in the text field and click \"Save Layouts\"."
|
1539 |
-
msgstr ""
|
1540 |
-
|
1541 |
-
#: includes/ot-functions-settings-page.php:518
|
1542 |
-
msgid ""
|
1543 |
-
"As well, you can activate, remove, and drag & drop the order; all situations "
|
1544 |
-
"require you to click \"Save Layouts\" for the changes to be applied."
|
1545 |
-
msgstr ""
|
1546 |
-
|
1547 |
-
#: includes/ot-functions-settings-page.php:519
|
1548 |
-
msgid ""
|
1549 |
-
"When you create a new layout it will become active and any changes made to "
|
1550 |
-
"the Theme Options will be applied to it. If you switch back to a different "
|
1551 |
-
"layout immediately after creating a new layout that new layout will have a "
|
1552 |
-
"snapshot of the current Theme Options data attached to it."
|
1553 |
-
msgstr ""
|
1554 |
-
|
1555 |
-
#: includes/ot-functions-settings-page.php:520
|
1556 |
-
msgid ""
|
1557 |
-
"Visit <code>OptionTree->Documentation->Layouts Overview</code> to see a more "
|
1558 |
-
"in-depth description of what layouts are and how to use them."
|
1559 |
-
msgstr ""
|
1560 |
-
|
1561 |
-
#: includes/ot-functions-settings-page.php:557
|
1562 |
-
msgid "Save Layouts"
|
1563 |
-
msgstr ""
|
1564 |
-
|
1565 |
-
#: includes/ot-settings-api.php:353
|
1566 |
-
msgid "Reset Options"
|
1567 |
-
msgstr ""
|
1568 |
-
|
1569 |
-
#: includes/ot-ui-admin.php:19 includes/ot-ui-admin.php:20
|
1570 |
-
msgid "OptionTree"
|
1571 |
-
msgstr ""
|
1572 |
-
|
1573 |
-
#: includes/ot-ui-admin.php:36 includes/ot-ui-admin.php:131
|
1574 |
-
#: includes/ot-ui-theme-options.php:40
|
1575 |
-
msgid "Theme Options updated."
|
1576 |
-
msgstr ""
|
1577 |
-
|
1578 |
-
#: includes/ot-ui-admin.php:37 includes/ot-ui-admin.php:132
|
1579 |
-
#: includes/ot-ui-theme-options.php:41
|
1580 |
-
msgid "Theme Options reset."
|
1581 |
-
msgstr ""
|
1582 |
-
|
1583 |
-
#: includes/ot-ui-admin.php:38 includes/ot-ui-admin.php:133
|
1584 |
-
msgid "Save Settings"
|
1585 |
-
msgstr ""
|
1586 |
-
|
1587 |
-
#: includes/ot-ui-admin.php:44
|
1588 |
-
msgid "Theme Options UI"
|
1589 |
-
msgstr ""
|
1590 |
-
|
1591 |
-
#: includes/ot-ui-admin.php:48
|
1592 |
-
msgid "Import"
|
1593 |
-
msgstr ""
|
1594 |
-
|
1595 |
-
#: includes/ot-ui-admin.php:52
|
1596 |
-
msgid "Export"
|
1597 |
-
msgstr ""
|
1598 |
-
|
1599 |
-
#: includes/ot-ui-admin.php:56 includes/ot-ui-admin.php:86
|
1600 |
-
#: includes/ot-ui-admin.php:110
|
1601 |
-
msgid "Layouts"
|
1602 |
-
msgstr ""
|
1603 |
-
|
1604 |
-
#: includes/ot-ui-admin.php:62
|
1605 |
-
msgid "Theme Options UI Builder"
|
1606 |
-
msgstr ""
|
1607 |
-
|
1608 |
-
#: includes/ot-ui-admin.php:68
|
1609 |
-
msgid "Settings XML"
|
1610 |
-
msgstr ""
|
1611 |
-
|
1612 |
-
#: includes/ot-ui-admin.php:80 includes/ot-ui-admin.php:104
|
1613 |
-
#: includes/ot-ui-theme-options.php:34 includes/ot-ui-theme-options.php:35
|
1614 |
msgid "Theme Options"
|
1615 |
msgstr ""
|
1616 |
|
1617 |
-
#:
|
1618 |
-
msgid "Settings
|
1619 |
-
msgstr ""
|
1620 |
-
|
1621 |
-
#: includes/ot-ui-admin.php:116
|
1622 |
-
msgid "Add, Activate, & Remove Layouts"
|
1623 |
-
msgstr ""
|
1624 |
-
|
1625 |
-
#: includes/ot-ui-admin.php:125 includes/ot-ui-admin.php:126
|
1626 |
-
msgid "Documentation"
|
1627 |
-
msgstr ""
|
1628 |
-
|
1629 |
-
#: includes/ot-ui-admin.php:139
|
1630 |
-
msgid "Creating Options"
|
1631 |
-
msgstr ""
|
1632 |
-
|
1633 |
-
#: includes/ot-ui-admin.php:143
|
1634 |
-
msgid "Option Types"
|
1635 |
-
msgstr ""
|
1636 |
-
|
1637 |
-
#: includes/ot-ui-admin.php:147
|
1638 |
-
msgid "Function References"
|
1639 |
-
msgstr ""
|
1640 |
-
|
1641 |
-
#: includes/ot-ui-admin.php:151 includes/ot-ui-admin.php:193
|
1642 |
-
msgid "Theme Mode"
|
1643 |
-
msgstr ""
|
1644 |
-
|
1645 |
-
#: includes/ot-ui-admin.php:155 includes/ot-ui-admin.php:199
|
1646 |
-
msgid "Meta Boxes"
|
1647 |
-
msgstr ""
|
1648 |
-
|
1649 |
-
#: includes/ot-ui-admin.php:159
|
1650 |
-
msgid "Code Examples"
|
1651 |
-
msgstr ""
|
1652 |
-
|
1653 |
-
#: includes/ot-ui-admin.php:163
|
1654 |
-
msgid "Layouts Overview"
|
1655 |
-
msgstr ""
|
1656 |
-
|
1657 |
-
#: includes/ot-ui-admin.php:169
|
1658 |
-
msgid "Overview of available Theme Option fields."
|
1659 |
msgstr ""
|
1660 |
|
1661 |
-
#:
|
1662 |
-
msgid "
|
1663 |
msgstr ""
|
1664 |
|
1665 |
-
#:
|
1666 |
-
msgid "
|
1667 |
msgstr ""
|
1668 |
|
1669 |
-
#:
|
1670 |
-
msgid "
|
1671 |
msgstr ""
|
1672 |
|
1673 |
-
#:
|
1674 |
-
msgid "
|
1675 |
msgstr ""
|
1676 |
|
1677 |
-
#:
|
1678 |
-
msgid "
|
1679 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
|
7 |
+
"POT-Creation-Date: 2013-04-03 01:27:38+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 |
+
#: classes/class.admin.php:950
|
16 |
+
msgid "Options"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: classes/class.admin.php:1028
|
20 |
+
msgid "Somebody"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: classes/class.admin.php:1029
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
msgid "Theme Options"
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: classes/class.admin.php:1029
|
28 |
+
msgid "Settings"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: classes/class.admin.php:1031
|
32 |
+
msgid "Warning: %s is currently editing the %s."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: front-end/options.php:19 front-end/options.php:79
|
36 |
+
msgid "Save All Changes"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: front-end/options.php:78
|
40 |
+
msgid "Reset Options"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: front-end/settings.php:207
|
44 |
+
msgid "Import XML"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: front-end/settings.php:224
|
48 |
+
msgid "Import Data"
|
49 |
msgstr ""
|
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
|
@@ -55,12 +55,12 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
55 |
* @access private
|
56 |
* @since 2.0
|
57 |
*/
|
58 |
-
|
59 |
|
60 |
/**
|
61 |
* Current Version number.
|
62 |
*/
|
63 |
-
define( 'OT_VERSION', '2.0.
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
@@ -86,6 +86,18 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
86 |
*/
|
87 |
define( 'OT_THEME_MODE', apply_filters( 'ot_theme_mode', false ) );
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
/**
|
90 |
* For developers: Show Pages.
|
91 |
*
|
@@ -119,18 +131,23 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
119 |
/**
|
120 |
* Check if in theme mode.
|
121 |
*
|
122 |
-
* If OT_THEME_MODE is false, set the
|
123 |
-
* like any other plugin. Otherwise, use
|
124 |
-
* root directory.
|
125 |
*
|
126 |
* @since 2.0
|
127 |
*/
|
128 |
-
if ( false == OT_THEME_MODE ) {
|
129 |
define( 'OT_DIR', plugin_dir_path( __FILE__ ) );
|
130 |
define( 'OT_URL', plugin_dir_url( __FILE__ ) );
|
131 |
} else {
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
|
136 |
/**
|
@@ -151,7 +168,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
151 |
* @access private
|
152 |
* @since 2.0
|
153 |
*/
|
154 |
-
|
155 |
|
156 |
/* exit early if we're not on an admin page */
|
157 |
if ( ! is_admin() )
|
@@ -178,13 +195,9 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
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 |
-
|
188 |
}
|
189 |
|
190 |
}
|
@@ -200,21 +213,16 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
200 |
* @access private
|
201 |
* @since 2.0
|
202 |
*/
|
203 |
-
|
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 |
-
|
218 |
}
|
219 |
|
220 |
}
|
@@ -227,10 +235,10 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
227 |
* @access public
|
228 |
* @since 2.0
|
229 |
*/
|
230 |
-
|
231 |
|
232 |
/* load the text domain */
|
233 |
-
if ( false == OT_THEME_MODE ) {
|
234 |
add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
|
235 |
} else {
|
236 |
add_action( 'after_setup_theme', array( &$this, 'load_textdomain' ) );
|
@@ -305,6 +313,20 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
305 |
|
306 |
}
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
/**
|
309 |
* Load the text domain.
|
310 |
*
|
@@ -314,7 +336,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
314 |
* @since 2.0
|
315 |
*/
|
316 |
public function load_textdomain() {
|
317 |
-
if ( false == OT_THEME_MODE ) {
|
318 |
load_plugin_textdomain( 'option-tree', false, OT_LANG_DIR . 'plugin' );
|
319 |
} else {
|
320 |
load_theme_textdomain( 'option-tree', OT_LANG_DIR . 'theme-mode' );
|
@@ -327,7 +349,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
|
|
327 |
public function global_admin_css() {
|
328 |
echo '
|
329 |
<style>
|
330 |
-
#adminmenu #toplevel_page_ot-settings .wp-menu-image img { padding:
|
331 |
</style>
|
332 |
';
|
333 |
}
|
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.15
|
7 |
* Author: Derek Herman
|
8 |
* Author URI: http://valendesigns.com
|
9 |
* License: GPLv2
|
55 |
* @access private
|
56 |
* @since 2.0
|
57 |
*/
|
58 |
+
private function constants() {
|
59 |
|
60 |
/**
|
61 |
* Current Version number.
|
62 |
*/
|
63 |
+
define( 'OT_VERSION', '2.0.15' );
|
64 |
|
65 |
/**
|
66 |
* For developers: Allow Unfiltered HTML in all the textareas.
|
86 |
*/
|
87 |
define( 'OT_THEME_MODE', apply_filters( 'ot_theme_mode', false ) );
|
88 |
|
89 |
+
/**
|
90 |
+
* For developers: Child Theme mode. TODO document
|
91 |
+
*
|
92 |
+
* Run a filter and set to true to enable OptionTree child theme mode.
|
93 |
+
* You must have this files parent directory inside of
|
94 |
+
* your themes root directory. As well, you must include
|
95 |
+
* a reference to this file in your themes functions.php.
|
96 |
+
*
|
97 |
+
* @since 2.0.15
|
98 |
+
*/
|
99 |
+
define( 'OT_CHILD_THEME_MODE', apply_filters( 'ot_child_theme_mode', false ) );
|
100 |
+
|
101 |
/**
|
102 |
* For developers: Show Pages.
|
103 |
*
|
131 |
/**
|
132 |
* Check if in theme mode.
|
133 |
*
|
134 |
+
* If OT_THEME_MODE and OT_CHILD_THEME_MODE is false, set the
|
135 |
+
* directory path & URL like any other plugin. Otherwise, use
|
136 |
+
* the parent or child themes root directory.
|
137 |
*
|
138 |
* @since 2.0
|
139 |
*/
|
140 |
+
if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) {
|
141 |
define( 'OT_DIR', plugin_dir_path( __FILE__ ) );
|
142 |
define( 'OT_URL', plugin_dir_url( __FILE__ ) );
|
143 |
} else {
|
144 |
+
if ( true == OT_CHILD_THEME_MODE ) {
|
145 |
+
define( 'OT_DIR', trailingslashit( get_stylesheet_directory() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
146 |
+
define( 'OT_URL', trailingslashit( get_stylesheet_directory_uri() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
147 |
+
} else {
|
148 |
+
define( 'OT_DIR', trailingslashit( get_template_directory() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
149 |
+
define( 'OT_URL', trailingslashit( get_template_directory_uri() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) );
|
150 |
+
}
|
151 |
}
|
152 |
|
153 |
/**
|
168 |
* @access private
|
169 |
* @since 2.0
|
170 |
*/
|
171 |
+
private function admin_includes() {
|
172 |
|
173 |
/* exit early if we're not on an admin page */
|
174 |
if ( ! is_admin() )
|
195 |
$files[] = 'ot-ui-admin';
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
198 |
/* require the files */
|
199 |
foreach ( $files as $file ) {
|
200 |
+
$this->load_file( OT_DIR . "includes/{$file}.php" );
|
201 |
}
|
202 |
|
203 |
}
|
213 |
* @access private
|
214 |
* @since 2.0
|
215 |
*/
|
216 |
+
private function includes() {
|
|
|
217 |
|
218 |
$files = array(
|
219 |
'ot-functions',
|
220 |
'ot-functions-deprecated'
|
221 |
);
|
222 |
+
|
|
|
|
|
|
|
|
|
223 |
/* require the files */
|
224 |
foreach ( $files as $file ) {
|
225 |
+
$this->load_file( OT_DIR . "includes/{$file}.php" );
|
226 |
}
|
227 |
|
228 |
}
|
235 |
* @access public
|
236 |
* @since 2.0
|
237 |
*/
|
238 |
+
private function hooks() {
|
239 |
|
240 |
/* load the text domain */
|
241 |
+
if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) {
|
242 |
add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
|
243 |
} else {
|
244 |
add_action( 'after_setup_theme', array( &$this, 'load_textdomain' ) );
|
313 |
|
314 |
}
|
315 |
|
316 |
+
/**
|
317 |
+
* Load a file
|
318 |
+
*
|
319 |
+
* @return void
|
320 |
+
*
|
321 |
+
* @access private
|
322 |
+
* @since 2.0.15
|
323 |
+
*/
|
324 |
+
private function load_file( $file ){
|
325 |
+
|
326 |
+
include_once( $file );
|
327 |
+
|
328 |
+
}
|
329 |
+
|
330 |
/**
|
331 |
* Load the text domain.
|
332 |
*
|
336 |
* @since 2.0
|
337 |
*/
|
338 |
public function load_textdomain() {
|
339 |
+
if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) {
|
340 |
load_plugin_textdomain( 'option-tree', false, OT_LANG_DIR . 'plugin' );
|
341 |
} else {
|
342 |
load_theme_textdomain( 'option-tree', OT_LANG_DIR . 'theme-mode' );
|
349 |
public function global_admin_css() {
|
350 |
echo '
|
351 |
<style>
|
352 |
+
#adminmenu #toplevel_page_ot-settings .wp-menu-image img { padding: 5px 0px 1px 6px !important; }
|
353 |
</style>
|
354 |
';
|
355 |
}
|
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,16 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
|
|
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.
|
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.15
|
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.15 =
|
45 |
+
* Added support for Child Theme mode.
|
46 |
+
* Improved handling of standard values when settings are written manually.
|
47 |
+
* Add filter for CSS insertion value.
|
48 |
+
* Added 'ot_before_theme_options_save' action hook.
|
49 |
+
* Fix 'indexOf' JS error when upload is closed without uploading.
|
50 |
+
* Add textarea std value when option type is 'textarea', 'textarea-simple', or 'css'.
|
51 |
+
* Remove load_template and revert back to include_once.
|
52 |
+
* Fixed dynamic.css regression from 2.0.13 that caused the file to not save.
|
53 |
+
|
54 |
= 2.0.14 =
|
55 |
* Removed deprecated assigning of return value in PHP.
|
56 |
* Patch to fix PHP notice regression with the use of load_template in a plugin after Theme Check update.
|