wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Filters
  5. wpdiscuz_profile_url
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages


This filter can be used for changing the user’s profile URL.


since 7.0.0 version


1. $profile_url (type: string) – the profile URL of the user
2. $user (type: WP_User object) – the object of the current user


add_filter("wpdiscuz_profile_url", function ($profile_url, $user) {
    if ($user && class_exists('userpro_api')) {
        global $userpro;
        $profile_url = $userpro->permalink($user->ID);
    return $profile_url;
}, 10, 2);

Was this article helpful to you? Yes No