public function wp_hook_init()
 {
     global $current_user;
     parent::wp_hook_init();
     $this->set_wpe_auth_cookie();
     if (is_admin()) {
         add_action('admin_init', create_function('', 'remove_action("admin_notices","update_nag",3);'));
         add_action('admin_head', array($this, 'remove_upgrade_nags'));
         add_filter('site_transient_update_plugins', array($this, 'disable_indiv_plugin_update_notices'));
         wp_enqueue_style('wpe-common', WPE_PLUGIN_URL . '/css/wpe-common.css', array(), WPE_PLUGIN_VERSION);
         wp_enqueue_script('wpe-common', WPE_PLUGIN_URL . '/js/wpe-common.js', array('jquery', 'jquery-ui-core'), WPE_PLUGIN_VERSION);
         wp_enqueue_script('wpe-dify-blog', WPE_PLUGIN_URL . '/js/dify-blog.js', array('jquery'), WPE_PLUGIN_VERSION, true);
         //if a deployment is underway or recently completed, lets do some stuff ... see class.deployment.php for details
         include_once 'class.deployment.php';
         add_action('admin_init', array('WpeDeployment', 'instance'));
         add_action('admin_print_footer_scripts', array($this, 'print_footer_scripts'));
         //Some scripts we only want to load on the WPE plugin admin page
         if ('wpengine-common' == @$_GET['page']) {
             wp_enqueue_script('wpe-chzn', WPE_PLUGIN_URL . '/js/chosen.jquery.min.js', array('jquery', 'jquery-ui-core'));
             wp_enqueue_style('wpe-chzn', WPE_PLUGIN_URL . '/js/chosen.css');
             wp_enqueue_script('bootstrap', WPE_PLUGIN_URL . '/js/bootstrap.js', array('jquery', 'jquery-effects-core'), WPE_PLUGIN_VERSION, TRUE);
             wp_enqueue_script('jquery-ui-widget', false, array(), false, TRUE);
             wp_enqueue_script('jquery-ui-progressbar', false, array(), false, TRUE);
             wp_enqueue_script('jquery-ui-slide');
             wp_enqueue_script('jquery-ui-bounce');
             //lets load some specific files for our admin screen
             // Using Pointers
             wp_enqueue_style('wp-pointer');
             wp_enqueue_script('wp-pointer');
             wp_enqueue_style('jquery-ui');
         }
         // Determine whether the backup modal is disabled
         $popup_disabled = (bool) (defined('WPE_POPUP_DISABLED') && WPE_POPUP_DISABLED || is_wpe_snapshot());
         // Set some vars for usage in the admin
         wp_localize_script('wpe-common', 'wpe', array('account' => PWP_NAME, 'popup_disabled' => $popup_disabled, 'user_email' => $current_user->user_email, 'deployment' => WpeDeployment::warn()));
         // check for admin messages
         if ($this->wpe_messaging_enabled() and defined("PWP_NAME")) {
             add_action('admin_init', array($this, 'check_for_notice'));
         }
         //admin menu hooks
         if (is_multisite()) {
             $this->upload_space_load();
             add_action('network_admin_menu', array($this, 'wp_hook_admin_menu'));
         } else {
             add_action('admin_menu', array($this, 'wp_hook_admin_menu'));
         }
         //wpe ajax hook
         add_action('wp_ajax_wpe-ajax', array($this, 'do_ajax'));
         add_action('activate_plugin', array($this, 'activate_plugin'));
     }
     add_action('password_reset', array($this, 'password_reset'), 0, 2);
     add_action('login_init', array($this, 'login_init'));
     //serve naked 404's to bots. Check for bp_init is a workaround for buddypress
     if (function_exists('bp_init')) {
         add_action('bp_init', array($this, 'is_404'), 99999);
     } elseif (function_exists('bbp_init')) {
         add_action('bbp_init', array($this, 'is_404'), 99999);
     } else {
         add_action('template_redirect', array($this, 'is_404'), 99999);
     }
     add_action('admin_bar_menu', array($this, 'wpe_adminbar'), 80);
     //add_filter( 'site_url', array($this,'wp_hook_site_url') );
     add_filter('use_http_extension_transport', '__return_false');
     # add_action( 'wp_footer', array( $this, 'wpe_emit_powered_by_html' ) );
     remove_action('wp_head', 'wp_generator');
     if (!function_exists('httphead')) {
         add_filter('template_include', array($this, 'httphead'));
     }
     //add_filter('query',array($this,'query_filter'));
     add_action('twentyeleven_credits', array($this, 'wpengine_credits'));
     if (defined('WP_TURN_OFF_ADMIN_BAR') && true === WP_TURN_OFF_ADMIN_BAR) {
         global $show_admin_bar;
         $show_admin_bar = false;
     }
     // Disable Headway theme gzip -- it blocks us from being able to CDN-replace and isn't necessary anyway.
     add_filter('headway_gzip', '__return_false');
 }
 public static function warn()
 {
     $instance = WpeDeployment::instance();
     return $instance->warn;
 }