Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function o99_brsa_options_page() {
- $my_options = get_option( 'o99_brsa_settings' );
- $currentsettings = "";
- if ( isset( $_POST['import'] ) && trim($_POST['exccc']) != "" ) {
- $currentsettings = $_POST['exccc'];
- update_option( 'o99_brsa_settings', serialize($currentsettings));
- } elseif ( isset( $my_options ) && ( $my_options != "" ) ) {
- if ($o99_brsa_options['brsa_keep_settings_exp'] !='') {
- $currentsettings = $o99_brsa_options['brsa_keep_settings_exp'];
- } else {
- $currentsettings = serialize( $my_options );
- }
- }
- global $o99_brsa_options; // declare as global so we can access everywhere
- ob_start(); ?>
- <div class="wrap">
- <h2><?php echo _e('o99 Some Plugin', 'o99-brsa-domain') ?></h2>
- <form method="post" action="options.php">
- <?php settings_fields('o99_brsa_settings_group'); ?>
- <!-- /Enable Plugin -->
- <h3><?php _e('Enable', 'o99-brsa-domain'); ?></h3>
- <?php _e('This plugin will rebrand your wp installation to a white board (when finished)', 'o99-brsa-domain'); ?>
- <!-- /Enable General $o99_brsa_options['brsa_enable_all'] -->
- <p>
- <input id="o99_brsa_settings[brsa_enable_all]" name="o99_brsa_settings[brsa_enable_all]" type="checkbox" value="1" <?php checked(1, $o99_brsa_options['brsa_enable_all']); ?> />
- <label class="description" for="o99_brsa_settings[brsa_enable_all]"><b><?php _e('Enable all functions', 'o99-brsa-domain'); ?></b>
- </label>
- ? </br><?php _e('This will Enable all the functions at once', 'o99-brsa-domain'); ?>
- </p>
- <?php /// HERE I HAVE MANY MANY MORE OPTIONS SIMILAR TO ABOVE ... ?>
- <p class="submit">
- <input type="submit" class="button-primary" value="<?php _e('Save Options', 'o99-brsa-domain'); ?>" />
- </p>
- </form>
- <!-- /SECOND FORM ONLY FOR EXPORT IMPORT OF OPTIONS -->
- <form id="impexp" method="post" action="#">
- <p>
- <textarea readonly="yes" class="code" cols="50" rows="5" id="o99_brsa_settings[brsa_keep_settings_exp]" name="o99_brsa_settings[brsa_keep_settings_exp]" /><?php
- echo $currentsettings3; // leave the php tags seperated t oavoid tabs and spaces in the code ..
- ?></textarea>
- <label class="code ltr" for="o99_brsa_settings[brsa_keep_settings_exp]">
- </br><?php _e('Export Data', 'o99-brsa-domain'); ?>
- </label>
- </p>
- <p>
- <textarea class="code ltr" cols="50" rows="5" id="exccc" name="exccc" /><?php
- // echo $currentsettings; // leave the php tags seperated t oavoid tabs and spaces in the code ..
- ?></textarea>
- <label class="description" for="exccc">
- </br><?php _e('Export Data', 'o99-brsa-domain'); ?>
- </label>
- </p>
- <!-- / IMPORT o99_brsa_settings[brsa_keep_settings_exp] -->
- <input type="submit" value="<?php _e('Import', 'o99-brsa-domain'); ?>" id="import" name="import" class="button-primary" onClick="return confirm('<?php _e('Are you sure you want to import the settings?', 'o99-brsa-domain'); ?>')">
- </form>
- </div>
- <?php
- echo ob_get_clean();
- }
Advertisement
Add Comment
Please, Sign In to add comment