bp_get_notifications_permalink( int $user_id )

Return the notifications permalink.


Parameters Parameters

$user_id

(int) (Required) The user ID.


Top ↑

Return Return

(string) Notifications permalink.


Source Source

File: bp-notifications/bp-notifications-template.php

	function bp_get_notifications_permalink( $user_id = 0 ) {
		if ( 0 === $user_id ) {
			$user_id = bp_loggedin_user_id();
			$domain  = bp_loggedin_user_domain();
		} else {
			$domain = bp_core_get_user_domain( (int) $user_id );
		}

		$retval = trailingslashit( $domain . bp_get_notifications_slug() );

		/**
		 * Filters the notifications permalink.
		 *
		 * @since 1.9.0
		 * @since 2.6.0 Added $user_id as a parameter.
		 *
		 * @param string $retval  Permalink for the notifications.
		 * @param int    $user_id The user ID.
		 */
		return apply_filters( 'bp_get_notifications_permalink', $retval, $user_id );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Added $user_id as a parameter.
1.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.