function __construct()
 {
     $this->_config = w3_instance('W3_Config');
     $this->_request_types = array('bug_report' => __('Submit a Bug Report', 'w3-total-cache'), 'new_feature' => __('Suggest a New Feature', 'w3-total-cache'), 'email_support' => __('Less than 15 Minute Email Support Response (M-F 9AM - 5PM EDT): $75 USD', 'w3-total-cache'), 'phone_support' => __('Less than 15 Minute Phone Support Response (M-F 9AM - 5PM EDT): $150 USD', 'w3-total-cache'), 'plugin_config' => __('Professional Plugin Configuration: Starting @ $100 USD', 'w3-total-cache'), 'theme_config' => __('Theme Performance Optimization & Plugin Configuration: Starting @ $150 USD', 'w3-total-cache'), 'linux_config' => __('Linux Server Optimization & Plugin Configuration: Starting @ $200 USD', 'w3-total-cache'));
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/admin.php');
     $this->_page = w3tc_get_current_page();
 }
Example #2
0
 /**
  * Load action
  *
  * @return void
  */
 function load()
 {
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/admin.php');
     $this->_page = w3tc_get_current_page();
     /**
      * Run plugin action
      */
     $action = false;
     foreach ($_REQUEST as $key => $value) {
         if (strpos($key, 'w3tc_') === 0) {
             $action = 'action_' . substr($key, 5);
             break;
         }
     }
     $flush = false;
     $cdn = false;
     $support = false;
     $action_handler = w3_instance('W3_AdminActions_ActionHandler');
     $action_handler->set_default($this);
     $action_handler->set_current_page($this->_page);
     if ($action && $action_handler->exists($action)) {
         if (!wp_verify_nonce(W3_Request::get_string('_wpnonce'), 'w3tc')) {
             wp_nonce_ays('w3tc');
         }
         try {
             $action_handler->execute($action);
         } catch (Exception $e) {
             w3_admin_redirect_with_custom_messages(array(), array($e->getMessage()));
         }
         exit;
     }
 }
Example #3
0
 function __construct()
 {
     $this->_config = w3_instance('W3_Config');
     w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/admin.php');
     $this->_page = w3tc_get_current_page();
 }
Example #4
0
 function __construct()
 {
     $this->_config = w3_instance('W3_Config');
     $this->_config_admin = w3_instance('W3_ConfigAdmin');
     $this->_config_master = new W3_Config(true);
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/admin.php');
     $this->_page = w3tc_get_current_page();
 }
Example #5
0
 public function run()
 {
     $this->_config = w3_instance('W3_Config');
     $this->_config_admin = w3_instance('W3_ConfigAdmin');
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/admin.php');
     w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/admin_ui.php');
     $this->_page = w3tc_get_current_page();
     if (is_network_admin() || !w3_is_multisite()) {
         $this->edge_notification();
     }
     if (is_w3tc_admin_page()) {
         add_action('admin_head', array($this, 'admin_head'));
         add_action('w3tc_hide_button_custom-edge_mode', array($this, 'hide_edge_mode_notification'));
         $support_reminder = $this->_config->get_boolean('notes.support_us') && $this->_config_admin->get_integer('common.install') < time() - W3TC_SUPPORT_US_TIMEOUT && $this->_config->get_string('common.support') == '' && !$this->_config->get_boolean('common.tweeted');
         if ($support_reminder || w3tc_show_notification('support_us_popup')) {
             add_action('w3tc-dashboard-head', array($this, 'support_us_nag'));
         }
         add_action('w3tc-dashboard-head', array($this, 'edge_nag'));
     }
 }
/**
 * @param $extension_name
 * @param $extension_id
 */
function w3_e_extension_activation_notification($extension_name, $extension_id)
{
    w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/ui.php');
    $page = w3tc_get_current_page();
    printf(w3_get_notification_box('<p>' . __('It appears that activating the <a href="%s">%s</a> extension for W3 Total Cache will be helpful for your site. <a class="button" href="%s">Click here</a> to try it. %s', 'w3-total-cache') . '</p>', $extension_id), sprintf(w3_admin_url('admin.php?page=w3tc_extensions#%s'), $extension_id), $extension_name, sprintf(w3_admin_url('admin.php?page=' . $page . '&w3tc_extensions_activate=%s'), $extension_id), w3_button_hide_note(__('Hide this message', 'w3-total-cache'), 'hide-extension-notification', '', true, '', 'w3tc_default_hide_note_custom=' . $extension_id));
}