Skip to:
Content

BuddyPress.org

Changeset 4623


Ignore:
Timestamp:
07/06/2011 08:05:40 PM (15 years ago)
Author:
boonebgorges
Message:

Global cleanups and documentation for notification formatting functions

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-activity.php

    r4620 r4623  
    5252add_action( 'bp_register_activity_actions', 'friends_register_activity_actions' );
    5353
     54/**
     55 * Format the BuddyBar/admin bar notifications for the Friends component
     56 *
     57 * @package BuddyPress
     58 *
     59 * @param str $action The kind of notification being rendered
     60 * @param int $item_id The primary item id
     61 * @param int $secondary_item_id The secondary item id
     62 * @param int $total_items The total number of messaging-related notifications waiting for the user
     63 * @param str $format 'string' for BuddyBar-compatible notifications; 'array' for WP Admin Bar
     64 */
    5465function friends_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    5566        global $bp;
     
    5768        switch ( $action ) {
    5869                case 'friendship_accepted':
    59                         $link = bp_loggedin_user_domain() . $bp->friends->slug . '/my-friends/newest';
     70                        $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/newest';
    6071                       
    6172                        // Set up the string and the filter
  • trunk/bp-messages/bp-messages-functions.php

    r4622 r4623  
    244244                $return = apply_filters( $filter, array(
    245245                        'text' => $text,
    246                         'link' => $at_mention_link
    247                 ), $at_mention_link, (int)$total_items, $text, $link );
     246                        'link' => $link
     247                ), $link, (int)$total_items, $text, $link );
    248248        }
    249249
Note: See TracChangeset for help on using the changeset viewer.