sticky); $sticky_settings = array('sticky_options'); ### Form Processing if(!empty($_POST['do'])) { // Decide What To Do switch($_POST['do']) { case __('Update Options', 'wp-sticky'): $text = ''; $sticky_options['display_date'] = intval($_POST['display_date']); $sticky_options['category_only'] = intval($_POST['category_only']); $sticky_options['announcement_banner'] = trim($_POST['announcement_banner']); $update_sticky_options = update_option('sticky_options', $sticky_options); if($update_sticky_options) { $text = ''.__('Sticky Options Updated', 'wp-sticky').''; } if(empty($text)) { $text = ''.__('No Sticky Option Updated', 'wp-sticky').''; } break; // Uninstall WP-Sticky case __('UNINSTALL WP-Sticky', 'wp-sticky') : if(trim($_POST['uninstall_sticky_yes']) == 'yes') { echo '
'; echo '

'; foreach($sticky_tables as $table) { $wpdb->query("DROP TABLE {$table}"); echo ''; printf(__('Table \'%s\' has been deleted.', 'wp-sticky'), "{$table}"); echo '
'; } echo '

'; echo '

'; foreach($sticky_settings as $setting) { $delete_setting = delete_option($setting); if($delete_setting) { echo ''; printf(__('Setting Key \'%s\' has been deleted.', 'wp-sticky'), "{$setting}"); echo '
'; } else { echo ''; printf(__('Error deleting Setting Key \'%s\'.', 'wp-sticky'), "{$setting}"); echo '
'; } } echo '

'; echo '
'; $mode = 'end-UNINSTALL'; } break; } } ### Determines Which Mode It Is switch($mode) { // Deactivating WP-Sticky case 'end-UNINSTALL': $deactivate_url = 'plugins.php?action=deactivate&plugin=sticky/sticky.php'; if(function_exists('wp_nonce_url')) { $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_sticky/sticky.php'); } echo '
'; echo '

'.__('Uninstall WP-Sticky', 'wp-sticky').'

'; echo '

'.sprintf(__('Click Here To Finish The Uninstallation And WP-Sticky Will Be Deactivated Automatically.', 'wp-sticky'), $deactivate_url).'

'; echo '
'; break; // Main Page default: $sticky_options = get_option('sticky_options'); ?>

'.$text.'

'; } ?>



Announcement Banner on announcement posts.', 'wp-sticky'); ?>

Display Date.', 'wp-sticky'); ?>
  



    '.$settings.''."\n"; } ?>
    '.$tables.''."\n"; } ?>