/** * Register actions and callbacks with WP Engine * * @since 1.0.0 */ public function register_actions() { $this->wp_facade->add_action('admin_menu', array($this, 'add_launchkey_admin_menus')); $this->wp_facade->add_action('admin_notices', array($this, 'oauth_warning')); $this->wp_facade->add_action('admin_notices', array($this, 'activate_notice')); $this->wp_facade->add_filter(sprintf('plugin_action_links_%s', $this->wp_facade->plugin_basename($this->wp_facade->plugin_dir_path(__DIR__) . 'launchkey.php')), array($this, 'add_action_links')); }
/** * Register actions for the wizard with WordPress * * @since 1.0.0 */ public function register_actions() { $this->wp_facade->add_action('wp_ajax_' . static::VERIFY_CONFIG_AJAX_ACTION, array($this, 'verify_configuration_callback')); $this->wp_facade->add_action('wp_ajax_' . static::DATA_SUBMIT_AJAX_ACTION, array($this, 'wizard_submit_ajax')); $this->wp_facade->add_filter('init', array($this, 'enqueue_verify_configuration_script')); $this->wp_facade->add_filter('init', array($this, 'enqueue_wizard_script')); }
/** * Register actions and callbacks with WP Engine */ public function register_actions() { $this->wp_facade->add_shortcode('launchkey_login', array($this, 'launchkey_shortcode')); $this->wp_facade->add_action('login_form', array(&$this, 'launchkey_form')); // Register the authentication controller as the first filter in the chain $this->wp_facade->add_filter('authenticate', array($this, 'authenticate'), 0, 3); // Register logout handler $this->wp_facade->add_filter('wp_logout', array($this, 'logout')); }
/** * Register actions and callbacks with WP Engine * * @since 1.0.0 */ public function register_actions() { if ($this->is_multi_site) { $this->wp_facade->add_action('network_admin_menu', array($this, 'add_launchkey_network_admin_menus')); } else { $this->wp_facade->add_action('admin_menu', array($this, 'add_launchkey_admin_menus')); } $notices_action = $this->is_multi_site ? 'network_admin_notices' : 'admin_notices'; $this->wp_facade->add_action($notices_action, array($this, 'oauth_warning')); $this->wp_facade->add_action($notices_action, array($this, 'activate_notice')); $this->wp_facade->add_filter(sprintf('%splugin_action_links_%s', $this->is_multi_site ? 'network_admin_' : '', $this->wp_facade->plugin_basename($this->wp_facade->plugin_dir_path(__DIR__) . 'launchkey.php')), array($this, 'add_action_links')); }
/** * Register actions for the wizard with WordPress * * @since 1.0.0 */ public function register_actions() { $this->wp_facade->add_action('wp_ajax_' . static::VERIFY_CONFIG_AJAX_ACTION, array($this, 'verify_configuration_callback')); $this->wp_facade->add_action('wp_ajax_' . static::DATA_SUBMIT_AJAX_ACTION, array($this, 'wizard_submit_ajax')); $this->wp_facade->add_action('wp_ajax_' . static::QR_CODE_ACTION, array($this, 'wizard_easy_setup_qr_code')); $this->wp_facade->add_action('wp_ajax_nopriv_' . LaunchKey_WP_Native_Client::CALLBACK_AJAX_ACTION, array($this, 'wizard_easy_setup_callback')); $this->wp_facade->add_filter('init', array($this, 'enqueue_verify_configuration_script')); $this->wp_facade->add_filter('init', array($this, 'enqueue_scripts')); }
/** * Register actions and callbacks with WP Engine for admin */ private function register_admin_actions() { $this->wp_facade->add_action('wp_ajax_' . static::CALLBACK_AJAX_ACTION, array($this, 'launchkey_callback')); $this->wp_facade->add_action('wp_ajax_nopriv_' . static::CALLBACK_AJAX_ACTION, array($this, 'launchkey_callback')); $this->wp_facade->add_action('personal_options_update', array($this, 'pair_callback')); $this->wp_facade->add_action('user_profile_update_errors', array($this, 'pair_errors_callback')); $this->wp_facade->add_action('wp_ajax_' . static::WHITE_LABEL_PAIR_ACTION, array($this, 'white_label_pair_callback')); $this->wp_facade->add_action('wp_ajax_nopriv_' . static::WHITE_LABEL_PAIR_ACTION, array($this, 'white_label_pair_callback')); }
/** * Register actions and callbacks with WP Engine */ public function register_actions() { $this->wp_facade->add_shortcode('launchkey_login', array($this, 'launchkey_shortcode')); $this->wp_facade->add_action('login_form', array(&$this, 'launchkey_form')); // Register the authentication controller as the first filter in the chain $this->wp_facade->add_filter('authenticate', array($this, 'authenticate'), 0, 3); // Register logout handler $this->wp_facade->add_filter('wp_logout', array($this, 'logout')); // Place this at the end of the init chain to only worry about users that are otherwise considered // authenticated $this->wp_facade->add_filter('init', array($this, 'launchkey_still_authenticated_page_load'), 999, 3); /** * Jack into the WordPress heartbeat process to log the user out based on server side de-orbit events * being processed. The authentication check is performed on "heartbeat_send" filter so we ensure we verify * before that by using the "heartbeat_received" filter. * * @see wp_ajax_heartbeat */ $this->wp_facade->add_filter('heartbeat_received', array($this, 'launchkey_still_authenticated_heartbeat')); }
/** * Register actions and callbacks with WP Engine for admin */ private function register_admin_actions() { $this->wp_facade->add_action('wp_ajax_launchkey-callback', array($this, 'launchkey_callback')); $this->wp_facade->add_action('wp_ajax_nopriv_launchkey-callback', array($this, 'launchkey_callback')); $this->wp_facade->add_action('admin_init', array($this, 'launchkey_admin_callback')); }