bp_get_the_notification_mark_unread_link( int $user_id )
Return the mark unread link for the current notification.
Description Description
Parameters Parameters
- $user_id
-
(Required) The user ID.
Return Return
(string)
Source Source
File: bp-notifications/bp-notifications-template.php
function bp_get_the_notification_mark_unread_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-unread primary bp-tooltip">%2$s</a>', esc_url( bp_get_the_notification_mark_unread_url( $user_id ) ), __( 'Unread', 'buddypress' ) ); /** * Filters the link used for marking a single notification as unread. * * @since 1.9.0 * @since 2.6.0 Added $user_id as a parameter. * * @param string $retval HTML for the mark unread link for the current notification. * @param int $user_id The user ID. */ return apply_filters( 'bp_get_the_notification_mark_unread_link', $retval, $user_id ); }
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Added $user_id as a parameter. |
1.9.0 | Introduced. |