public function __construct() { $options = get_option('vs_meet_options'); $this->key = $options['vs_meetup_key']; $this->secret = $options['vs_meetup_secret']; $this->api_key = $options['vs_meetup_api_key']; $this->callback_url = admin_url('admin-ajax.php') . '?action=meetup_event'; parent::__construct(); // add login function to ajax requests add_action('wp_ajax_nopriv_meetup_event', array($this, 'meetup_event_popup')); add_action('wp_ajax_meetup_event', array($this, 'meetup_event_popup')); }
public function __construct() { $options = get_option('vs_meet_options'); $this->key = $options['vs_meetup_key']; $this->secret = $options['vs_meetup_secret']; $this->api_key = $options['vs_meetup_api_key']; $this->callback_url = admin_url('admin-ajax.php') . '?action=meetup_login'; parent::__construct(); // add login hook -> 'login_init'? // add 'login via meetup' link to login add_action('login_head', array($this, 'includes')); add_action('login_form', array($this, 'login')); // add 'register via meetup' link to BP register screen add_action('bp_core_screen_signup', array($this, 'includes')); add_action('bp_before_account_details_fields', array($this, 'register')); // add Meetup ID to user meta on account creation - this is a hook so you can disable if desired. add_action('meetup_user_create', array($this, 'add_user_meetup_id'), 10, 2); // add login function to ajax requests add_action('wp_ajax_nopriv_meetup_login', array(&$this, 'meetup_login_popup')); add_action('wp_ajax_meetup_login', array(&$this, 'meetup_login_popup')); }