/** * Return the action links for the current notification. * * @since BuddyPress (1.9.0) * * @param array|string $args { * @type string $before HTML before the links. * @type string $after HTML after the links. * @type string $sep HTML between the links. * @type array $links Array of links to implode by 'sep'. * } * * @return string HTML links for actions to take on single notifications. */ function bp_get_the_notification_action_links($args = '') { // Parse $r = wp_parse_args($args, array('before' => '', 'after' => '', 'sep' => ' | ', 'links' => array(bp_get_the_notification_mark_link(), bp_get_the_notification_delete_link()))); // Build the links $retval = $r['before'] . implode($r['links'], $r['sep']) . $r['after']; /** * Filters the action links for the current notification. * * @since BuddyPress (1.9.0) * * @param string $retval HTML links for actions to take on single notifications. */ return apply_filters('bp_get_the_notification_action_links', $retval); }
/** * Return the action links for the current notification. * * @since BuddyPress (1.9.0) * * @param array $args { * @type string $before HTML before the links. * @type string $after HTML after the links. * @type string $sep HTML between the links. * @type array $links Array of links to implode by 'sep'. * } * * @return string HTML links for actions to take on single notifications. */ function bp_get_the_notification_action_links($args = '') { // Parse $r = wp_parse_args($args, array('before' => '', 'after' => '', 'sep' => ' | ', 'links' => array(bp_get_the_notification_mark_link(), bp_get_the_notification_delete_link()))); // Build the links $retval = $r['before'] . implode($r['links'], $r['sep']) . $r['after']; return apply_filters('bp_get_the_notification_action_links', $retval); }
/** * Return the action links for the current notification. * * @since BuddyPress (1.9.0) * * @param array $args { * @type string $before HTML before the links. * @type string $after HTML after the links. * @type string $sep HTML between the links. * @type array $links Array of links to implode by 'sep'. * } * * @return string HTML links for actions to take on single notifications. */ function flat_sassy_boots_bp_get_the_notification_action_links($args = '') { // Parse $r = wp_parse_args($args, array('links' => array(bp_get_the_notification_mark_link(), bp_get_the_notification_delete_link()))); // Build the links $retval = implode($r['links']); /** * Filters the action links for the current notification. * * @since BuddyPress (1.9.0) * * @param string $retval HTML links for actions to take on single notifications. */ return apply_filters('bp_get_the_notification_action_links', $retval); }
/** * Return the action links for the current notification. * * @since 1.9.0 * @since 2.6.0 Added $user_id as a parameter to $args. * * @param array|string $args { * @type string $before HTML before the links. * @type string $after HTML after the links. * @type string $sep HTML between the links. * @type array $links Array of links to implode by 'sep'. * @type int $user_id User ID to fetch action links for. Defaults to displayed user ID. * } * @return string HTML links for actions to take on single notifications. */ function bp_get_the_notification_action_links($args = '') { // Set default user ID to use. $user_id = isset($args['user_id']) ? $args['user_id'] : bp_displayed_user_id(); // Parse. $r = wp_parse_args($args, array('before' => '', 'after' => '', 'sep' => ' | ', 'links' => array(bp_get_the_notification_mark_link($user_id), bp_get_the_notification_delete_link($user_id)))); // Build the links. $retval = $r['before'] . implode($r['links'], $r['sep']) . $r['after']; /** * Filters the action links for the current notification. * * @since 1.9.0 * @since 2.6.0 Added the `$r` parameter. * * @param string $retval HTML links for actions to take on single notifications. * @param array $r Array of parsed arguments. */ return apply_filters('bp_get_the_notification_action_links', $retval, $r); }