Example #1
0
/**
 * Return the mark link for the current notification.
 *
 * @since BuddyPress (1.9.0)
 */
function bp_get_the_notification_mark_link()
{
    if (bp_is_current_action('read')) {
        $retval = bp_get_the_notification_mark_unread_link();
    } else {
        $retval = bp_get_the_notification_mark_read_link();
    }
    return apply_filters('bp_get_the_notification_mark_link', $retval);
}
/**
 * Return the mark link for the current notification.
 *
 * @since BuddyPress (1.9.0)
 */
function bp_get_the_notification_mark_link()
{
    if (bp_is_current_action('read')) {
        $retval = bp_get_the_notification_mark_unread_link();
    } else {
        $retval = bp_get_the_notification_mark_read_link();
    }
    /**
     * Filters the mark link for the current notification.
     *
     * @since BuddyPress (1.9.0)
     *
     * @param string $retval The mark link for the current notification.
     */
    return apply_filters('bp_get_the_notification_mark_link', $retval);
}
/**
 * Return the mark link for the current notification.
 *
 * @since 1.9.0
 * @since 2.6.0 Added $user_id as a parameter.
 *
 * @param int $user_id The user ID.
 * @return string
 */
function bp_get_the_notification_mark_link($user_id = 0)
{
    // Set default user ID to use.
    $user_id = 0 === $user_id ? bp_displayed_user_id() : $user_id;
    if (bp_is_current_action('read')) {
        $retval = bp_get_the_notification_mark_unread_link($user_id);
    } else {
        $retval = bp_get_the_notification_mark_read_link($user_id);
    }
    /**
     * Filters the mark link for the current notification.
     *
     * @since 1.9.0
     * @since 2.6.0 Added $user_id as a parameter.
     *
     * @param string $retval  The mark link for the current notification.
     * @param int    $user_id The user ID.
     */
    return apply_filters('bp_get_the_notification_mark_link', $retval, $user_id);
}