OptionTree - Version 2.0.6

Version Description

  • Run the 'option_tree' array through validation when importing data and layouts.
  • Fix a bug where list items and sliders were not allowing the user to select the input field.
  • Add a filter that allows you to not load resources for meta boxes if you're not going to use them.
  • Update option-tree.pot file.
Download this release

Release Info

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

Code changes from version 2.0.5 to 2.0.6

assets/js/ot-admin.js CHANGED
@@ -59,7 +59,7 @@
59
  if ( $(this).children('li').length ) {
60
  var elm = $(this);
61
  elm.show();
62
- $(this).sortable({
63
  items: 'li:not(.ui-state-disabled)',
64
  placeholder: 'ui-state-highlight',
65
  stop: function(evt, ui) {
@@ -71,7 +71,10 @@
71
  )
72
  }
73
  });
74
- $(this).children('li').disableSelection();
 
 
 
75
  }
76
  });
77
  },
59
  if ( $(this).children('li').length ) {
60
  var elm = $(this);
61
  elm.show();
62
+ elm.sortable({
63
  items: 'li:not(.ui-state-disabled)',
64
  placeholder: 'ui-state-highlight',
65
  stop: function(evt, ui) {
71
  )
72
  }
73
  });
74
+ elm.children('li').disableSelection();
75
+ elm.find('.option-tree-setting-body').bind('mousedown.ui-disableSelection selectstart.ui-disableSelection', function(e) {
76
+ e.stopImmediatePropagation();
77
+ });
78
  }
79
  });
80
  },
includes/ot-functions-admin.php CHANGED
@@ -662,17 +662,41 @@ if ( ! function_exists( 'ot_import' ) ) {
662
 
663
  /* check and verify import theme options data nonce */
664
  if ( isset( $_POST['import_data_nonce'] ) && wp_verify_nonce( $_POST['import_data_nonce'], 'import_data_form' ) ) {
665
-
666
- /* textarea value */
667
- $textarea = isset( $_POST['import_data'] ) ? unserialize( base64_decode( $_POST['import_data'] ) ) : '';
668
 
669
  /* default message */
670
  $message = 'failed';
671
 
672
- /* is array: save & show success message */
673
- if ( is_array( $textarea ) ) {
674
- update_option( 'option_tree', $textarea );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
675
  $message = 'success';
 
676
  }
677
 
678
  /* redirect accordingly */
@@ -683,22 +707,61 @@ if ( ! function_exists( 'ot_import' ) ) {
683
 
684
  /* check and verify import layouts nonce */
685
  if ( isset( $_POST['import_layouts_nonce'] ) && wp_verify_nonce( $_POST['import_layouts_nonce'], 'import_layouts_form' ) ) {
686
-
687
- /* textarea value */
688
- $textarea = isset( $_POST['import_layouts'] ) ? unserialize( base64_decode( $_POST['import_layouts'] ) ) : '';
689
 
690
  /* default message */
691
  $message = 'failed';
692
 
693
- /* is array: save & show success message */
694
- if ( is_array( $textarea ) ) {
695
- if ( isset( $textarea['active_layout'] ) ) {
696
- update_option( 'option_tree', unserialize( base64_decode( $textarea[$textarea['active_layout']] ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
697
  }
698
- update_option( 'option_tree_layouts', $textarea );
 
 
 
699
  $message = 'success';
 
700
  }
701
-
702
  /* redirect accordingly */
703
  wp_redirect( add_query_arg( array( 'action' => 'import-layouts', 'message' => $message ), $_POST['_wp_http_referer'] ) );
704
  exit;
662
 
663
  /* check and verify import theme options data nonce */
664
  if ( isset( $_POST['import_data_nonce'] ) && wp_verify_nonce( $_POST['import_data_nonce'], 'import_data_form' ) ) {
 
 
 
665
 
666
  /* default message */
667
  $message = 'failed';
668
 
669
+ /* textarea value */
670
+ $options = isset( $_POST['import_data'] ) ? unserialize( base64_decode( $_POST['import_data'] ) ) : '';
671
+
672
+ /* get settings array */
673
+ $settings = get_option( 'option_tree_settings' );
674
+
675
+ /* has options */
676
+ if ( is_array( $options ) ) {
677
+
678
+ /* validate options */
679
+ if ( is_array( $settings ) ) {
680
+
681
+ foreach( $settings['settings'] as $setting ) {
682
+
683
+ if ( isset( $options[$setting['id']] ) ) {
684
+
685
+ $content = ot_stripslashes( $options[$setting['id']] );
686
+
687
+ $options[$setting['id']] = ot_validate_setting( $content, $setting['type'] );
688
+
689
+ }
690
+
691
+ }
692
+
693
+ }
694
+
695
+ /* update the option tree array */
696
+ update_option( 'option_tree', $options );
697
+
698
  $message = 'success';
699
+
700
  }
701
 
702
  /* redirect accordingly */
707
 
708
  /* check and verify import layouts nonce */
709
  if ( isset( $_POST['import_layouts_nonce'] ) && wp_verify_nonce( $_POST['import_layouts_nonce'], 'import_layouts_form' ) ) {
 
 
 
710
 
711
  /* default message */
712
  $message = 'failed';
713
 
714
+ /* textarea value */
715
+ $layouts = isset( $_POST['import_layouts'] ) ? unserialize( base64_decode( $_POST['import_layouts'] ) ) : '';
716
+
717
+ /* get settings array */
718
+ $settings = get_option( 'option_tree_settings' );
719
+
720
+ /* has layouts */
721
+ if ( is_array( $layouts ) ) {
722
+
723
+ /* validate options */
724
+ if ( is_array( $settings ) ) {
725
+
726
+ foreach( $layouts as $key => $value ) {
727
+
728
+ if ( $key == 'active_layout' )
729
+ continue;
730
+
731
+ $options = unserialize( base64_decode( $value ) );
732
+
733
+ foreach( $settings['settings'] as $setting ) {
734
+
735
+ if ( isset( $options[$setting['id']] ) ) {
736
+
737
+ $content = ot_stripslashes( $options[$setting['id']] );
738
+
739
+ $options[$setting['id']] = ot_validate_setting( $content, $setting['type'] );
740
+
741
+ }
742
+
743
+ }
744
+
745
+ $layouts[$key] = base64_encode( serialize( $options ) );
746
+
747
+ }
748
+
749
+ }
750
+
751
+ /* update the option tree array */
752
+ if ( isset( $layouts['active_layout'] ) ) {
753
+
754
+ update_option( 'option_tree', unserialize( base64_decode( $layouts[$layouts['active_layout']] ) ) );
755
+
756
  }
757
+
758
+ /* update the option tree layouts array */
759
+ update_option( 'option_tree_layouts', $layouts );
760
+
761
  $message = 'success';
762
+
763
  }
764
+
765
  /* redirect accordingly */
766
  wp_redirect( add_query_arg( array( 'action' => 'import-layouts', 'message' => $message ), $_POST['_wp_http_referer'] ) );
767
  exit;
languages/option-tree.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
7
- "POT-Creation-Date: 2012-07-18 19:57:35+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -46,256 +46,253 @@ msgstr ""
46
  msgid "Sorry, you can't have settings three levels deep."
47
  msgstr ""
48
 
49
- #: includes/ot-functions-admin.php:207
50
  msgid "Option Tree"
51
  msgstr ""
52
 
53
- #: includes/ot-functions-admin.php:341
54
  msgid "General"
55
  msgstr ""
56
 
57
- #: includes/ot-functions-admin.php:347
58
  msgid "Sample Text Field Label"
59
  msgstr ""
60
 
61
- #: includes/ot-functions-admin.php:348
62
  msgid "Description for the sample text field."
63
  msgstr ""
64
 
65
- #: includes/ot-functions-admin.php:1067
66
  msgid "Layout activated."
67
  msgstr ""
68
 
69
- #: includes/ot-functions-admin.php:1080
70
  msgid "Settings updated."
71
  msgstr ""
72
 
73
- #: includes/ot-functions-admin.php:1084
74
  msgid "Settings could not be saved."
75
  msgstr ""
76
 
77
- #: includes/ot-functions-admin.php:1092
78
  msgid "Settings Imported."
79
  msgstr ""
80
 
81
- #: includes/ot-functions-admin.php:1096
82
  msgid "Settings could not be imported."
83
  msgstr ""
84
 
85
- #: includes/ot-functions-admin.php:1103
86
  msgid "Data Imported."
87
  msgstr ""
88
 
89
- #: includes/ot-functions-admin.php:1107
90
  msgid "Data could not be imported."
91
  msgstr ""
92
 
93
- #: includes/ot-functions-admin.php:1115
94
  msgid "Layouts Imported."
95
  msgstr ""
96
 
97
- #: includes/ot-functions-admin.php:1119
98
  msgid "Layouts could not be imported."
99
  msgstr ""
100
 
101
- #: includes/ot-functions-admin.php:1127
102
  msgid "Layouts Updated."
103
  msgstr ""
104
 
105
- #: includes/ot-functions-admin.php:1131
106
  msgid "Layouts could not be updated."
107
  msgstr ""
108
 
109
- #: includes/ot-functions-admin.php:1520
110
  msgid "Left Sidebar"
111
  msgstr ""
112
 
113
- #: includes/ot-functions-admin.php:1525
114
  msgid "Right Sidebar"
115
  msgstr ""
116
 
117
- #: includes/ot-functions-admin.php:1530
118
  msgid "Full Width (no sidebar)"
119
  msgstr ""
120
 
121
- #: includes/ot-functions-admin.php:1535
122
  msgid "Dual Sidebar"
123
  msgstr ""
124
 
125
- #: includes/ot-functions-admin.php:1540
126
  msgid "Left Dual Sidebar"
127
  msgstr ""
128
 
129
- #: includes/ot-functions-admin.php:1545
130
  msgid "Right Dual Sidebar"
131
  msgstr ""
132
 
133
- #: includes/ot-functions-admin.php:1575 includes/ot-functions-admin.php:1636
134
  msgid "Image"
135
  msgstr ""
136
 
137
- #: includes/ot-functions-admin.php:1586 includes/ot-functions-admin.php:1642
138
  msgid "Link"
139
  msgstr ""
140
 
141
- #: includes/ot-functions-admin.php:1597
142
- msgid "Caption"
143
- msgstr ""
144
-
145
- #: includes/ot-functions-admin.php:1648 includes/ot-functions-docs-page.php:43
146
  #: includes/ot-functions-docs-page.php:367
147
  #: includes/ot-functions-docs-page.php:417
148
  msgid "Description"
149
  msgstr ""
150
 
151
- #: includes/ot-functions-admin.php:2098
152
  msgid "edit"
153
  msgstr ""
154
 
155
- #: includes/ot-functions-admin.php:2099 includes/ot-functions-admin.php:2153
156
- #: includes/ot-functions-admin.php:2154 includes/ot-functions-admin.php:2289
157
- #: includes/ot-functions-admin.php:2290 includes/ot-functions-admin.php:2355
158
- #: includes/ot-functions-admin.php:2356 includes/ot-functions-admin.php:2483
159
- #: includes/ot-functions-admin.php:2484
160
  msgid "Edit"
161
  msgstr ""
162
 
163
- #: includes/ot-functions-admin.php:2101 includes/ot-functions-admin.php:2102
164
- #: includes/ot-functions-admin.php:2156 includes/ot-functions-admin.php:2157
165
- #: includes/ot-functions-admin.php:2292 includes/ot-functions-admin.php:2293
166
- #: includes/ot-functions-admin.php:2358 includes/ot-functions-admin.php:2359
167
- #: includes/ot-functions-admin.php:2417 includes/ot-functions-admin.php:2418
168
- #: includes/ot-functions-admin.php:2486 includes/ot-functions-admin.php:2487
169
  msgid "Delete"
170
  msgstr ""
171
 
172
- #: includes/ot-functions-admin.php:2108
173
  msgid ""
174
  "<strong>Section Title</strong>: Displayed as a menu item on the Theme "
175
  "Options page."
176
  msgstr ""
177
 
178
- #: includes/ot-functions-admin.php:2116
179
  msgid ""
180
  "<strong>Section ID</strong>: A unique lower case alphanumeric string, "
181
  "underscores allowed."
182
  msgstr ""
183
 
184
- #: includes/ot-functions-admin.php:2163
185
  msgid ""
186
  "<strong>Label</strong>: Displayed as the label of a form element on the "
187
  "Theme Options page."
188
  msgstr ""
189
 
190
- #: includes/ot-functions-admin.php:2171 includes/ot-functions-admin.php:2373
191
  msgid ""
192
  "<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
193
  "allowed."
194
  msgstr ""
195
 
196
- #: includes/ot-functions-admin.php:2179
197
  msgid ""
198
  "<strong>Type</strong>: Choose one of the available option types from the "
199
  "dropdown."
200
  msgstr ""
201
 
202
- #: includes/ot-functions-admin.php:2190
203
  msgid ""
204
  "<strong>Description</strong>: Enter a detailed description for the users to "
205
  "read on the Theme Options page, HTML is allowed. This is also where you "
206
  "enter content for both the Textblock & Textblock Titled option types."
207
  msgstr ""
208
 
209
- #: includes/ot-functions-admin.php:2198
210
  msgid ""
211
  "<strong>Choices</strong>: This will only affect the following option types: "
212
  "Checkbox, Radio, Select & Select Image."
213
  msgstr ""
214
 
215
- #: includes/ot-functions-admin.php:2203
216
  msgid "Add Choice"
217
  msgstr ""
218
 
219
- #: includes/ot-functions-admin.php:2209
220
  msgid ""
221
  "<strong>Settings</strong>: This will only affect the List Item option type."
222
  msgstr ""
223
 
224
- #: includes/ot-functions-admin.php:2214
225
  #: includes/ot-functions-settings-page.php:93
226
  msgid "Add Setting"
227
  msgstr ""
228
 
229
- #: includes/ot-functions-admin.php:2220
230
  msgid ""
231
  "<strong>Standard</strong>: Setting the standard value for your option only "
232
  "works for some option types. Read the <code>OptionTree->Documentation</code> "
233
  "for more information on which ones."
234
  msgstr ""
235
 
236
- #: includes/ot-functions-admin.php:2228
237
  msgid ""
238
  "<strong>Rows</strong>: Enter a numeric value for the number of rows in your "
239
  "textarea. This will only affect the following option types: CSS, Textarea, & "
240
  "Textarea Simple."
241
  msgstr ""
242
 
243
- #: includes/ot-functions-admin.php:2236
244
  msgid ""
245
  "<strong>Post Type</strong>: Add a comma separated list of post type like "
246
  "'post,page'. This will only affect the following option types: Custom Post "
247
  "Type Checkbox, & Custom Post Type Select."
248
  msgstr ""
249
 
250
- #: includes/ot-functions-admin.php:2244
251
  msgid ""
252
  "<strong>Taxonomy</strong>: Add a comma separated list of any registered "
253
  "taxonomy like 'category,post_tag'. This will only affect the following "
254
  "option types: Taxonomy Checkbox, & Taxonomy Select."
255
  msgstr ""
256
 
257
- #: includes/ot-functions-admin.php:2252
258
  msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
259
  msgstr ""
260
 
261
- #: includes/ot-functions-admin.php:2299 includes/ot-functions-docs-page.php:29
262
  msgid "Label"
263
  msgstr ""
264
 
265
- #: includes/ot-functions-admin.php:2309
266
  msgid "Value"
267
  msgstr ""
268
 
269
- #: includes/ot-functions-admin.php:2319
270
  msgid "Image Source (Radio Image only)"
271
  msgstr ""
272
 
273
- #: includes/ot-functions-admin.php:2365
274
  msgid ""
275
  "<strong>Title</strong>: Displayed as a contextual help menu item on the "
276
  "Theme Options page."
277
  msgstr ""
278
 
279
- #: includes/ot-functions-admin.php:2381
280
  msgid ""
281
  "<strong>Content</strong>: Enter the HTML content about this contextual help "
282
  "item displayed on the Theme Option page for end users to read."
283
  msgstr ""
284
 
285
- #: includes/ot-functions-admin.php:2412
286
  msgid "Layout"
287
  msgstr ""
288
 
289
- #: includes/ot-functions-admin.php:2414 includes/ot-functions-admin.php:2415
290
  msgid "Activate"
291
  msgstr ""
292
 
293
- #: includes/ot-functions-admin.php:2451 includes/ot-meta-box-api.php:177
294
  #: includes/ot-settings-api.php:572
295
  msgid "Title"
296
  msgstr ""
297
 
298
- #: includes/ot-functions-admin.php:2577
299
  msgid "New Layout"
300
  msgstr ""
301
 
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n"
7
+ "POT-Creation-Date: 2012-07-20 09:46:42+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
46
  msgid "Sorry, you can't have settings three levels deep."
47
  msgstr ""
48
 
49
+ #: includes/ot-functions-admin.php:212
50
  msgid "Option Tree"
51
  msgstr ""
52
 
53
+ #: includes/ot-functions-admin.php:348
54
  msgid "General"
55
  msgstr ""
56
 
57
+ #: includes/ot-functions-admin.php:354
58
  msgid "Sample Text Field Label"
59
  msgstr ""
60
 
61
+ #: includes/ot-functions-admin.php:355
62
  msgid "Description for the sample text field."
63
  msgstr ""
64
 
65
+ #: includes/ot-functions-admin.php:1106
66
  msgid "Layout activated."
67
  msgstr ""
68
 
69
+ #: includes/ot-functions-admin.php:1119
70
  msgid "Settings updated."
71
  msgstr ""
72
 
73
+ #: includes/ot-functions-admin.php:1123
74
  msgid "Settings could not be saved."
75
  msgstr ""
76
 
77
+ #: includes/ot-functions-admin.php:1131
78
  msgid "Settings Imported."
79
  msgstr ""
80
 
81
+ #: includes/ot-functions-admin.php:1135
82
  msgid "Settings could not be imported."
83
  msgstr ""
84
 
85
+ #: includes/ot-functions-admin.php:1142
86
  msgid "Data Imported."
87
  msgstr ""
88
 
89
+ #: includes/ot-functions-admin.php:1146
90
  msgid "Data could not be imported."
91
  msgstr ""
92
 
93
+ #: includes/ot-functions-admin.php:1154
94
  msgid "Layouts Imported."
95
  msgstr ""
96
 
97
+ #: includes/ot-functions-admin.php:1158
98
  msgid "Layouts could not be imported."
99
  msgstr ""
100
 
101
+ #: includes/ot-functions-admin.php:1166
102
  msgid "Layouts Updated."
103
  msgstr ""
104
 
105
+ #: includes/ot-functions-admin.php:1170
106
  msgid "Layouts could not be updated."
107
  msgstr ""
108
 
109
+ #: includes/ot-functions-admin.php:1559
110
  msgid "Left Sidebar"
111
  msgstr ""
112
 
113
+ #: includes/ot-functions-admin.php:1564
114
  msgid "Right Sidebar"
115
  msgstr ""
116
 
117
+ #: includes/ot-functions-admin.php:1569
118
  msgid "Full Width (no sidebar)"
119
  msgstr ""
120
 
121
+ #: includes/ot-functions-admin.php:1574
122
  msgid "Dual Sidebar"
123
  msgstr ""
124
 
125
+ #: includes/ot-functions-admin.php:1579
126
  msgid "Left Dual Sidebar"
127
  msgstr ""
128
 
129
+ #: includes/ot-functions-admin.php:1584
130
  msgid "Right Dual Sidebar"
131
  msgstr ""
132
 
133
+ #: includes/ot-functions-admin.php:1614 includes/ot-functions-admin.php:1675
134
  msgid "Image"
135
  msgstr ""
136
 
137
+ #: includes/ot-functions-admin.php:1625 includes/ot-functions-admin.php:1681
138
  msgid "Link"
139
  msgstr ""
140
 
141
+ #: includes/ot-functions-admin.php:1636 includes/ot-functions-admin.php:1687
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:2144
149
  msgid "edit"
150
  msgstr ""
151
 
152
+ #: includes/ot-functions-admin.php:2145 includes/ot-functions-admin.php:2199
153
+ #: includes/ot-functions-admin.php:2200 includes/ot-functions-admin.php:2335
154
+ #: includes/ot-functions-admin.php:2336 includes/ot-functions-admin.php:2401
155
+ #: includes/ot-functions-admin.php:2402 includes/ot-functions-admin.php:2529
156
+ #: includes/ot-functions-admin.php:2530
157
  msgid "Edit"
158
  msgstr ""
159
 
160
+ #: includes/ot-functions-admin.php:2147 includes/ot-functions-admin.php:2148
161
+ #: includes/ot-functions-admin.php:2202 includes/ot-functions-admin.php:2203
162
+ #: includes/ot-functions-admin.php:2338 includes/ot-functions-admin.php:2339
163
+ #: includes/ot-functions-admin.php:2404 includes/ot-functions-admin.php:2405
164
+ #: includes/ot-functions-admin.php:2463 includes/ot-functions-admin.php:2464
165
+ #: includes/ot-functions-admin.php:2532 includes/ot-functions-admin.php:2533
166
  msgid "Delete"
167
  msgstr ""
168
 
169
+ #: includes/ot-functions-admin.php:2154
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:2162
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:2209
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:2217 includes/ot-functions-admin.php:2419
188
  msgid ""
189
  "<strong>ID</strong>: A unique lower case alphanumeric string, underscores "
190
  "allowed."
191
  msgstr ""
192
 
193
+ #: includes/ot-functions-admin.php:2225
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:2236
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:2244
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:2249
213
  msgid "Add Choice"
214
  msgstr ""
215
 
216
+ #: includes/ot-functions-admin.php:2255
217
  msgid ""
218
  "<strong>Settings</strong>: This will only affect the List Item option type."
219
  msgstr ""
220
 
221
+ #: includes/ot-functions-admin.php:2260
222
  #: includes/ot-functions-settings-page.php:93
223
  msgid "Add Setting"
224
  msgstr ""
225
 
226
+ #: includes/ot-functions-admin.php:2266
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:2274
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:2282
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:2290
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:2298
255
  msgid "<strong>CSS Class</strong>: Add and optional class to this option type."
256
  msgstr ""
257
 
258
+ #: includes/ot-functions-admin.php:2345 includes/ot-functions-docs-page.php:29
259
  msgid "Label"
260
  msgstr ""
261
 
262
+ #: includes/ot-functions-admin.php:2355
263
  msgid "Value"
264
  msgstr ""
265
 
266
+ #: includes/ot-functions-admin.php:2365
267
  msgid "Image Source (Radio Image only)"
268
  msgstr ""
269
 
270
+ #: includes/ot-functions-admin.php:2411
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:2427
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:2458
283
  msgid "Layout"
284
  msgstr ""
285
 
286
+ #: includes/ot-functions-admin.php:2460 includes/ot-functions-admin.php:2461
287
  msgid "Activate"
288
  msgstr ""
289
 
290
+ #: includes/ot-functions-admin.php:2497 includes/ot-meta-box-api.php:177
291
  #: includes/ot-settings-api.php:572
292
  msgid "Title"
293
  msgstr ""
294
 
295
+ #: includes/ot-functions-admin.php:2623
296
  msgid "New Layout"
297
  msgstr ""
298
 
ot-loader.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: OptionTree
4
  * Plugin URI: http://wp.envato.com
5
  * Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
6
- * Version: 2.0.5
7
  * Author: Derek Herman
8
  * Author URI: http://valendesigns.com
9
  * License: GPLv2
@@ -63,7 +63,7 @@ if ( ! class_exists( 'OT_Loader' ) ) {
63
  /**
64
  * Current Version number.
65
  */
66
- define( 'OT_VERSION', '2.0.5' );
67
 
68
  /**
69
  * For developers: Allow Unfiltered HTML in all the textareas.
@@ -99,6 +99,16 @@ if ( ! class_exists( 'OT_Loader' ) ) {
99
  */
100
  define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) );
101
 
 
 
 
 
 
 
 
 
 
 
102
  /**
103
  * Check if in theme mode.
104
  *
@@ -157,10 +167,14 @@ if ( ! class_exists( 'OT_Loader' ) ) {
157
  'ot-functions-option-types',
158
  'ot-functions-compat',
159
  'ot-settings-api',
160
- 'ot-meta-box-api',
161
  'ot-ui-theme-options'
162
  );
163
 
 
 
 
 
 
164
  /* include the settings & docs pages */
165
  if ( OT_SHOW_PAGES == true ) {
166
  $files[] = 'ot-functions-settings-page';
@@ -210,13 +224,17 @@ if ( ! class_exists( 'OT_Loader' ) ) {
210
  */
211
  public function hooks() {
212
 
213
- /* add scripts for metaboxes to post-new.php & post.php */
214
- add_action( 'admin_print_scripts-post-new.php', 'ot_admin_scripts', 11 );
215
- add_action( 'admin_print_scripts-post.php', 'ot_admin_scripts', 11 );
216
-
217
- /* add styles for metaboxes to post-new.php & post.php */
218
- add_action( 'admin_print_styles-post-new.php', 'ot_admin_styles', 11 );
219
- add_action( 'admin_print_styles-post.php', 'ot_admin_styles', 11 );
 
 
 
 
220
 
221
  /* prepares the after save do_action */
222
  add_action( 'admin_init', 'ot_after_theme_options_save', 1 );
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.6
7
  * Author: Derek Herman
8
  * Author URI: http://valendesigns.com
9
  * License: GPLv2
63
  /**
64
  * Current Version number.
65
  */
66
+ define( 'OT_VERSION', '2.0.6' );
67
 
68
  /**
69
  * For developers: Allow Unfiltered HTML in all the textareas.
99
  */
100
  define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) );
101
 
102
+ /**
103
+ * For developers: Meta Boxes.
104
+ *
105
+ * Run a filter and set to false to keep OptionTree from
106
+ * loading the meta box resources.
107
+ *
108
+ * @since 2.0
109
+ */
110
+ define( 'OT_META_BOXES', apply_filters( 'ot_meta_boxes', true ) );
111
+
112
  /**
113
  * Check if in theme mode.
114
  *
167
  'ot-functions-option-types',
168
  'ot-functions-compat',
169
  'ot-settings-api',
 
170
  'ot-ui-theme-options'
171
  );
172
 
173
+ /* include the meta box api */
174
+ if ( OT_META_BOXES == true ) {
175
+ $files[] = 'ot-meta-box-api';
176
+ }
177
+
178
  /* include the settings & docs pages */
179
  if ( OT_SHOW_PAGES == true ) {
180
  $files[] = 'ot-functions-settings-page';
224
  */
225
  public function hooks() {
226
 
227
+ if ( OT_META_BOXES == true ) {
228
+
229
+ /* add scripts for metaboxes to post-new.php & post.php */
230
+ add_action( 'admin_print_scripts-post-new.php', 'ot_admin_scripts', 11 );
231
+ add_action( 'admin_print_scripts-post.php', 'ot_admin_scripts', 11 );
232
+
233
+ /* add styles for metaboxes to post-new.php & post.php */
234
+ add_action( 'admin_print_styles-post-new.php', 'ot_admin_styles', 11 );
235
+ add_action( 'admin_print_styles-post.php', 'ot_admin_styles', 11 );
236
+
237
+ }
238
 
239
  /* prepares the after save do_action */
240
  add_action( 'admin_init', 'ot_after_theme_options_save', 1 );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bit.ly/NuXI3T
4
  Tags: admin, theme options, meta boxes, options, admin interface, ajax
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
- Stable tag: 2.0.5
8
  License: GPLv2
9
 
10
  Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
@@ -41,6 +41,12 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
41
 
42
  == Changelog ==
43
 
 
 
 
 
 
 
44
  = 2.0.5 =
45
  * Change the way the 'option_tree_settings' array validates. Strip out those damn slashes!
46
 
@@ -154,7 +160,7 @@ Yes. OptionTree requires PHP5 to work correctly (so does WP 3.2+).
154
 
155
  == Upgrade Notice ==
156
 
157
- = 2.0.5 =
158
  The plugin has undertaken a complete rebuild! If you are not the theme developer, I urge you to contact that person before you upgrade and ask them to test the themes compatibility.
159
 
160
  = 1.1.8.1 =
4
  Tags: admin, theme options, meta boxes, options, admin interface, ajax
5
  Requires at least: 3.3
6
  Tested up to: 3.5
7
+ Stable tag: 2.0.6
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.6 =
45
+ * Run the 'option_tree' array through validation when importing data and layouts.
46
+ * Fix a bug where list items and sliders were not allowing the user to select the input field.
47
+ * Add a filter that allows you to not load resources for meta boxes if you're not going to use them.
48
+ * Update option-tree.pot file.
49
+
50
  = 2.0.5 =
51
  * Change the way the 'option_tree_settings' array validates. Strip out those damn slashes!
52
 
160
 
161
  == Upgrade Notice ==
162
 
163
+ = 2.0.6 =
164
  The plugin has undertaken a complete rebuild! If you are not the theme developer, I urge you to contact that person before you upgrade and ask them to test the themes compatibility.
165
 
166
  = 1.1.8.1 =
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file