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

wpdiscuz_profile_url

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

Changelog

since 7.0.0 version

Parameters

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

Usage

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