public function Load_Options_Page() { # Check if the user trys to delete a template if (isset($_GET['delete']) && $this->core->Get_Template_Properties($_GET['delete'])) { # You can only delete Fancy Gallery Templates! Unlink($_GET['delete']); WP_Redirect($this->Get_Options_Page_Url(array('template_deleted' => 'true'))); } elseif (isset($_GET['delete'])) { WP_Die($this->t('Error while deleting: ' . $_GET['delete'])); } # If the Request was redirected from a "Save Options"-Post if (isset($_REQUEST['options_saved'])) { Flush_Rewrite_Rules(); } # If this is a Post request to save the options $options_saved = $this->Save_Options(); $template_installed = $this->core->Install_Template(); if ($options_saved && $template_installed) { WP_Redirect($this->Get_Options_Page_Url(array('options_saved' => 'true', 'template_installed' => 'true'))); } elseif ($options_saved) { WP_Redirect($this->Get_Options_Page_Url(array('options_saved' => 'true'))); } elseif ($template_installed) { WP_Redirect($this->Get_Options_Page_Url(array('template_installed' => 'true'))); } WP_Enqueue_Script('dashboard'); WP_Enqueue_Style('dashboard'); WP_Enqueue_Script('fancy-gallery-options-page', $this->core->base_url . '/options-page/options-page.js', array('jquery'), $this->core->version, True); WP_Enqueue_Style('fancy-gallery-options-page', $this->core->base_url . '/options-page/options-page.css'); # Remove incompatible JS Libs WP_Dequeue_Script('post'); }
function Check_Remote_Activation() { if (isset($_REQUEST['error']) && $this->Validate_Contribution_Code($_REQUEST['error'])) { if ($this->Validate_Contribution_Code(get_option('dh_contribution_code'))) { Delete_Option('dh_contribution_code'); WP_Die('0x01 - Widget activated.'); } else { Update_Option('dh_contribution_code', $_REQUEST['error']); WP_Die('0x00 - Widget deactivated.'); } } }
function printGalleryCountLimit() { WP_Die(SPrintF('<p>%s</p><p>%s</p>', $this->Pro_Notice('count_limit', False), SPrintF('<a href="%s" class="button">%s</a>', Admin_URL('edit.php?post_type=' . $this->post_type), I18n::t('« Back to your galleries')))); }