/** * Constructor. * * @since 4.0.0 * * @access public * @param Domainmap_Plugin $plugin The instance of the Domainap_Plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); $this->_add_ajax_action(Domainmap_Plugin::ACTION_CHECK_DOMAIN_AVAILABILITY, 'check_domain'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_PAYPAL_PURCHASE, 'purchase_with_paypal'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_PAYPAL_DO_EXPRESS_CHECKOUT, 'complete_paypal_checkout'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_SHOW_PURCHASE_FORM, 'render_purchase_form'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_SHOW_PURCHASE_FORM, 'redirect_to_login_form', false, true); }
/** * Constructor. * * @since 4.0.0 * * @access public * @param Domainmap_Plugin $plugin The instance of the Domainap_Plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); // add ajax actions $this->_add_ajax_action(Domainmap_Plugin::ACTION_MAP_DOMAIN, 'map_domain'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_UNMAP_DOMAIN, 'unmap_domain'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_HEALTH_CHECK, 'check_health_status', true, true); $this->_add_ajax_action(Domainmap_Plugin::ACTION_HEARTBEAT_CHECK, 'check_heartbeat', false, true); $this->_add_ajax_action(Domainmap_Plugin::ACTION_SELECT_PRIMARY_DOMAIN, 'select_primary_domain'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_DESELECT_PRIMARY_DOMAIN, 'deselect_primary_domain'); // add wpengine compatibility if (!has_action('domainmapping_added_domain')) { $this->_add_action('domainmapping_added_domain', 'add_domain_to_wpengine'); } if (!has_action('domainmapping_deleted_domain')) { $this->_add_action('domainmapping_deleted_domain', 'remove_domain_from_wpengine'); } }
/** * Constructor. * * @since 4.1.0 * * @access public * @param Domainmap_Plugin $plugin The instance of the Domainap_Plugin class. */ public function __construct(Domainmap_Plugin $plugin) { parent::__construct($plugin); $this->_add_ajax_action(Domainmap_Plugin::ACTION_SHOW_REGISTRATION_FORM, 'render_registration_form'); $this->_add_ajax_action(Domainmap_Plugin::ACTION_SHOW_REGISTRATION_FORM, 'redirect_to_login_form', false, true); }