/** * Constructor. * * @since 4.0.0 * * @access public * @param Domainmap_Plugin $plugin The instance of Domainmap_Plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); $this->_add_action('admin_menu', 'add_site_options_page'); $this->_add_action('network_admin_menu', 'add_network_options_page'); $this->_add_action('admin_enqueue_scripts', 'enqueue_scripts'); }
/** * Constructor. * * @since 4.0.0 * * @access public * @param Domainmap_Plugin $plugin The instance of the plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); $this->_add_action('init', 'register_scripts'); $this->_add_action('plugins_loaded', 'load_text_domain'); $this->_add_filter('domainmapping_resellers', 'setup_resellers'); }
/** * Constructor. * * @since 4.0.0 * * @access public * @param Domainmap_Plugin $plugin The instance of the plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); $this->_add_action('manage_sites_custom_column', 'render_mapped_domain_column', 1, 2); $this->_add_action('delete_blog', 'delete_blog_mappings', 1, 2); $this->_add_filter('wpmu_blogs_columns', 'register_mapped_domain_column'); }
/** * Constructor. * * @since 4.0.2 * * @access public * @param Domainmap_Plugin $plugin The instance of the plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); // create CDSSO key, if it couldn't be done then don't activate the module $this->_cdsso = $this->_get_cdsso_key(); if (!$this->_cdsso) { return; } $this->_add_action('plugins_loaded', 'check_authentication'); $this->_add_action('wp_login', 'set_cdsso_propagation', 10, 2); $this->_add_action('wp_logout', 'set_cdsso_destroy'); if (filter_input(INPUT_COOKIE, self::KEY_PROPAGATE_CDSSO)) { $this->_add_action('init', 'propagate_cdsso'); } if (filter_input(INPUT_COOKIE, self::KEY_DESTROY_CDSSO, FILTER_VALIDATE_BOOLEAN)) { $this->_add_action('init', 'destroy_cdsso'); } $this->_add_ajax_action(Domainmap_Plugin::ACTION_CDSSO_LOGIN, 'authorize_user', true, false); $this->_add_ajax_action(Domainmap_Plugin::ACTION_CDSSO_LOGIN, 'send_back_user', false, true); $this->_add_ajax_action(Domainmap_Plugin::ACTION_CDSSO_PROPAGATE, 'propagate_user', true, true); $this->_add_ajax_action(Domainmap_Plugin::ACTION_CDSSO_LOGOUT, 'destroy_user', true, true); }
/** * Constructor. * * @since 4.0.3 * * @access public * @param Domainmap_Plugin $plugin The current plugin. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); $this->_force_protocol = defined('DM_FORCE_PROTOCOL_ON_MAPPED_DOMAIN') && filter_var(DM_FORCE_PROTOCOL_ON_MAPPED_DOMAIN, FILTER_VALIDATE_BOOLEAN); $this->_add_action('template_redirect', 'redirect_front_area'); $this->_add_action('admin_init', 'redirect_admin_area'); $this->_add_action('login_init', 'redirect_login_area'); $this->_add_action('customize_controls_init', 'set_customizer_flag'); // URLs swapping $this->_add_filter('unswap_url', 'unswap_mapped_url'); if (defined('DOMAIN_MAPPING') && filter_var(DOMAIN_MAPPING, FILTER_VALIDATE_BOOLEAN)) { $this->_add_filter('pre_option_siteurl', 'swap_root_url'); $this->_add_filter('pre_option_home', 'swap_root_url'); $this->_add_filter('home_url', 'swap_mapped_url', 10, 4); $this->_add_filter('site_url', 'swap_mapped_url', 10, 4); $this->_add_filter('includes_url', 'swap_mapped_url', 10, 2); $this->_add_filter('content_url', 'swap_mapped_url', 10, 2); $this->_add_filter('plugins_url', 'swap_mapped_url', 10, 3); } elseif (is_admin()) { $this->_add_filter('home_url', 'swap_mapped_url', 10, 4); $this->_add_filter('pre_option_home', 'swap_root_url'); } }
/** * Constructor. * * @since 4.0.0 * * @access public * @param Domainmap_Plugin $plugin The instance of the plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); $this->_check_sunrise(); $this->_upgrade(); }