bp_get_the_notification_mark_read_link( int $user_id )

Return the mark read link for the current notification.

Description

Parameters

$user_id

(Required) The user ID.

Return

(string)

Source

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

	function bp_get_the_notification_mark_read_link( $user_id = 0 ) {
		// Set default user ID to use.
		$user_id = 0 === $user_id ? bp_displayed_user_id() : $user_id;

		$retval = sprintf( '<a href="%1$s" class="mark-read primary">%2$s</a>', esc_url( bp_get_the_notification_mark_read_url( $user_id ) ), __( 'Read', 'buddyboss' ) );

		/**
		 * Filters the mark read link for the current notification.
		 *
		 * @since BuddyPress 1.9.0
		 * @since BuddyPress 2.6.0 Added $user_id as a parameter.
		 *
		 * @param string $retval  HTML for the mark read link for the current notification.
		 * @param int    $user_id The user ID.
		 */
		return apply_filters( 'bp_get_the_notification_mark_read_link', $retval, $user_id );
	}

Changelog

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

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.