wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_social_login_response
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

wpdiscuz_social_login_response

This filter can be used for changing the response array that should be returned to the JS after login via social networks.

Changelog

Since 7.0.0

Parameters

1. $response (type: array) – the response array that should be returned to the JS
2. $provider (type: string) – the provider of the social login (google, facebook, etc)
3. $postID (type: int) – the ID of the post
4. $token (type: string) – the token that is using for the FB login
5. $userID (type: int) – the user_id that is using for the FB login

Usage

add_filter("wpdiscuz_social_login_response", function ($response, $provider, $postID, $token, $userID) {
    $response["myCustomOption"] = "MyCustomValue";
    return $response;
}, 10, 5);

Was this article helpful to you? Yes No 1