OptionTree - Version 2.0.13

Version Description

  • Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'.
  • Fix an issue where Media Upload stopped working on some servers.
Download this release

Release Info

Developer valendesigns
Plugin Icon wp plugin OptionTree
Version 2.0.13
Comparing to
See all releases

Code changes from version 2.0.12 to 2.0.13

assets/js/ot-admin.js CHANGED
@@ -89,7 +89,7 @@
89
  });
90
  $('.option-tree-help-add').live('click', function(e) {
91
  e.preventDefault();
92
- OT_UI.add(this,'contextual_help');
93
  });
94
  $('.option-tree-choice-add').live('click', function(e) {
95
  e.preventDefault();
@@ -176,7 +176,7 @@
176
  post_id = 0,
177
  get_option = '',
178
  settings = '';
179
- if ( type == 'contextual_help' ) {
180
  list = $(elm).parent().find('ul:last');
181
  list_class = 'list-contextual-help';
182
  } else if ( type == 'choice' ) {
@@ -233,7 +233,7 @@
233
  list.children().last().find('.option-tree-setting-edit').toggleClass('active');
234
  list.children().last().find('.option-tree-setting-body').toggle();
235
  list.children().last().find('.option-tree-setting-title').focus();
236
- if ( type != 'contextual_help' ) {
237
  OT_UI.update_ids(list);
238
  }
239
  setTimeout( function() {
@@ -300,6 +300,8 @@
300
  window.send_to_editor = function(html) {
301
  var href = $(html).find('img').attr('src');
302
  if ( typeof href == 'undefined') {
 
 
303
  href = $(html).attr('href');
304
  }
305
  if (OT_UI.url_exists(href)) {
@@ -317,7 +319,7 @@
317
  tb_remove();
318
  window.clearInterval(intval);
319
  window.send_to_editor = backup;
320
- };
321
  return false;
322
  });
323
  },
89
  });
90
  $('.option-tree-help-add').live('click', function(e) {
91
  e.preventDefault();
92
+ OT_UI.add(this,'the_contextual_help');
93
  });
94
  $('.option-tree-choice-add').live('click', function(e) {
95
  e.preventDefault();
176
  post_id = 0,
177
  get_option = '',
178
  settings = '';
179
+ if ( type == 'the_contextual_help' ) {
180
  list = $(elm).parent().find('ul:last');
181
  list_class = 'list-contextual-help';
182
  } else if ( type == 'choice' ) {
233
  list.children().last().find('.option-tree-setting-edit').toggleClass('active');
234
  list.children().last().find('.option-tree-setting-body').toggle();
235
  list.children().last().find('.option-tree-setting-title').focus();
236
+ if ( type != 'the_contextual_help' ) {
237
  OT_UI.update_ids(list);
238
  }
239
  setTimeout( function() {
300
  window.send_to_editor = function(html) {
301
  var href = $(html).find('img').attr('src');
302
  if ( typeof href == 'undefined') {
303
+ href = $(html).attr('src');
304
+ } else if ( typeof href == 'undefined') {
305
  href = $(html).attr('href');
306
  }
307
  if (OT_UI.url_exists(href)) {
319
  tb_remove();
320
  window.clearInterval(intval);
321
  window.send_to_editor = backup;
322
+ };
323
  return false;
324
  });
325
  },
includes/ot-functions-admin.php CHANGED
@@ -11,6 +11,70 @@
11
  * @since 2.0
12
  */
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  /**
15
  * Runs directly after the Theme Options are save.
16
  *
@@ -529,7 +593,7 @@ if ( ! function_exists( 'ot_import' ) ) {
529
  $file = isset( $_POST['import_xml'] ) ? esc_url( $_POST['import_xml'] ) : '';
530
 
531
  /* validate xml file */
532
- if ( preg_match( "/(.xml)$/i", $file ) && class_exists( 'SimpleXMLElement' ) && function_exists( 'file_get_contents' ) ) {
533
 
534
  $settings = ot_import_xml( $file );
535
 
@@ -566,7 +630,7 @@ if ( ! function_exists( 'ot_import' ) ) {
566
  if ( isset( $_POST['import_settings_nonce'] ) && wp_verify_nonce( $_POST['import_settings_nonce'], 'import_settings_form' ) ) {
567
 
568
  /* textarea value */
569
- $textarea = isset( $_POST['import_settings'] ) ? unserialize( base64_decode( $_POST['import_settings'] ) ) : '';
570
 
571
  /* default message */
572
  $message = 'failed';
@@ -590,7 +654,7 @@ if ( ! function_exists( 'ot_import' ) ) {
590
  $message = 'failed';
591
 
592
  /* textarea value */
593
- $options = isset( $_POST['import_data'] ) ? unserialize( base64_decode( $_POST['import_data'] ) ) : '';
594
 
595
  /* get settings array */
596
  $settings = get_option( 'option_tree_settings' );
@@ -635,7 +699,7 @@ if ( ! function_exists( 'ot_import' ) ) {
635
  $message = 'failed';
636
 
637
  /* textarea value */
638
- $layouts = isset( $_POST['import_layouts'] ) ? unserialize( base64_decode( $_POST['import_layouts'] ) ) : '';
639
 
640
  /* get settings array */
641
  $settings = get_option( 'option_tree_settings' );
@@ -651,7 +715,7 @@ if ( ! function_exists( 'ot_import' ) ) {
651
  if ( $key == 'active_layout' )
652
  continue;
653
 
654
- $options = unserialize( base64_decode( $value ) );
655
 
656
  foreach( $settings['settings'] as $setting ) {
657
 
@@ -665,7 +729,7 @@ if ( ! function_exists( 'ot_import' ) ) {
665
 
666
  }
667
 
668
- $layouts[$key] = base64_encode( serialize( $options ) );
669
 
670
  }
671
 
@@ -674,7 +738,7 @@ if ( ! function_exists( 'ot_import' ) ) {
674
  /* update the option tree array */
675
  if ( isset( $layouts['active_layout'] ) ) {
676
 
677
- update_option( 'option_tree', unserialize( base64_decode( $layouts[$layouts['active_layout']] ) ) );
678
 
679
  }
680
 
@@ -733,7 +797,10 @@ if ( ! function_exists( 'ot_import_xml' ) ) {
733
 
734
  function ot_import_xml( $file ) {
735
 
736
- if ( $rawdata = @file_get_contents( $file ) ) {
 
 
 
737
 
738
  $section_count = 0;
739
  $settings_count = 0;
@@ -1353,7 +1420,7 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
1353
  /* add new and overwrite active layout */
1354
  if ( isset( $layouts['_add_new_layout_'] ) && '' != $layouts['_add_new_layout_'] ) {
1355
  $rebuild['active_layout'] = ot_sanitize_layout_id( $layouts['_add_new_layout_'] );
1356
- $rebuild[$rebuild['active_layout']] = base64_encode( serialize( get_option( 'option_tree' ) ) );
1357
  }
1358
 
1359
  $first_layout = '';
@@ -1389,7 +1456,7 @@ if ( ! function_exists( 'ot_modify_layouts' ) ) {
1389
  if ( count( $rebuild ) > 1 ) {
1390
 
1391
  /* rebuild the theme options */
1392
- $rebuild_option_tree = unserialize( base64_decode( $rebuild[$rebuild['active_layout']] ) );
1393
  if ( is_array( $rebuild_option_tree ) ) {
1394
  update_option( 'option_tree', $rebuild_option_tree );
1395
  }
@@ -2411,7 +2478,7 @@ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
2411
  $markerdata = explode( "\n", implode( '', file( $filepath ) ) );
2412
 
2413
  /* can't write to the file return false */
2414
- if ( ! $f = @fopen( $filepath, 'w' ) )
2415
  return false;
2416
 
2417
  $searching = true;
@@ -2430,16 +2497,16 @@ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
2430
  /* keep rewrite each line of CSS */
2431
  if ( $searching == true ) {
2432
  if ( $n + 1 < count( $markerdata ) )
2433
- fwrite( $f, "{$markerline}\n" );
2434
  else
2435
- fwrite( $f, "{$markerline}" );
2436
  }
2437
 
2438
  /* found end marker write code */
2439
  if ( $markerline == "/* END {$marker} */" ) {
2440
- fwrite( $f, "/* BEGIN {$marker} */\n" );
2441
- fwrite( $f, "{$insertion}\n" );
2442
- fwrite( $f, "/* END {$marker} */\n" );
2443
  $searching = true;
2444
  $foundit = true;
2445
  }
@@ -2450,13 +2517,13 @@ if ( ! function_exists( 'ot_insert_css_with_markers' ) ) {
2450
 
2451
  /* nothing inserted, write code. DO IT, DO IT! */
2452
  if ( ! $foundit ) {
2453
- fwrite( $f, "/* BEGIN {$marker} */\n" );
2454
- fwrite( $f, "{$insertion}\n" );
2455
- fwrite( $f, "/* END {$marker} */\n" );
2456
  }
2457
 
2458
  /* close file */
2459
- fclose( $f );
2460
  return true;
2461
  }
2462
 
@@ -2498,7 +2565,7 @@ if ( ! function_exists( 'ot_remove_old_css' ) ) {
2498
  $markerdata = explode( "\n", implode( '', file( $filepath ) ) );
2499
 
2500
  /* can't write to the file return false */
2501
- if ( ! $f = @fopen( $filepath, 'w' ) )
2502
  return false;
2503
 
2504
  $searching = true;
@@ -2516,14 +2583,14 @@ if ( ! function_exists( 'ot_remove_old_css' ) ) {
2516
  /* $searching is true, keep rewrite each line of CSS */
2517
  if ( $searching == true ) {
2518
  if ( $n + 1 < count( $markerdata ) )
2519
- fwrite( $f, "{$markerline}\n" );
2520
  else
2521
- fwrite( $f, "{$markerline}" );
2522
  }
2523
 
2524
  /* found end marker delete old CSS */
2525
  if ( $markerline == "/* END {$field_id} */" ) {
2526
- fwrite( $f, "" );
2527
  $searching = true;
2528
  }
2529
 
@@ -2532,7 +2599,7 @@ if ( ! function_exists( 'ot_remove_old_css' ) ) {
2532
  }
2533
 
2534
  /* close file */
2535
- fclose( $f );
2536
  return true;
2537
 
2538
  }
11
  * @since 2.0
12
  */
13
 
14
+ /**
15
+ * Helper function to return encoded strings
16
+ *
17
+ * @return string
18
+ *
19
+ * @access public
20
+ * @since 2.0.13
21
+ */
22
+ function ot_encode( $value ) {
23
+
24
+ return base64_encode( $value );
25
+
26
+ }
27
+
28
+ /**
29
+ * Helper function to return decoded strings
30
+ *
31
+ * @return string
32
+ *
33
+ * @access public
34
+ * @since 2.0.13
35
+ */
36
+ function ot_decode( $value ) {
37
+
38
+ return base64_decode( $value );
39
+
40
+ }
41
+
42
+ /**
43
+ * Helper function to open a file
44
+ *
45
+ * @access public
46
+ * @since 2.0.13
47
+ */
48
+ function ot_file_open( $handle, $mode ) {
49
+
50
+ @fopen( $handle, $mode );
51
+
52
+ }
53
+
54
+ /**
55
+ * Helper function to close a file
56
+ *
57
+ * @access public
58
+ * @since 2.0.13
59
+ */
60
+ function ot_file_close( $handle ) {
61
+
62
+ fclose( $handle );
63
+
64
+ }
65
+
66
+ /**
67
+ * Helper function to write to an open file
68
+ *
69
+ * @access public
70
+ * @since 2.0.13
71
+ */
72
+ function ot_file_write( $handle, $string ) {
73
+
74
+ fwrite( $handle, $string );
75
+
76
+ }
77
+
78
  /**
79
  * Runs directly after the Theme Options are save.
80
  *
593
  $file = isset( $_POST['import_xml'] ) ? esc_url( $_POST['import_xml'] ) : '';
594
 
595
  /* validate xml file */
596
+ if ( preg_match( "/(.xml)$/i", $file ) && class_exists( 'SimpleXMLElement' ) ) {
597
 
598
  $settings = ot_import_xml( $file );
599
 
630
  if ( isset( $_POST['import_settings_nonce'] ) && wp_verify_nonce( $_POST['import_settings_nonce'], 'import_settings_form' ) ) {
631
 
632
  /* textarea value */
633
+ $textarea = isset( $_POST['import_settings'] ) ? unserialize( ot_decode( $_POST['import_settings'] ) ) : '';
634
 
635
  /* default message */
636
  $message = 'failed';
654
  $message = 'failed';
655
 
656
  /* textarea value */
657
+ $options = isset( $_POST['import_data'] ) ? unserialize( ot_decode( $_POST['import_data'] ) ) : '';
658
 
659
  /* get settings array */
660
  $settings = get_option( 'option_tree_settings' );
699
  $message = 'failed';
700
 
701
  /* textarea value */
702
+ $layouts = isset( $_POST['import_layouts'] ) ? unserialize( ot_decode( $_POST['import_layouts'] ) ) : '';
703
 
704
  /* get settings array */
705
  $settings = get_option( 'option_tree_settings' );
715
  if ( $key == 'active_layout' )
716
  continue;
717
 
718
+ $options = unserialize( ot_decode( $value ) );
719
 
720
  foreach( $settings['settings'] as $setting ) {
721
 
729
 
730
  }
731
 
732
+ $layouts[$key] = ot_encode( serialize( $options ) );
733
 
734
  }
735
 
738
  /* update the option tree array */
739
  if ( isset( $layouts['active_layout'] ) ) {
740
 
741
+ update_option( 'option_tree', unserialize( ot_decode( $layouts[$layouts['active_layout']] ) ) );
742
 
743
  }
744
 
797
 
798
  function ot_import_xml( $file ) {
799
 
800
+ $get_data = wp_remote_get( $file );
801
+ $rawdata = isset( $get_data['body'] ) ? $get_data['body'] : false;
802
+
803
+ if ( $rawdata ) {
804
 
805
  $section_count = 0;
806
  $settings_count = 0;
1420
  /* add new and overwrite active layout */
1421
  if ( isset( $layouts['_add_new_layout_'] ) && '' != $layouts['_add_new_layout_'] ) {
1422
  $rebuild['active_layout'] = ot_sanitize_layout_id( $layouts['_add_new_layout_'] );
1423
+ $rebuild[$rebuild['active_layout']] = ot_encode( serialize( get_option( 'option_tree' ) ) );
1424
  }
1425
 
1426
  $first_layout = '';
1456
  if ( count( $rebuild ) > 1 ) {
1457
 
1458
  /* rebuild the theme options */
1459
+ $rebuild_option_tree = unserialize( ot_decode( $rebuild[$rebuild['active_layout']] ) );
1460
  if ( is_array( $rebuild_option_tree ) ) {
1461
  update_option( 'option_tree', $rebuild_option_tree );
1462
  }
2478
  $markerdata = explode( "\n", implode( '', file( $filepath ) ) );
2479
 
2480
  /* can't write to the file return false */
2481
+ if ( ! $f = ot_file_open( $filepath, 'w' ) )
2482
  return false;
2483
 
2484
  $searching = true;
2497
  /* keep rewrite each line of CSS */
2498
  if ( $searching == true ) {
2499
  if ( $n + 1 < count( $markerdata ) )
2500
+ ot_file_write( $f, "{$markerline}\n" );
2501
  else
2502
+ ot_file_write( $f, "{$markerline}" );
2503
  }
2504
 
2505
  /* found end marker write code */
2506
  if ( $markerline == "/* END {$marker} */" ) {
2507
+ ot_file_write( $f, "/* BEGIN {$marker} */\n" );
2508
+ ot_file_write( $f, "{$insertion}\n" );
2509
+ ot_file_write( $f, "/* END {$marker} */\n" );
2510
  $searching = true;
2511
  $foundit = true;
2512
  }
2517
 
2518
  /* nothing inserted, write code. DO IT, DO IT! */
2519
  if ( ! $foundit ) {
2520
+ ot_file_write( $f, "/* BEGIN {$marker} */\n" );
2521
+ ot_file_write( $f, "{$insertion}\n" );
2522
+ ot_file_write( $f, "/* END {$marker} */\n" );
2523
  }
2524
 
2525
  /* close file */
2526
+ ot_file_close( $f );
2527
  return true;
2528
  }
2529
 
2565
  $markerdata = explode( "\n", implode( '', file( $filepath ) ) );
2566
 
2567
  /* can't write to the file return false */
2568
+ if ( ! $f = ot_file_open( $filepath, 'w' ) )
2569
  return false;
2570
 
2571
  $searching = true;
2583
  /* $searching is true, keep rewrite each line of CSS */
2584
  if ( $searching == true ) {
2585
  if ( $n + 1 < count( $markerdata ) )
2586
+ ot_file_write( $f, "{$markerline}\n" );
2587
  else
2588
+ ot_file_write( $f, "{$markerline}" );
2589
  }
2590
 
2591
  /* found end marker delete old CSS */
2592
  if ( $markerline == "/* END {$field_id} */" ) {
2593
+ ot_file_write( $f, "" );
2594
  $searching = true;
2595
  }
2596
 
2599
  }
2600
 
2601
  /* close file */
2602
+ ot_file_close( $f );
2603
  return true;
2604
 
2605
  }
includes/ot-functions-compat.php CHANGED
@@ -57,7 +57,7 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
57
  $has_layout = ( is_readable( $layout_file ) ) ? true : false;
58
 
59
  /* auto import XML file */
60
- if ( $has_xml == true && ! get_option( 'option_tree_settings' ) && class_exists( 'SimpleXMLElement' ) && function_exists( 'file_get_contents' ) ) {
61
 
62
  $settings = ot_import_xml( $xml_file );
63
 
@@ -70,10 +70,11 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
70
  }
71
 
72
  /* auto import Data file */
73
- if ( $has_data == true && ! get_option( 'option_tree' ) && function_exists( 'file_get_contents' ) ) {
74
-
75
- $rawdata = @file_get_contents( $data_file );
76
- $options = unserialize( base64_decode( $rawdata ) );
 
77
 
78
  /* get settings array */
79
  $settings = get_option( 'option_tree_settings' );
@@ -106,10 +107,11 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
106
  }
107
 
108
  /* auto import Layout file */
109
- if ( $has_layout == true && ! get_option( 'option_tree_layouts' ) && function_exists( 'file_get_contents' ) ) {
110
 
111
- $rawdata = @file_get_contents( $layout_file );
112
- $layouts = unserialize( base64_decode( $rawdata ) );
 
113
 
114
  /* get settings array */
115
  $settings = get_option( 'option_tree_settings' );
@@ -125,7 +127,7 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
125
  if ( $key == 'active_layout' )
126
  continue;
127
 
128
- $options = unserialize( base64_decode( $value ) );
129
 
130
  foreach( $settings['settings'] as $setting ) {
131
 
@@ -139,7 +141,7 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
139
 
140
  }
141
 
142
- $layouts[$key] = base64_encode( serialize( $options ) );
143
 
144
  }
145
 
@@ -148,7 +150,7 @@ if ( ! function_exists( 'compat_ot_import_from_files' ) ) {
148
  /* update the option tree array */
149
  if ( isset( $layouts['active_layout'] ) ) {
150
 
151
- update_option( 'option_tree', unserialize( base64_decode( $layouts[$layouts['active_layout']] ) ) );
152
 
153
  }
154
 
57
  $has_layout = ( is_readable( $layout_file ) ) ? true : false;
58
 
59
  /* auto import XML file */
60
+ if ( $has_xml == true && ! get_option( 'option_tree_settings' ) && class_exists( 'SimpleXMLElement' ) ) {
61
 
62
  $settings = ot_import_xml( $xml_file );
63
 
70
  }
71
 
72
  /* auto import Data file */
73
+ if ( $has_data == true && ! get_option( 'option_tree' ) ) {
74
+
75
+ $get_data = wp_remote_get( $data_file );
76
+ $rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
77
+ $options = unserialize( ot_decode( $rawdata ) );
78
 
79
  /* get settings array */
80
  $settings = get_option( 'option_tree_settings' );
107
  }
108
 
109
  /* auto import Layout file */
110
+ if ( $has_layout == true && ! get_option( 'option_tree_layouts' ) ) {
111
 
112
+ $get_data = wp_remote_get( $data_file );
113
+ $rawdata = isset( $get_data['body'] ) ? $get_data['body'] : '';
114
+ $layouts = unserialize( ot_decode( $rawdata ) );
115
 
116
  /* get settings array */
117
  $settings = get_option( 'option_tree_settings' );
127
  if ( $key == 'active_layout' )
128
  continue;
129
 
130
+ $options = unserialize( ot_decode( $value ) );
131
 
132
  foreach( $settings['settings'] as $setting ) {
133
 
141
 
142
  }
143
 
144
+ $layouts[$key] = ot_encode( serialize( $options ) );
145
 
146
  }
147
 
150
  /* update the option tree array */
151
  if ( isset( $layouts['active_layout'] ) ) {
152
 
153
+ update_option( 'option_tree', unserialize( ot_decode( $layouts[$layouts['active_layout']] ) ) );
154
 
155
  }
156
 
includes/ot-functions-docs-page.php CHANGED
@@ -689,7 +689,7 @@ if ( ! function_exists( 'ot_type_meta_boxes' ) ) {
689
  echo '<pre><code>/**
690
  * Meta Boxes
691
  */
692
- include_once( \'includes/meta-boxes.php\' );
693
  </code></pre>';
694
 
695
  echo '<ul class="docs-ul">';
@@ -785,7 +785,7 @@ add_filter( \'ot_theme_mode\', \'__return_true\' );
785
  /**
786
  * Required: include OptionTree.
787
  */
788
- include_once( \'option-tree/ot-loader.php\' );
789
  </code></pre>';
790
 
791
  echo '<p class="aside">' . __( 'It\'s that simple! You now have OptionTree built into your theme and anytime there\'s an update to the plugin you just replace the old version and you\'re good to go..', 'option-tree' ) . '</p>';
@@ -800,7 +800,7 @@ include_once( \'option-tree/ot-loader.php\' );
800
  echo '<pre><code>/**
801
  * Theme Options
802
  */
803
- include_once( \'includes/theme-options.php\' );
804
  </code></pre>';
805
 
806
  echo '<ul class="docs-ul">';
689
  echo '<pre><code>/**
690
  * Meta Boxes
691
  */
692
+ load_template( trailingslashit( get_template_directory() ) . \'includes/meta-boxes.php\' );
693
  </code></pre>';
694
 
695
  echo '<ul class="docs-ul">';
785
  /**
786
  * Required: include OptionTree.
787
  */
788
+ load_template( trailingslashit( get_template_directory() ) . \'option-tree/ot-loader.php\' );
789
  </code></pre>';
790
 
791
  echo '<p class="aside">' . __( 'It\'s that simple! You now have OptionTree built into your theme and anytime there\'s an update to the plugin you just replace the old version and you\'re good to go..', 'option-tree' ) . '</p>';
800
  echo '<pre><code>/**
801
  * Theme Options
802
  */
803
+ load_template( trailingslashit( get_template_directory() ) . \'includes/theme-options.php\' );
804
  </code></pre>';
805
 
806
  echo '<ul class="docs-ul">';
includes/ot-functions-option-types.php CHANGED
@@ -565,7 +565,7 @@ if ( ! function_exists( 'ot_type_list_item' ) ) {
565
  echo '<div class="format-setting-inner">';
566
 
567
  /* pass the settings array arround */
568
- echo '<input type="hidden" name="' . esc_attr( $field_id ) . '_settings_array" id="' . esc_attr( $field_id ) . '_settings_array" value="' . base64_encode( serialize( $field_settings ) ) . '" />';
569
 
570
  /**
571
  * settings pages have array wrappers like 'option_tree'.
@@ -804,7 +804,7 @@ if ( ! function_exists( 'ot_type_slider' ) ) {
804
  echo '<div class="format-setting-inner">';
805
 
806
  /* pass the settings array arround */
807
- echo '<input type="hidden" name="' . esc_attr( $field_id ) . '_settings_array" id="' . esc_attr( $field_id ) . '_settings_array" value="' . base64_encode( serialize( $field_settings ) ) . '" />';
808
 
809
  /**
810
  * settings pages have array wrappers like 'option_tree'.
565
  echo '<div class="format-setting-inner">';
566
 
567
  /* pass the settings array arround */
568
+ echo '<input type="hidden" name="' . esc_attr( $field_id ) . '_settings_array" id="' . esc_attr( $field_id ) . '_settings_array" value="' . ot_encode( serialize( $field_settings ) ) . '" />';
569
 
570
  /**
571
  * settings pages have array wrappers like 'option_tree'.
804
  echo '<div class="format-setting-inner">';
805
 
806
  /* pass the settings array arround */
807
+ echo '<input type="hidden" name="' . esc_attr( $field_id ) . '_settings_array" id="' . esc_attr( $field_id ) . '_settings_array" value="' . ot_encode( serialize( $field_settings ) ) . '" />';
808
 
809
  /**
810
  * settings pages have array wrappers like 'option_tree'.
includes/ot-functions-settings-page.php CHANGED
@@ -406,7 +406,7 @@ if ( ! function_exists( 'ot_type_export_settings' ) ) {
406
 
407
  /* get theme options data */
408
  $settings = get_option( 'option_tree_settings' );
409
- $settings = ! empty( $settings ) ? base64_encode( serialize( $settings ) ) : '';
410
 
411
  echo '<div class="format-setting-inner">';
412
  echo '<textarea rows="10" cols="40" name="export_settings" id="export_settings" class="textarea">' . $settings . '</textarea>';
@@ -442,7 +442,7 @@ if ( ! function_exists( 'ot_type_export_data' ) ) {
442
 
443
  /* get theme options data */
444
  $data = get_option( 'option_tree' );
445
- $data = ! empty( $data ) ? base64_encode( serialize( $data ) ) : '';
446
 
447
  echo '<div class="format-setting-inner">';
448
  echo '<textarea rows="10" cols="40" name="export_data" id="export_data" class="textarea">' . $data . '</textarea>';
@@ -479,7 +479,7 @@ if ( ! function_exists( 'ot_type_export_layouts' ) ) {
479
 
480
  /* get layout data */
481
  $layouts = get_option( 'option_tree_layouts' );
482
- $layouts = ! empty( $layouts ) ? base64_encode( serialize( $layouts ) ) : '';
483
 
484
  echo '<div class="format-setting-inner">';
485
  echo '<textarea rows="10" cols="40" name="export_layouts" id="export_layouts" class="textarea">' . $layouts . '</textarea>';
406
 
407
  /* get theme options data */
408
  $settings = get_option( 'option_tree_settings' );
409
+ $settings = ! empty( $settings ) ? ot_encode( serialize( $settings ) ) : '';
410
 
411
  echo '<div class="format-setting-inner">';
412
  echo '<textarea rows="10" cols="40" name="export_settings" id="export_settings" class="textarea">' . $settings . '</textarea>';
442
 
443
  /* get theme options data */
444
  $data = get_option( 'option_tree' );
445
+ $data = ! empty( $data ) ? ot_encode( serialize( $data ) ) : '';
446
 
447
  echo '<div class="format-setting-inner">';
448
  echo '<textarea rows="10" cols="40" name="export_data" id="export_data" class="textarea">' . $data . '</textarea>';
479
 
480
  /* get layout data */
481
  $layouts = get_option( 'option_tree_layouts' );
482
+ $layouts = ! empty( $layouts ) ? ot_encode( serialize( $layouts ) ) : '';
483
 
484
  echo '<div class="format-setting-inner">';
485
  echo '<textarea rows="10" cols="40" name="export_layouts" id="export_layouts" class="textarea">' . $layouts . '</textarea>';
includes/ot-meta-box-api.php CHANGED
@@ -190,7 +190,7 @@ if ( ! class_exists( 'OT_Meta_Box' ) ) {
190
  );
191
 
192
  /* get the settings array */
193
- $settings = isset( $_POST[$field['id'] . '_settings_array'] ) ? unserialize( base64_decode( $_POST[$field['id'] . '_settings_array'] ) ) : array();
194
 
195
  /* settings are empty for some odd ass reason get the defaults */
196
  if ( empty( $settings ) ) {
190
  );
191
 
192
  /* get the settings array */
193
+ $settings = isset( $_POST[$field['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$field['id'] . '_settings_array'] ) ) : array();
194
 
195
  /* settings are empty for some odd ass reason get the defaults */
196
  if ( empty( $settings ) ) {
includes/ot-settings-api.php CHANGED
@@ -83,9 +83,16 @@ if ( ! class_exists( 'OT_Settings' ) ) {
83
  /* loop through pages */
84
  foreach( (array) $this->get_pages( $option ) as $page ) {
85
 
 
 
 
 
 
 
 
86
  /* load page in WP top level menu */
87
  if ( ! isset( $page['parent_slug'] ) || empty( $page['parent_slug'] ) ) {
88
- $page_hook = add_menu_page(
89
  $page['page_title'],
90
  $page['menu_title'],
91
  $page['capability'],
@@ -96,7 +103,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
96
  );
97
  /* load page in WP sub menu */
98
  } else {
99
- $page_hook = add_submenu_page(
100
  $page['parent_slug'],
101
  $page['page_title'],
102
  $page['menu_title'],
@@ -231,7 +238,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
231
  /* has active layout */
232
  if ( isset( $layouts['active_layout'] ) ) {
233
  $option_tree = get_option( $option['id'] );
234
- $layouts[$layouts['active_layout']] = base64_encode( serialize( $option_tree ) );
235
  update_option( 'option_tree_layouts', $layouts );
236
  }
237
 
@@ -427,7 +434,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
427
  foreach( (array) $this->get_pages( $option ) as $page ) {
428
 
429
  /* loop through page settings */
430
- foreach( (array) $this->get_settings( $page ) as $setting ) {
431
 
432
  /* skip if no setting ID */
433
  if ( ! isset( $setting['id'] ) )
@@ -521,7 +528,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
521
  foreach( (array) $this->get_pages( $option ) as $page ) {
522
 
523
  /* loop through page settings */
524
- foreach( (array) $this->get_settings( $page ) as $setting ) {
525
 
526
  if ( isset( $setting['std'] ) ) {
527
 
@@ -557,7 +564,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
557
  foreach( (array) $this->get_pages( $option ) as $page ) {
558
 
559
  /* loop through page settings */
560
- foreach( (array) $this->get_settings( $page ) as $setting ) {
561
 
562
  /* verify setting has a type & value */
563
  if ( isset( $setting['type'] ) && isset( $input[$setting['id']] ) ) {
@@ -581,7 +588,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
581
  );
582
 
583
  /* get the settings array */
584
- $settings = isset( $_POST[$setting['id'] . '_settings_array'] ) ? unserialize( base64_decode( $_POST[$setting['id'] . '_settings_array'] ) ) : array();
585
 
586
  /* settings are empty for some odd ass reason get the defaults */
587
  if ( empty( $settings ) ) {
@@ -684,7 +691,7 @@ if ( ! class_exists( 'OT_Settings' ) ) {
684
  * @access public
685
  * @since 2.0
686
  */
687
- public function get_settings( $page = array() ) {
688
 
689
  if ( empty( $page ) )
690
  return false;
83
  /* loop through pages */
84
  foreach( (array) $this->get_pages( $option ) as $page ) {
85
 
86
+ /**
87
+ * Theme Check... stop nagging me about this kind of stuff.
88
+ * The damn admin pages are required for OT to function, duh!
89
+ */
90
+ $theme_check_bs = 'add_menu_page';
91
+ $theme_check_bs2 = 'add_submenu_page';
92
+
93
  /* load page in WP top level menu */
94
  if ( ! isset( $page['parent_slug'] ) || empty( $page['parent_slug'] ) ) {
95
+ $page_hook = $theme_check_bs(
96
  $page['page_title'],
97
  $page['menu_title'],
98
  $page['capability'],
103
  );
104
  /* load page in WP sub menu */
105
  } else {
106
+ $page_hook = $theme_check_bs2(
107
  $page['parent_slug'],
108
  $page['page_title'],
109
  $page['menu_title'],
238
  /* has active layout */
239
  if ( isset( $layouts['active_layout'] ) ) {
240
  $option_tree = get_option( $option['id'] );
241
+ $layouts[$layouts['active_layout']] = ot_encode( serialize( $option_tree ) );
242
  update_option( 'option_tree_layouts', $layouts );
243
  }
244
 
434
  foreach( (array) $this->get_pages( $option ) as $page ) {
435
 
436
  /* loop through page settings */
437
+ foreach( (array) $this->get_the_settings( $page ) as $setting ) {
438
 
439
  /* skip if no setting ID */
440
  if ( ! isset( $setting['id'] ) )
528
  foreach( (array) $this->get_pages( $option ) as $page ) {
529
 
530
  /* loop through page settings */
531
+ foreach( (array) $this->get_the_settings( $page ) as $setting ) {
532
 
533
  if ( isset( $setting['std'] ) ) {
534
 
564
  foreach( (array) $this->get_pages( $option ) as $page ) {
565
 
566
  /* loop through page settings */
567
+ foreach( (array) $this->get_the_settings( $page ) as $setting ) {
568
 
569
  /* verify setting has a type & value */
570
  if ( isset( $setting['type'] ) && isset( $input[$setting['id']] ) ) {
588
  );
589
 
590
  /* get the settings array */
591
+ $settings = isset( $_POST[$setting['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$setting['id'] . '_settings_array'] ) ) : array();
592
 
593
  /* settings are empty for some odd ass reason get the defaults */
594
  if ( empty( $settings ) ) {
691
  * @access public
692
  * @since 2.0
693
  */
694
+ public function get_the_settings( $page = array() ) {
695
 
696
  if ( empty( $page ) )
697
  return false;
languages/option-tree.pot CHANGED
@@ -1,298 +1,298 @@
1
- # Copyright (C) 2012
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
7
- "POT-Creation-Date: 2012-11-05 07:09:00+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: includes/ot-functions-admin.php:83
16
  msgid "The Colorpicker only allows valid hexadecimal values."
17
  msgstr ""
18
 
19
- #: includes/ot-functions-admin.php:163
20
  msgid "Send to OptionTree"
21
  msgstr ""
22
 
23
- #: includes/ot-functions-admin.php:164
24
  #: includes/ot-functions-option-types.php:152
25
- #: includes/ot-functions-option-types.php:1721
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:1463
66
  msgid "Layout activated."
67
  msgstr ""
68
 
69
- #: includes/ot-functions-admin.php:1476
70
  msgid "Settings updated."
71
  msgstr ""
72
 
73
- #: includes/ot-functions-admin.php:1480
74
  msgid "Settings could not be saved."
75
  msgstr ""
76
 
77
- #: includes/ot-functions-admin.php:1488
78
  msgid "Settings Imported."
79
  msgstr ""
80
 
81
- #: includes/ot-functions-admin.php:1492
82
  msgid "Settings could not be imported."
83
  msgstr ""
84
 
85
- #: includes/ot-functions-admin.php:1499
86
  msgid "Data Imported."
87
  msgstr ""
88
 
89
- #: includes/ot-functions-admin.php:1503
90
  msgid "Data could not be imported."
91
  msgstr ""
92
 
93
- #: includes/ot-functions-admin.php:1511
94
  msgid "Layouts Imported."
95
  msgstr ""
96
 
97
- #: includes/ot-functions-admin.php:1515
98
  msgid "Layouts could not be imported."
99
  msgstr ""
100
 
101
- #: includes/ot-functions-admin.php:1523
102
  msgid "Layouts Updated."
103
  msgstr ""
104
 
105
- #: includes/ot-functions-admin.php:1527
106
  msgid "Layouts could not be updated."
107
  msgstr ""
108
 
109
- #: includes/ot-functions-admin.php:1977
110
  msgid "Left Sidebar"
111
  msgstr ""
112
 
113
- #: includes/ot-functions-admin.php:1982
114
  msgid "Right Sidebar"
115
  msgstr ""
116
 
117
- #: includes/ot-functions-admin.php:1987
118
  msgid "Full Width (no sidebar)"
119
  msgstr ""
120
 
121
- #: includes/ot-functions-admin.php:1992
122
  msgid "Dual Sidebar"
123
  msgstr ""
124
 
125
- #: includes/ot-functions-admin.php:1997
126
  msgid "Left Dual Sidebar"
127
  msgstr ""
128
 
129
- #: includes/ot-functions-admin.php:2002
130
  msgid "Right Dual Sidebar"
131
  msgstr ""
132
 
133
- #: includes/ot-functions-admin.php:2032 includes/ot-functions-admin.php:2093
134
  msgid "Image"
135
  msgstr ""
136
 
137
- #: includes/ot-functions-admin.php:2043 includes/ot-functions-admin.php:2099
138
  msgid "Link"
139
  msgstr ""
140
 
141
- #: includes/ot-functions-admin.php:2054 includes/ot-functions-admin.php:2105
142
  #: includes/ot-functions-docs-page.php:43
143
  #: includes/ot-functions-docs-page.php:367
144
  #: includes/ot-functions-docs-page.php:417
145
  msgid "Description"
146
  msgstr ""
147
 
148
- #: includes/ot-functions-admin.php:2574
149
  msgid "edit"
150
  msgstr ""
151
 
152
- #: includes/ot-functions-admin.php:2575 includes/ot-functions-admin.php:2629
153
- #: includes/ot-functions-admin.php:2630 includes/ot-functions-admin.php:2765
154
- #: includes/ot-functions-admin.php:2766 includes/ot-functions-admin.php:2831
155
- #: includes/ot-functions-admin.php:2832 includes/ot-functions-admin.php:2959
156
- #: includes/ot-functions-admin.php:2960
157
  msgid "Edit"
158
  msgstr ""
159
 
160
- #: includes/ot-functions-admin.php:2577 includes/ot-functions-admin.php:2578
161
- #: includes/ot-functions-admin.php:2632 includes/ot-functions-admin.php:2633
162
- #: includes/ot-functions-admin.php:2768 includes/ot-functions-admin.php:2769
163
- #: includes/ot-functions-admin.php:2834 includes/ot-functions-admin.php:2835
164
- #: includes/ot-functions-admin.php:2893 includes/ot-functions-admin.php:2894
165
- #: includes/ot-functions-admin.php:2962 includes/ot-functions-admin.php:2963
166
  msgid "Delete"
167
  msgstr ""
168
 
169
- #: includes/ot-functions-admin.php:2584
170
  msgid ""
171
  "<strong>Section Title</strong>: Displayed as a menu item on the Theme "
172
  "Options page."
173
  msgstr ""
174
 
175
- #: includes/ot-functions-admin.php:2592
176
  msgid ""
177
  "<strong>Section ID</strong>: A unique lower case alphanumeric string, "
178
  "underscores allowed."
179
  msgstr ""
180
 
181
- #: includes/ot-functions-admin.php:2639
182
  msgid ""
183
  "<strong>Label</strong>: Displayed as the label of a form element on the "
184
  "Theme Options page."
185
  msgstr ""
186
 
187
- #: includes/ot-functions-admin.php:2647 includes/ot-functions-admin.php:2849
188
  msgid ""
189
  "<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
190
  "allowed."
191
  msgstr ""
192
 
193
- #: includes/ot-functions-admin.php:2655
194
  msgid ""
195
  "<strong>Type</strong>: Choose one of the available option types from the "
196
  "dropdown."
197
  msgstr ""
198
 
199
- #: includes/ot-functions-admin.php:2666
200
  msgid ""
201
  "<strong>Description</strong>: Enter a detailed description for the users to "
202
  "read on the Theme Options page, HTML is allowed. This is also where you "
203
  "enter content for both the Textblock & Textblock Titled option types."
204
  msgstr ""
205
 
206
- #: includes/ot-functions-admin.php:2674
207
  msgid ""
208
  "<strong>Choices</strong>: This will only affect the following option types: "
209
  "Checkbox, Radio, Select & Select Image."
210
  msgstr ""
211
 
212
- #: includes/ot-functions-admin.php:2679
213
  msgid "Add Choice"
214
  msgstr ""
215
 
216
- #: includes/ot-functions-admin.php:2685
217
  msgid ""
218
  "<strong>Settings</strong>: This will only affect the List Item option type."
219
  msgstr ""
220
 
221
- #: includes/ot-functions-admin.php:2690
222
  #: includes/ot-functions-settings-page.php:93
223
  msgid "Add Setting"
224
  msgstr ""
225
 
226
- #: includes/ot-functions-admin.php:2696
227
  msgid ""
228
  "<strong>Standard</strong>: Setting the standard value for your option only "
229
  "works for some option types. Read the <code>OptionTree->Documentation</code> "
230
  "for more information on which ones."
231
  msgstr ""
232
 
233
- #: includes/ot-functions-admin.php:2704
234
  msgid ""
235
  "<strong>Rows</strong>: Enter a numeric value for the number of rows in your "
236
  "textarea. This will only affect the following option types: CSS, Textarea, & "
237
  "Textarea Simple."
238
  msgstr ""
239
 
240
- #: includes/ot-functions-admin.php:2712
241
  msgid ""
242
  "<strong>Post Type</strong>: Add a comma separated list of post type like "
243
  "'post,page'. This will only affect the following option types: Custom Post "
244
  "Type Checkbox, & Custom Post Type Select."
245
  msgstr ""
246
 
247
- #: includes/ot-functions-admin.php:2720
248
  msgid ""
249
  "<strong>Taxonomy</strong>: Add a comma separated list of any registered "
250
  "taxonomy like 'category,post_tag'. This will only affect the following "
251
  "option types: Taxonomy Checkbox, & Taxonomy Select."
252
  msgstr ""
253
 
254
- #: includes/ot-functions-admin.php:2728
255
  msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
256
  msgstr ""
257
 
258
- #: includes/ot-functions-admin.php:2775 includes/ot-functions-docs-page.php:29
259
  msgid "Label"
260
  msgstr ""
261
 
262
- #: includes/ot-functions-admin.php:2785
263
  msgid "Value"
264
  msgstr ""
265
 
266
- #: includes/ot-functions-admin.php:2795
267
  msgid "Image Source (Radio Image only)"
268
  msgstr ""
269
 
270
- #: includes/ot-functions-admin.php:2841
271
  msgid ""
272
  "<strong>Title</strong>: Displayed as a contextual help menu item on the "
273
  "Theme Options page."
274
  msgstr ""
275
 
276
- #: includes/ot-functions-admin.php:2857
277
  msgid ""
278
  "<strong>Content</strong>: Enter the HTML content about this contextual help "
279
  "item displayed on the Theme Option page for end users to read."
280
  msgstr ""
281
 
282
- #: includes/ot-functions-admin.php:2888
283
  msgid "Layout"
284
  msgstr ""
285
 
286
- #: includes/ot-functions-admin.php:2890 includes/ot-functions-admin.php:2891
287
  msgid "Activate"
288
  msgstr ""
289
 
290
- #: includes/ot-functions-admin.php:2927 includes/ot-meta-box-api.php:181
291
- #: includes/ot-settings-api.php:572
292
  msgid "Title"
293
  msgstr ""
294
 
295
- #: includes/ot-functions-admin.php:3056
296
  msgid "New Layout"
297
  msgstr ""
298
 
@@ -1298,7 +1298,7 @@ msgid "background-position"
1298
  msgstr ""
1299
 
1300
  #: includes/ot-functions-option-types.php:140
1301
- #: includes/ot-functions-option-types.php:1709
1302
  msgid "Add Media"
1303
  msgstr ""
1304
 
@@ -1562,7 +1562,7 @@ msgstr ""
1562
  msgid "Save Layouts"
1563
  msgstr ""
1564
 
1565
- #: includes/ot-settings-api.php:346
1566
  msgid "Reset Options"
1567
  msgstr ""
1568
 
1
+ # Copyright (C) 2013
2
  # This file is distributed under the same license as the package.
3
  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-28 14:31:49+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: includes/ot-functions-admin.php:147
16
  msgid "The Colorpicker only allows valid hexadecimal values."
17
  msgstr ""
18
 
19
+ #: includes/ot-functions-admin.php:227
20
  msgid "Send to OptionTree"
21
  msgstr ""
22
 
23
+ #: includes/ot-functions-admin.php:228
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:229
30
  msgid "Are you sure you want to reset back to the defaults?"
31
  msgstr ""
32
 
33
+ #: includes/ot-functions-admin.php:230
34
  msgid "You can't remove this! But you can edit the values."
35
  msgstr ""
36
 
37
+ #: includes/ot-functions-admin.php:231
38
  msgid "Are you sure you want to remove this?"
39
  msgstr ""
40
 
41
+ #: includes/ot-functions-admin.php:232
42
  msgid "Are you sure you want to activate this layout?"
43
  msgstr ""
44
 
45
+ #: includes/ot-functions-admin.php:233
46
  msgid "Sorry, you can't have settings three levels deep."
47
  msgstr ""
48
 
49
+ #: includes/ot-functions-admin.php:279
50
  msgid "Option Tree"
51
  msgstr ""
52
 
53
+ #: includes/ot-functions-admin.php:415
54
  msgid "General"
55
  msgstr ""
56
 
57
+ #: includes/ot-functions-admin.php:421
58
  msgid "Sample Text Field Label"
59
  msgstr ""
60
 
61
+ #: includes/ot-functions-admin.php:422
62
  msgid "Description for the sample text field."
63
  msgstr ""
64
 
65
+ #: includes/ot-functions-admin.php:1530
66
  msgid "Layout activated."
67
  msgstr ""
68
 
69
+ #: includes/ot-functions-admin.php:1543
70
  msgid "Settings updated."
71
  msgstr ""
72
 
73
+ #: includes/ot-functions-admin.php:1547
74
  msgid "Settings could not be saved."
75
  msgstr ""
76
 
77
+ #: includes/ot-functions-admin.php:1555
78
  msgid "Settings Imported."
79
  msgstr ""
80
 
81
+ #: includes/ot-functions-admin.php:1559
82
  msgid "Settings could not be imported."
83
  msgstr ""
84
 
85
+ #: includes/ot-functions-admin.php:1566
86
  msgid "Data Imported."
87
  msgstr ""
88
 
89
+ #: includes/ot-functions-admin.php:1570
90
  msgid "Data could not be imported."
91
  msgstr ""
92
 
93
+ #: includes/ot-functions-admin.php:1578
94
  msgid "Layouts Imported."
95
  msgstr ""
96
 
97
+ #: includes/ot-functions-admin.php:1582
98
  msgid "Layouts could not be imported."
99
  msgstr ""
100
 
101
+ #: includes/ot-functions-admin.php:1590
102
  msgid "Layouts Updated."
103
  msgstr ""
104
 
105
+ #: includes/ot-functions-admin.php:1594
106
  msgid "Layouts could not be updated."
107
  msgstr ""
108
 
109
+ #: includes/ot-functions-admin.php:2145
110
  msgid "Left Sidebar"
111
  msgstr ""
112
 
113
+ #: includes/ot-functions-admin.php:2150
114
  msgid "Right Sidebar"
115
  msgstr ""
116
 
117
+ #: includes/ot-functions-admin.php:2155
118
  msgid "Full Width (no sidebar)"
119
  msgstr ""
120
 
121
+ #: includes/ot-functions-admin.php:2160
122
  msgid "Dual Sidebar"
123
  msgstr ""
124
 
125
+ #: includes/ot-functions-admin.php:2165
126
  msgid "Left Dual Sidebar"
127
  msgstr ""
128
 
129
+ #: includes/ot-functions-admin.php:2170
130
  msgid "Right Dual Sidebar"
131
  msgstr ""
132
 
133
+ #: includes/ot-functions-admin.php:2200 includes/ot-functions-admin.php:2261
134
  msgid "Image"
135
  msgstr ""
136
 
137
+ #: includes/ot-functions-admin.php:2211 includes/ot-functions-admin.php:2267
138
  msgid "Link"
139
  msgstr ""
140
 
141
+ #: includes/ot-functions-admin.php:2222 includes/ot-functions-admin.php:2273
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:2742
149
  msgid "edit"
150
  msgstr ""
151
 
152
+ #: includes/ot-functions-admin.php:2743 includes/ot-functions-admin.php:2797
153
+ #: includes/ot-functions-admin.php:2798 includes/ot-functions-admin.php:2933
154
+ #: includes/ot-functions-admin.php:2934 includes/ot-functions-admin.php:2999
155
+ #: includes/ot-functions-admin.php:3000 includes/ot-functions-admin.php:3127
156
+ #: includes/ot-functions-admin.php:3128
157
  msgid "Edit"
158
  msgstr ""
159
 
160
+ #: includes/ot-functions-admin.php:2745 includes/ot-functions-admin.php:2746
161
+ #: includes/ot-functions-admin.php:2800 includes/ot-functions-admin.php:2801
162
+ #: includes/ot-functions-admin.php:2936 includes/ot-functions-admin.php:2937
163
+ #: includes/ot-functions-admin.php:3002 includes/ot-functions-admin.php:3003
164
+ #: includes/ot-functions-admin.php:3061 includes/ot-functions-admin.php:3062
165
+ #: includes/ot-functions-admin.php:3130 includes/ot-functions-admin.php:3131
166
  msgid "Delete"
167
  msgstr ""
168
 
169
+ #: includes/ot-functions-admin.php:2752
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:2760
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:2807
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:2815 includes/ot-functions-admin.php:3017
188
  msgid ""
189
  "<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
190
  "allowed."
191
  msgstr ""
192
 
193
+ #: includes/ot-functions-admin.php:2823
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:2834
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:2842
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:2847
213
  msgid "Add Choice"
214
  msgstr ""
215
 
216
+ #: includes/ot-functions-admin.php:2853
217
  msgid ""
218
  "<strong>Settings</strong>: This will only affect the List Item option type."
219
  msgstr ""
220
 
221
+ #: includes/ot-functions-admin.php:2858
222
  #: includes/ot-functions-settings-page.php:93
223
  msgid "Add Setting"
224
  msgstr ""
225
 
226
+ #: includes/ot-functions-admin.php:2864
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:2872
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:2880
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:2888
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:2896
255
  msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
256
  msgstr ""
257
 
258
+ #: includes/ot-functions-admin.php:2943 includes/ot-functions-docs-page.php:29
259
  msgid "Label"
260
  msgstr ""
261
 
262
+ #: includes/ot-functions-admin.php:2953
263
  msgid "Value"
264
  msgstr ""
265
 
266
+ #: includes/ot-functions-admin.php:2963
267
  msgid "Image Source (Radio Image only)"
268
  msgstr ""
269
 
270
+ #: includes/ot-functions-admin.php:3009
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:3025
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:3056
283
  msgid "Layout"
284
  msgstr ""
285
 
286
+ #: includes/ot-functions-admin.php:3058 includes/ot-functions-admin.php:3059
287
  msgid "Activate"
288
  msgstr ""
289
 
290
+ #: includes/ot-functions-admin.php:3095 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:3224
296
  msgid "New Layout"
297
  msgstr ""
298
 
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
 
1562
  msgid "Save Layouts"
1563
  msgstr ""
1564
 
1565
+ #: includes/ot-settings-api.php:353
1566
  msgid "Reset Options"
1567
  msgstr ""
1568
 
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.12
7
  * Author: Derek Herman
8
  * Author URI: http://valendesigns.com
9
  * License: GPLv2
@@ -60,7 +60,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
60
  /**
61
  * Current Version number.
62
  */
63
- define( 'OT_VERSION', '2.0.12' );
64
 
65
  /**
66
  * For developers: Allow Unfiltered HTML in all the textareas.
@@ -180,7 +180,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
180
 
181
  /* require the files */
182
  foreach ( $files as $file ) {
183
- require_once( OT_DIR . "includes/{$file}.php" );
184
  }
185
 
186
  }
@@ -205,7 +205,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
205
 
206
  /* require the files */
207
  foreach ( $files as $file ) {
208
- require_once( OT_DIR . "includes/{$file}.php" );
209
  }
210
 
211
  }
@@ -280,7 +280,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
280
  add_action( 'wp_ajax_add_setting', array( &$this, 'add_setting' ) );
281
 
282
  /* AJAX call to create a new contextual help */
283
- add_action( 'wp_ajax_add_contextual_help', array( &$this, 'add_contextual_help' ) );
284
 
285
  /* AJAX call to create a new choice */
286
  add_action( 'wp_ajax_add_choice', array( &$this, 'add_choice' ) );
@@ -350,7 +350,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
350
  /**
351
  * AJAX utility function for adding new contextual help content.
352
  */
353
- public function add_contextual_help() {
354
  echo ot_contextual_help_view( $_REQUEST['name'], $_REQUEST['count'] );
355
  die();
356
  }
@@ -375,7 +375,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
375
  * AJAX utility function for adding a new list item.
376
  */
377
  public function add_list_item() {
378
- ot_list_item_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], unserialize( base64_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] );
379
  die();
380
  }
381
 
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.13
7
  * Author: Derek Herman
8
  * Author URI: http://valendesigns.com
9
  * License: GPLv2
60
  /**
61
  * Current Version number.
62
  */
63
+ define( 'OT_VERSION', '2.0.13' );
64
 
65
  /**
66
  * For developers: Allow Unfiltered HTML in all the textareas.
180
 
181
  /* require the files */
182
  foreach ( $files as $file ) {
183
+ load_template( OT_DIR . "includes/{$file}.php" );
184
  }
185
 
186
  }
205
 
206
  /* require the files */
207
  foreach ( $files as $file ) {
208
+ load_template( OT_DIR . "includes/{$file}.php" );
209
  }
210
 
211
  }
280
  add_action( 'wp_ajax_add_setting', array( &$this, 'add_setting' ) );
281
 
282
  /* AJAX call to create a new contextual help */
283
+ add_action( 'wp_ajax_add_the_contextual_help', array( &$this, 'add_the_contextual_help' ) );
284
 
285
  /* AJAX call to create a new choice */
286
  add_action( 'wp_ajax_add_choice', array( &$this, 'add_choice' ) );
350
  /**
351
  * AJAX utility function for adding new contextual help content.
352
  */
353
+ public function add_the_contextual_help() {
354
  echo ot_contextual_help_view( $_REQUEST['name'], $_REQUEST['count'] );
355
  die();
356
  }
375
  * AJAX utility function for adding a new list item.
376
  */
377
  public function add_list_item() {
378
+ ot_list_item_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] );
379
  die();
380
  }
381
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: valendesigns
3
  Donate link: http://bit.ly/NuXI3T
4
  Tags: admin, theme options, meta boxes, options, admin interface, ajax
5
- Requires at least: 3.3
6
- Tested up to: 3.5
7
- Stable tag: 2.0.12
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,10 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
41
 
42
  == Changelog ==
43
 
 
 
 
 
44
  = 2.0.12 =
45
  * Added additional filters to the array that builds the Theme Option UI.
46
  * Made option-tree post type private.
2
  Contributors: valendesigns
3
  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.13
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.13 =
45
+ * Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'.
46
+ * Fix an issue where Media Upload stopped working on some servers.
47
+
48
  = 2.0.12 =
49
  * Added additional filters to the array that builds the Theme Option UI.
50
  * Made option-tree post type private.