/** * First function for printing options page * * @ Since 1.1.0 * @ Updated 1.2.4 * */ function admin_setup_options_form($currenttab) { $options = $this->get_all_options(); $settings_section = $this->get_private('id') . '_' . $currenttab . '_tab'; $submitted = isset($_POST["hidden"]) && $_POST["hidden"] == "Y" ? true : false; if ($submitted) { $options = $this->admin_simple_update($currenttab, $_POST, $options); } $buttom = isset($_POST[$this->get_private('settings') . '_' . $currenttab]['submit-' . $currenttab]) ? $_POST[$this->get_private('settings') . '_' . $currenttab]['submit-' . $currenttab] : ''; if ($buttom == 'Delete Current Cache') { $bot = new PhotoTileForTumblrBot(); $bot->clearAllCache(); echo '<div class="announcement">' . __("Cache Cleared") . '</div>'; } elseif ($buttom == 'Save Settings') { $bot = new PhotoTileForTumblrBot(); $bot->clearAllCache(); echo '<div class="announcement">' . __("Settings Saved") . '</div>'; } echo '<form action="" method="post">'; echo '<input type="hidden" name="hidden" value="Y">'; $this->admin_display_opt_form($options, $currenttab); echo '<div class="AlpinePhotoTiles-breakline"></div>'; echo '</form>'; }