public function oauth_callback() { $service = Oauth_Service::get_service_by_name($_GET['service']); if ($service) { try { /* initialize the Callback */ $cb = new WPOF_Callback($service->get_submenu_slug(), $service->get_client_config(), $service->get_token_storage(), new Guzzle3Client()); /* handle the callback */ $access_token = $cb->handleCallback($_GET); $service->handle_access_token($access_token); } catch (\Exception $e) { $this->redirect_to_login_url_with_error(self::CONFIGURATION_ERROR, $_GET['service']); } } else { echo 'No script kiddies'; die; } }
public static function get_wpof_login_count($service_name) { $service = Oauth_Service::get_service_by_name($service_name); return (int) get_option(self::META_PREFIX . $service->get_submenu_slug()); }