/** * Initialize the script * * @action admin_init */ public function init() { if (!current_user_can('activate_plugins')) { return; } // Show a notice to the user if we're on a temporary domain if (gd_is_temp_domain() || !$this->user_changed_domain()) { add_action('admin_notices', array($this, 'show_notice'), -PHP_INT_MAX); } }
$gd_domain_changer = new GD_System_Plugin_Domain_Changer(); // Support SSL integration $gd_ssl = new GD_System_Plugin_SSL(); // Urge users not to use a temporary CNAME (except on staging sites) if (!gd_is_staging_site() && gd_is_temp_domain()) { $gd_cname = new GD_System_Plugin_CName(); } // Custom CLI command for cron events if (defined('WP_CLI') && WP_CLI && class_exists('Cron_Event_Command')) { $gd_cli_cron = new GD_System_Plugin_Cron_Event_Command(); } // Load any hotfixes $gd_hotfixes = new GD_System_Plugin_Hotfixes(); // Pointers $gd_pointers = new GD_System_Plugin_Pointers(); if (gd_is_temp_domain()) { $gd_temp_domain = new GD_System_Plugin_Temp_Domain(); } // Array of bundled plugins to load $bundled_plugins = array('limit-login-attempts/limit-login-attempts.php' => true, 'wp-easy-mode/wp-easy-mode.php' => gd_is_wpem_enabled(), 'gd-admin-color-scheme/gd-admin-color-scheme.php' => !gd_is_reseller() && !gd_is_mt()); // Load bundled plugins foreach ($bundled_plugins as $plugin_basename => $enabled) { if ($enabled) { gd_system_maybe_load_plugin($plugin_basename); } } // Ensure that batcache's cache group labeled as persistent. This ensures that // when we purge a URL, it actually happens. if (isset($batcache)) { $batcache->configure_groups(); }