PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / 2.1.6
پارسی دیت – Parsi Date v2.1.6
6.1 5.1.6 5.1.7 5.1.8 5.1.8.2 6.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.0.0-alpha 2.1 2.1.1 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0.1 2.3.0.2 2.3.1 2.3.2 2.3.3 2.3.4 3.0.1 3.0.2 3.0.3 4.0.0 4.0.1 4.0.2 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5
wp-parsidate / includes / settings.php
wp-parsidate / includes Last commit date
admin 10 years ago plugins 11 years ago widget 10 years ago fixes-archive.php 11 years ago fixes-dates.php 11 years ago fixes-get_archives.php 11 years ago fixes-get_calendar.php 11 years ago fixes-misc.php 11 years ago fixes-permalinks.php 11 years ago general.php 10 years ago install.php 11 years ago parsidate.php 11 years ago settings.php 10 years ago
settings.php
606 lines
1 <?php
2 /**
3 * Adds settings part to plugin
4 * Originally, wrote by Pippin Williamson
5 *
6 * @author Pippin Williamson
7 * @author Ehsaan
8 * @package WP-Parsidate
9 * @subpackage Admin/Settings
10 */
11 if ( ! defined( 'ABSPATH' ) ) exit; // No direct access allowed ;)
12
13 add_action( 'admin_menu', 'wpp_add_settings_menu', 11 );
14
15 /**
16 * Add WP-Parsidate admin page settings
17 * */
18 function wpp_add_settings_menu() {
19 global $wpp_settings;
20
21 if ( $wpp_settings[ 'submenu_move' ] != 'disable' ) {
22 add_submenu_page(
23 'options-general.php',
24 __( 'Parsi Settings', 'wp-parsidate' ),
25 __( 'Parsi Settings', 'wp-parsidate' ),
26 'manage_options',
27 'wp-parsi-settings',
28 'wpp_render_settings'
29 );
30 } else {
31 add_menu_page(
32 __('Parsi Settings','wp-parsidate') ,
33 __('Parsi Settings','wp-parsidate') ,
34 'manage_options',
35 'wp-parsi-settings',
36 'wpp_render_settings',
37 'dashicons-admin-site'
38 );
39 }
40 }
41
42 /**
43 * Gets saved settings from WP core
44 *
45 * @since 2.0
46 * @return array Parsi Settings
47 */
48 function wp_parsi_get_settings() {
49 $settings = get_option( 'wpp_settings' );
50 if ( empty( $settings ) ) {
51 update_option( 'wpp_settings', array(
52 'admin_lang' => 'enable',
53 'user_lang' => 'enable',
54 'submenu_move' => 'disable',
55 'persian_date' => 'disable',
56 'droidsans_editor' => 'enable',
57 'droidsans_admin' => 'enable',
58 'conv_title' => 'disable',
59 'conv_contents' => 'disable',
60 'conv_excerpt' => 'disable',
61 'conv_comments' => 'disable',
62 'conv_comment_count'=> 'disable',
63 'conv_dates' => 'disable',
64 'conv_cats' => 'disable',
65 'conv_arabic' => 'disable',
66 'conv_permalinks' => 'disable',
67 'news_source' => 'parsi'
68 ) );
69 }
70
71 return apply_filters( 'wpp_get_settings', $settings );
72 }
73
74 /**
75 * Registers settings in WP core
76 *
77 * @since 2.0
78 * @return void
79 */
80 function wpp_register_settings() {
81 if ( false == get_option( 'wpp_settings' ) )
82 add_option( 'wpp_settings' );
83
84 foreach( wpp_get_registered_settings() as $tab => $settings ) {
85 add_settings_section(
86 'wpp_settings_' . $tab,
87 __return_null(),
88 '__return_false',
89 'wpp_settings_' . $tab
90 );
91
92 foreach( $settings as $option ) {
93 $name = isset( $option['name'] ) ? $option['name'] : '';
94
95 add_settings_field(
96 'wpp_settings[' . $option['id'] . ']',
97 $name,
98 function_exists( 'wpp_' . $option['type'] . '_callback' ) ? 'wpp_' . $option['type'] . '_callback' : 'wpp_missing_callback',
99 'wpp_settings_' . $tab,
100 'wpp_settings_' . $tab,
101 array(
102 'id' => isset( $option['id'] ) ? $option['id'] : null,
103 'desc' => ! empty( $option['desc'] ) ? $option['desc'] : '',
104 'name' => isset( $option['name'] ) ? $option['name'] : null,
105 'section' => $tab,
106 'size' => isset( $option['size'] ) ? $option['size'] : null,
107 'options' => isset( $option['options'] ) ? $option['options'] : '',
108 'std' => isset( $option['std'] ) ? $option['std'] : ''
109 )
110 );
111
112 register_setting( 'wpp_settings', 'wpp_settings', 'wpp_settings_sanitize' );
113 }
114 }
115 }
116 add_action( 'admin_init', 'wpp_register_settings' );
117
118 /**
119 * Gets settings tabs
120 *
121 * @since 2.0
122 * @return array Tabs list
123 */
124 function wpp_get_tabs() {
125 $tabs = array(
126 'core' => sprintf( __( '%s Core', 'wp-parsidate' ), '<span class="dashicons dashicons-admin-site"></span>' ),
127 'conv' => sprintf( __( '%s Converts', 'wp-parsidate' ), '<span class="dashicons dashicons-admin-settings"></span>' ),
128 'plugins' => sprintf( __( '%s Plugins compability', 'wp-parsidate' ), '<span class="dashicons dashicons-admin-plugins"></span>' )
129 );
130 return $tabs;
131 }
132
133 /**
134 * Sanitizes and saves settings after submit
135 *
136 * @since 2.0
137 * @param array $input Settings input
138 * @return array New settings
139 */
140 function wpp_settings_sanitize( $input = array() ) {
141
142 global $wpp_settings;
143
144 if( empty( $_POST['_wp_http_referer'] ) )
145 return $input;
146
147 parse_str( $_POST['_wp_http_referer'], $referrer );
148
149 $settings = wpp_get_registered_settings();
150 $tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'core';
151
152 $input = $input ? $input : array();
153 $input = apply_filters( 'wpp_settings_' . $tab . '_sanitize', $input );
154
155 // Loop through each setting being saved and pass it through a sanitization filter
156 foreach( $input as $key => $value ) {
157
158 // Get the setting type (checkbox, select, etc)
159 $type = isset( $settings[ $tab ][ $key ][ 'type' ] ) ? $settings[ $tab ][ $key ][ 'type' ] : false;
160
161 if( $type ) {
162 // Field type specific filter
163 $input[ $key ] = apply_filters( 'wpp_settings_sanitize_' . $type, $value, $key );
164 }
165
166 // General filter
167 $input[ $key ] = apply_filters( 'wpp_settings_sanitize', $value, $key );
168 }
169
170
171 // Loop through the whitelist and unset any that are empty for the tab being saved
172 if( ! empty( $settings[ $tab ] ) ) {
173 foreach( $settings[ $tab ] as $key => $value ) {
174
175 // settings used to have numeric keys, now they have keys that match the option ID. This ensures both methods work
176 if( is_numeric( $key ) ) {
177 $key = $value['id'];
178 }
179
180 if( empty( $input[ $key ] ) ) {
181 unset( $wpp_settings[ $key ] );
182 }
183
184 }
185 }
186
187 // Merge our new settings with the existing
188 $output = array_merge( $wpp_settings, $input );
189
190 add_settings_error( 'wpp-notices', '', __( 'Settings updated', 'wp-parsidate' ), 'updated' );
191
192 return $output;
193
194 }
195
196 /**
197 * Get settings fields
198 *
199 * @since 2.0
200 * @return array Fields
201 */
202 function wpp_get_registered_settings() {
203 $options = array(
204 'enable' => __( 'Enable', 'wp-parsidate' ),
205 'disable' => __( 'Disable', 'wp-parsidate' )
206 );
207 $settings = apply_filters( 'wpp_registered_settings', array(
208 'core' => apply_filters( 'wpp_core_settings', array(
209 'admin_lang' => array(
210 'id' => 'admin_lang',
211 'name' => __( 'Change Locale in admin', 'wp-parsidate' ),
212 'type' => 'radio',
213 'options' => $options,
214 'std' => 'enable',
215 'desc' => __( 'This option change WordPress locale in Admin', 'wp-parsidate' )
216 ),
217 'user_lang' => array(
218 'id' => 'user_lang',
219 'name' => __( 'Change Locale in theme', 'wp-parsidate' ),
220 'type' => 'radio',
221 'options' => $options,
222 'std' => 'enable',
223 'desc' => __( 'This option change WordPress locale in theme', 'wp-parsidate' )
224 ),
225 'persian_date' => array(
226 'id' => 'persian_date',
227 'name' => __( 'Shamsi date', 'wp-parsidate' ),
228 'type' => 'radio',
229 'options' => $options,
230 'std' => 'disable',
231 'desc' => __( 'By enabling this, Dates will convert to Shamsi (Jalali) dates', 'wp-parsidate' )
232 ),
233 'submenu_move' => array(
234 'id' => 'submenu_move',
235 'name' => __( 'Move page to submenu?', 'wp-parsidate' ),
236 'type' => 'radio',
237 'options' => $options,
238 'std' => 'disable',
239 'desc' => __( 'With enabling this option, page item will be moved to Settings menu as submenu.', 'wp-parsidate' )
240 ),
241 ) ),
242 'conv' => apply_filters( 'wpp_conv_settings', array(
243 'conv_nums' => array(
244 'id' => 'conv_nums',
245 'name' => __( 'Persian digits', 'wp-parsidate' ),
246 'type' => 'header'
247 ),
248 'conv_page_title' => array(
249 'id' => 'conv_page_title',
250 'name' => __( 'Page title', 'wp-parsidate' ),
251 'type' => 'radio',
252 'options' => $options,
253 'std' => 'disable'
254 ),
255 'conv_title' => array(
256 'id' => 'conv_title',
257 'name' => __( 'Post title', 'wp-parsidate' ),
258 'type' => 'radio',
259 'options' => $options,
260 'std' => 'disable'
261 ),
262 'conv_contents' => array(
263 'id' => 'conv_contents',
264 'name' => __( 'Post content', 'wp-parsidate' ),
265 'type' => 'radio',
266 'options' => $options,
267 'std' => 'enable'
268 ),
269 'conv_excerpt' => array(
270 'id' => 'conv_excerpt',
271 'name' => __( 'Post excerpt', 'wp-parsidate' ),
272 'type' => 'radio',
273 'options' => $options,
274 'std' => 'disable'
275 ),
276 'conv_comments' => array(
277 'id' => 'conv_comments',
278 'name' => __( 'Comments text', 'wp-parsidate' ),
279 'type' => 'radio',
280 'options' => $options,
281 'std' => 'disable'
282 ),
283 'conv_comment_count'=> array(
284 'id' => 'conv_comment_count',
285 'name' => __( 'Comments count', 'wp-parsidate' ),
286 'type' => 'radio',
287 'options' => $options,
288 'std' => 'disable'
289 ),
290 'conv_dates' => array(
291 'id' => 'conv_dates',
292 'name' => __( 'Dates', 'wp-parsidate' ),
293 'type' => 'radio',
294 'options' => $options,
295 'std' => 'disable'
296 ),
297 'conv_cats' => array(
298 'id' => 'conv_cats',
299 'name' => __( 'Categories', 'wp-parsidate' ),
300 'type' => 'radio',
301 'options' => $options,
302 'std' => 'disable'
303 ),
304 'sep' => array(
305 'id' => 'sep',
306 'type' => 'header'
307 ),
308 'conv_arabic' => array(
309 'id' => 'conv_arabic',
310 'name' => __( 'Fix arabic characters', 'wp-parsidate' ),
311 'type' => 'radio',
312 'options' => $options,
313 'std' => 'disable',
314 'desc' => __( 'Fixes arabic characters caused by wrong keyboard layouts', 'wp-parsidate' )
315 ),
316 'conv_permalinks' => array(
317 'id' => 'conv_permalinks',
318 'name' => __( 'Fix permalinks dates', 'wp-parsidate' ),
319 'type' => 'radio',
320 'options' => $options,
321 'std' => 'disable',
322 'desc' => __( 'By enabling this, dates in permalinks converted to Shamsi (Jalali) date', 'wp-parsidate' )
323 ),
324 'sep_font' => array(
325 'id' => 'sep_font',
326 'type' => 'header'
327 ),
328 'droidsans_admin' => array(
329 'id' => 'droidsans_admin',
330 'name' => __( 'Use Droid Sans font for admin side', 'wp-parsidate' ),
331 'type' => 'radio',
332 'options' => $options,
333 'std' => 'enable',
334 'desc' => __( 'Droid Sans Naskh and Roboto font families will be activated in admin side, if this is enabled', 'wp-parsidate' )
335 ),
336 'droidsans_editor' => array(
337 'id' => 'droidsans_editor',
338 'name' => __( 'Use Droid Sans font for editors', 'wp-parsidate' ),
339 'type' => 'radio',
340 'options' => $options,
341 'std' => 'enable',
342 'desc' => __( 'Droid Sans Naskh and Roboto font families will be activated in all rich editors in back end.', 'wp-parsidate' )
343 )
344 ) ),
345 'plugins' => apply_filters( 'wpp_plugins_compability_settings', array() )
346 ) );
347 return $settings;
348 }
349
350 /* Form Callbacks Made by EDD Development Team */
351 function wpp_header_callback( $args ) {
352 echo '<hr/>';
353 }
354
355 function wpp_checkbox_callback( $args ) {
356 global $wpp_settings;
357
358 $checked = isset($wpp_settings[$args['id']]) ? checked(1, $wpp_settings[$args['id']], false) : '';
359 $html = '<input type="checkbox" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']" value="1" ' . $checked . '/>';
360 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
361
362 echo $html;
363 }
364
365 function wpp_multicheck_callback( $args ) {
366 global $wpp_settings;
367
368 $html = '';
369 foreach( $args['options'] as $key => $value ) {
370 $option_name = $args['id'] . '-' . $key;
371 wpp_checkbox_callback( array(
372 'id' => $option_name,
373 'desc' => $value
374 ) );
375 echo '<br>';
376 }
377
378 echo $html;
379 }
380
381 function wpp_radio_callback( $args ) {
382 global $wpp_settings;
383
384 foreach ( $args['options'] as $key => $option ) :
385 $checked = false;
386
387 if ( isset( $wpp_settings[ $args['id'] ] ) && $wpp_settings[ $args['id'] ] == $key )
388 $checked = true;
389 elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $wpp_settings[ $args['id'] ] ) )
390 $checked = true;
391
392 echo '<input name="wpp_settings[' . $args['id'] . ']"" id="wpp_settings[' . $args['id'] . '][' . $key . ']" type="radio" value="' . $key . '" ' . checked(true, $checked, false) . '/>';
393 echo '<label for="wpp_settings[' . $args['id'] . '][' . $key . ']">' . $option . '</label>&nbsp;&nbsp;';
394 endforeach;
395
396 echo '<p class="description">' . $args['desc'] . '</p>';
397 }
398
399 function wpp_text_callback( $args ) {
400 global $wpp_settings;
401
402 if ( isset( $wpp_settings[ $args['id'] ] ) )
403 $value = $wpp_settings[ $args['id'] ];
404 else
405 $value = isset( $args['std'] ) ? $args['std'] : '';
406
407 $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
408 $html = '<input type="text" class="' . $size . '-text" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
409 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
410
411 echo $html;
412 }
413
414 function wpp_number_callback( $args ) {
415 global $wpp_settings;
416
417 if ( isset( $wpp_settings[ $args['id'] ] ) )
418 $value = $wpp_settings[ $args['id'] ];
419 else
420 $value = isset( $args['std'] ) ? $args['std'] : '';
421
422 $max = isset( $args['max'] ) ? $args['max'] : 999999;
423 $min = isset( $args['min'] ) ? $args['min'] : 0;
424 $step = isset( $args['step'] ) ? $args['step'] : 1;
425
426 $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
427 $html = '<input type="number" step="' . esc_attr( $step ) . '" max="' . esc_attr( $max ) . '" min="' . esc_attr( $min ) . '" class="' . $size . '-text" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
428 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
429
430 echo $html;
431 }
432
433 function wpp_textarea_callback( $args ) {
434 global $wpp_settings;
435
436 if ( isset( $wpp_settings[ $args['id'] ] ) )
437 $value = $wpp_settings[ $args['id'] ];
438 else
439 $value = isset( $args['std'] ) ? $args['std'] : '';
440
441 $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
442 $html = '<textarea class="large-text" cols="50" rows="5" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';
443 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
444
445 echo $html;
446 }
447
448 function wpp_password_callback( $args ) {
449 global $wpp_settings;
450
451 if ( isset( $wpp_settings[ $args['id'] ] ) )
452 $value = $wpp_settings[ $args['id'] ];
453 else
454 $value = isset( $args['std'] ) ? $args['std'] : '';
455
456 $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
457 $html = '<input type="password" class="' . $size . '-text" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
458 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
459
460 echo $html;
461 }
462
463 function wpp_missing_callback($args) {
464 echo '&ndash;';
465 return false;
466 }
467
468
469 function wpp_select_callback($args) {
470 global $wpp_settings;
471
472 if ( isset( $wpp_settings[ $args['id'] ] ) )
473 $value = $wpp_settings[ $args['id'] ];
474 else
475 $value = isset( $args['std'] ) ? $args['std'] : '';
476
477 $html = '<select id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']"/>';
478
479 foreach ( $args['options'] as $option => $name ) :
480 $selected = selected( $option, $value, false );
481 $html .= '<option value="' . $option . '" ' . $selected . '>' . $name . '</option>';
482 endforeach;
483
484 $html .= '</select>';
485 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
486
487 echo $html;
488 }
489
490 function wpp_color_select_callback( $args ) {
491 global $wpp_settings;
492
493 if ( isset( $wpp_settings[ $args['id'] ] ) )
494 $value = $wpp_settings[ $args['id'] ];
495 else
496 $value = isset( $args['std'] ) ? $args['std'] : '';
497
498 $html = '<select id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']"/>';
499
500 foreach ( $args['options'] as $option => $color ) :
501 $selected = selected( $option, $value, false );
502 $html .= '<option value="' . $option . '" ' . $selected . '>' . $color['label'] . '</option>';
503 endforeach;
504
505 $html .= '</select>';
506 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
507
508 echo $html;
509 }
510
511 function wpp_rich_editor_callback( $args ) {
512 global $wpp_settings, $wp_version;
513
514 if ( isset( $wpp_settings[ $args['id'] ] ) )
515 $value = $wpp_settings[ $args['id'] ];
516 else
517 $value = isset( $args['std'] ) ? $args['std'] : '';
518
519 if ( $wp_version >= 3.3 && function_exists( 'wp_editor' ) ) {
520 $html = wp_editor( stripslashes( $value ), 'wpp_settings[' . $args['id'] . ']', array( 'textarea_name' => 'wpp_settings[' . $args['id'] . ']' ) );
521 } else {
522 $html = '<textarea class="large-text" rows="10" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';
523 }
524
525 $html .= '<br/><label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
526
527 echo $html;
528 }
529
530 function wpp_upload_callback( $args ) {
531 global $wpp_settings;
532
533 if ( isset( $wpp_settings[ $args['id'] ] ) )
534 $value = $wpp_settings[$args['id']];
535 else
536 $value = isset($args['std']) ? $args['std'] : '';
537
538 $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
539 $html = '<input type="text" class="' . $size . '-text wpp_upload_field" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
540 $html .= '<span>&nbsp;<input type="button" class="wpp_settings_upload_button button-secondary" value="' . __( 'Upload File', 'wpp' ) . '"/></span>';
541 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
542
543 echo $html;
544 }
545
546 function wpp_color_callback( $args ) {
547 global $wpp_settings;
548
549 if ( isset( $wpp_settings[ $args['id'] ] ) )
550 $value = $wpp_settings[ $args['id'] ];
551 else
552 $value = isset( $args['std'] ) ? $args['std'] : '';
553
554 $default = isset( $args['std'] ) ? $args['std'] : '';
555
556 $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';
557 $html = '<input type="text" class="wpp-color-picker" id="wpp_settings[' . $args['id'] . ']" name="wpp_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '" data-default-color="' . esc_attr( $default ) . '" />';
558 $html .= '<label for="wpp_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
559
560 echo $html;
561 }
562
563 function wpp_render_settings() {
564 global $wpp_settings;
565 $active_tab = isset( $_GET[ 'tab' ] ) && array_key_exists( $_GET['tab'], wpp_get_tabs() ) ? $_GET[ 'tab' ] : 'core';
566
567 ob_start();
568 ?>
569 <div class="wrap wpp-settings-wrap">
570 <h2><?php _e('Parsi Settings','wp-parsidate') ?></h2>
571 <h2 class="nav-tab-wrapper">
572 <?php
573 foreach( wpp_get_tabs() as $tab_id => $tab_name ) {
574
575 $tab_url = add_query_arg( array(
576 'settings-updated' => false,
577 'tab' => $tab_id
578 ) );
579
580 $active = $active_tab == $tab_id ? ' nav-tab-active' : '';
581
582 echo '<a href="' . esc_url( $tab_url ) . '" title="' . esc_attr( $tab_name ) . '" class="nav-tab' . $active . '">';
583 echo $tab_name;
584 echo '</a>';
585 }
586 ?>
587 </h2>
588 <?php echo settings_errors( 'wpp-notices' ); ?>
589 <div id="tab_container">
590 <form method="post" action="options.php">
591 <table class="form-table">
592 <?php
593 settings_fields( 'wpp_settings' );
594 do_settings_fields( 'wpp_settings_' . $active_tab, 'wpp_settings_' . $active_tab );
595 ?>
596 </table>
597 <?php submit_button(); ?>
598 </form>
599 </div><!-- #tab_container-->
600 </div><!-- .wrap -->
601 <?php
602 echo ob_get_clean();
603 }
604
605
606