apply_filters( 'um_get_restricted_privacy_notice', $notice, $user_id, $privacy ) → {string|null}
Filters the notice shown when a user profile is restricted by its privacy settings.
Parameters:
| Name | Type | Description |
|---|---|---|
$notice |
string | null | Restricted privacy notice text. |
$user_id |
int | User ID whose profile privacy is being checked. |
$privacy |
string | Profile Privacy value. |
- Since:
- 2.13.0
- Source:
Returns:
Restricted privacy notice text, or null to show no notice.
- Type
- string | null
Example
Customize the restricted privacy notice text.
function my_um_get_restricted_privacy_notice( $notice, $privacy, $user_id ) {
$notice = __( 'Sorry, this profile is private.', 'ultimate-member' );
return $notice;
}
add_filter( 'um_get_restricted_privacy_notice', 'my_um_get_restricted_privacy_notice', 10, 3 );