Skip to:
Content

BuddyPress.org

Changeset 854


Ignore:
Timestamp:
01/16/2009 09:00:46 PM (15 years ago)
Author:
apeatling
Message:

Added filters to all activity and notification formatting functions.

Location:
trunk
Files:
6 edited

Legend:

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

    r641 r854  
    173173    }
    174174   
     175    $content_new = '';
     176   
    175177    for ( $i = 0; $i < count($content); $i++ )
    176178        $content_new .= $content[$i];
  • trunk/bp-blogs.php

    r847 r854  
    253253            if ( !$user_id )
    254254                return false;
     255           
     256            $blog_url = get_blog_option( $blog->blog_id, 'siteurl' );
     257            $user_link = bp_core_get_userlink($user_id);
     258            $blog_name = get_blog_option( $blog->blog_id, 'blogname' );
    255259               
    256260            return array(
    257                 'primary_link' => get_blog_option( $blog->blog_id, 'siteurl' ),
    258                 'content' => sprintf( __( '%s created a new blog: %s', 'buddypress' ), bp_core_get_userlink($user_id), '<a href="' . get_blog_option( $blog->blog_id, 'siteurl' ) . '">' . get_blog_option( $blog->blog_id, 'blogname' ) . '</a>' ) . ' <span class="time-since">%s</span>'
     261                'primary_link' => $blog_url,
     262                'content' => apply_filters( 'bp_blogs_new_blog_activity', sprintf( __( '%s created a new blog: %s', 'buddypress' ), $user_link, '<a href="' . $blog_url . '">' . $blog_name . '</a>' ) . ' <span class="time-since">%s</span>', $user_link, $blog_url, $blog_name )
    259263            ); 
    260264        break;
     
    271275
    272276            $post_link = bp_post_get_permalink( $post, $post->blog_id );
    273             $content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink($user_id), '<a href="' . $post_link . '">' . $post->post_title . '</a>' ) . ' <span class="time-since">%s</span>';     
     277            $user_link = bp_core_get_userlink($user_id);
     278           
     279            $content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), $user_link, '<a href="' . $post_link . '">' . $post->post_title . '</a>' ) . ' <span class="time-since">%s</span>';     
    274280            $content .= '<blockquote>' . bp_create_excerpt($post->post_content) . '</blockquote>';
     281           
     282            $content = apply_filters( 'bp_blogs_new_post_activity', $content, $user_link, $post );
    275283           
    276284            return array(
     
    294302                return false;
    295303               
    296             $post_link = bp_post_get_permalink( $comment->post, $comment->blog_id );
    297             $content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink($user_id), '<a href="' . $post_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' ) . ' <span class="time-since">%s</span>';           
     304            $comment_link = bp_post_get_permalink( $comment->post, $comment->blog_id );
     305            $user_link = bp_core_get_userlink($user_id);
     306           
     307            $content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), $user_link, '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' ) . ' <span class="time-since">%s</span>';           
    298308            $content .= '<blockquote>' . bp_create_excerpt($comment->comment_content) . '</blockquote>';
     309           
     310            $content = apply_filters( 'bp_blogs_new_comment_activity', $content, $user_link, $comment );
    299311
    300312            return array(
  • trunk/bp-friends.php

    r805 r854  
    227227           
    228228            if ( $for_secondary_user ) {
     229               
     230                $user_1 = bp_core_get_userlink( $friendship->initiator_user_id );
     231                $user_2 = bp_core_get_userlink($friendship->friend_user_id, false, false, true);
     232               
    229233                return array(
    230234                    'primary_link' => bp_core_get_userlink( $friendship->friend_user_id, false, true ),
    231                     'content' => sprintf( __( '%s and %s are now friends', 'buddypress' ), bp_core_get_userlink( $friendship->initiator_user_id ), bp_core_get_userlink($friendship->friend_user_id, false, false, true) ) . ' <span class="time-since">%s</span>'
     235                    'content' => apply_filters( 'bp_friends_friendship_accepted_activity', sprintf( __( '%s and %s are now friends', 'buddypress' ), $user_1, $user_2 ) . ' <span class="time-since">%s</span>', $user_1, $user_2 )
    232236                );             
    233237            } else {
     238                $user_1 = bp_core_get_userlink( $friendship->friend_user_id );
     239                $user_2 = bp_core_get_userlink($friendship->initiator_user_id);
     240               
    234241                return array(
    235242                    'primary_link' => bp_core_get_userlink( $friendship->friend_user_id, false, true ),
    236                     'content' => sprintf( __( '%s and %s are now friends', 'buddypress' ), bp_core_get_userlink( $friendship->friend_user_id ), bp_core_get_userlink($friendship->initiator_user_id) ) . ' <span class="time-since">%s</span>'
     243                    'content' => apply_filters( 'bp_friends_friendship_accepted_activity', sprintf( __( '%s and %s are now friends', 'buddypress' ), bp_core_get_userlink( $friendship->friend_user_id ), bp_core_get_userlink($friendship->initiator_user_id) ) . ' <span class="time-since">%s</span>', $user_1, $user_2 )
    237244                );             
    238245            }
     
    250257        case 'friendship_accepted':
    251258            if ( (int)$total_items > 1 ) {
    252                 return '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/my-friends/newest" title="' . __( 'My Friends', 'buddypress' ) . '">' . sprintf( __('%d friends accepted your friendship requests'), (int)$total_items ) . '</a>';     
     259                return apply_filters( 'bp_friends_multiple_friendship_accepted_notification', '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/my-friends/newest" title="' . __( 'My Friends', 'buddypress' ) . '">' . sprintf( __('%d friends accepted your friendship requests'), (int)$total_items ) . '</a>', (int)$total_items );     
    253260            } else {
    254261                $user_fullname = bp_core_global_user_fullname( $item_id );
    255262                $user_url = bp_core_get_userurl( $item_id );
    256                 return '<a href="' . $user_url . '?new" title="' . $user_fullname .'\'s profile">' . sprintf( __('%s accepted your friendship request'), $user_fullname ) . '</a>';
     263                return apply_filters( 'bp_friends_single_friendship_accepted_notification', '<a href="' . $user_url . '?new" title="' . $user_fullname .'\'s profile">' . sprintf( __('%s accepted your friendship request'), $user_fullname ) . '</a>', $user_fullname );
    257264            }   
    258265        break;
     
    260267        case 'friendship_request':
    261268            if ( (int)$total_items > 1 ) {
    262                 return '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests'), (int)$total_items ) . '</a>';     
     269                return apply_filters( 'bp_friends_multiple_friendship_request_notification', '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests'), (int)$total_items ) . '</a>', $total_items );       
    263270            } else {
    264271                $user_fullname = bp_core_global_user_fullname( $item_id );
    265272                $user_url = bp_core_get_userurl( $item_id );
    266                 return '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s'), $user_fullname ) . '</a>';
     273                return apply_filters( 'bp_friends_single_friendship_request_notification', '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s'), $user_fullname ) . '</a>', $user_fullname );
    267274            }   
    268275        break;
  • trunk/bp-groups.php

    r849 r854  
    866866            if ( !$group )
    867867                return false;
     868               
     869            $user_link = bp_core_get_userlink($user_id);
     870            $group_link = bp_group_permalink( $group, false );
    868871           
    869872            return array(
    870873                'primary_link' => bp_group_permalink( $group, false ),
    871                 'content' => sprintf( __('%s joined the group %s', 'buddypress'), bp_core_get_userlink($user_id),  '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>'
     874                'content' => apply_filters( 'bp_groups_joined_group_activity', sprintf( __('%s joined the group %s', 'buddypress'), $user_link,  '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>', $user_link, $group_link, $group->name )
    872875            );             
    873876        break;
     
    878881                return false;
    879882           
     883            $user_link = bp_core_get_userlink($user_id);
     884            $group_link = bp_group_permalink( $group, false );
     885           
    880886            return array(
    881887                'primary_link' => bp_group_permalink( $group, false ),
    882                 'content' => sprintf( __('%s created the group %s', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>') . ' <span class="time-since">%s</span>'
     888                'content' => apply_filters( 'bp_groups_created_group_activity', sprintf( __('%s created the group %s', 'buddypress'), $user_link, '<a href="' . $group_link . '">' . $group->name . '</a>') . ' <span class="time-since">%s</span>', $user_link, $group_link, $group->name )
    883889            );
    884890        break;
     
    889895            if ( !$group || !$wire_post || !$wire_post->content )
    890896                return false;       
     897
     898            $user_link = bp_core_get_userlink($user_id);
     899            $group_link = bp_group_permalink( $group, false );
     900            $post_excerpt = bp_create_excerpt($wire_post->content);
    891901                   
    892             $content = sprintf ( __('%s wrote on the wire of the group %s', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';         
    893             $content .= '<blockquote>' . bp_create_excerpt($wire_post->content) . '</blockquote>';
     902            $content = sprintf ( __('%s wrote on the wire of the group %s', 'buddypress'), $user_link, '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';         
     903            $content .= '<blockquote>' . $post_excerpt . '</blockquote>';
     904           
     905            $content = apply_filters( 'bp_groups_new_wire_post_activity', $content, $user_link, $group_link, $group->name, $post_excerpt );
    894906           
    895907            return array(
     
    907919                    return false;       
    908920
    909                 $content = sprintf ( __('%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';           
    910                 $content .= '<blockquote>' . apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) ) . '</blockquote>';
     921                $user_link = bp_core_get_userlink($user_id);
     922                $group_link = bp_group_permalink( $group, false );
     923               
     924                $post_content = apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) );
     925           
     926                $content = sprintf ( __('%s posted on the forum topic %s in the group %s:', 'buddypress'), $user_link, '<a href="' . $group_link . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';           
     927                $content .= '<blockquote>' . $post_content . '</blockquote>';
     928               
     929                $content = apply_filters( 'bp_groups_new_forum_post_activity', $content, $user_link, $group_link, $forum_topic['topic_id'], $forum_topic['topic_title'], $group_link, $group->name, $post_content );
    911930
    912931                return array(
     
    923942
    924943                if ( !$group || !$forum_post || !$forum_topic )
    925                     return false;       
    926 
    927                 $content = sprintf ( __('%s created the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . bp_group_permalink( $group, false ) . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . bp_group_permalink( $group, false ) . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';         
    928                 $content .= '<blockquote>' . apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) ) . '</blockquote>';
     944                    return false;
     945                   
     946                $user_link = bp_core_get_userlink($user_id);
     947                $group_link = bp_group_permalink( $group, false );
     948               
     949                $post_content = apply_filters( 'bp_the_topic_post_content', stripslashes( $forum_post['post_text'] ) );
     950               
     951                $content = sprintf ( __('%s created the forum topic %s in the group %s:', 'buddypress'), $uesr_link, '<a href="' . $group_link . '/forum/topic/' . $forum_topic['topic_id'] . '">' . $forum_topic['topic_title'] . '</a>', '<a href="' . $group_link . '">' . $group->name . '</a>' ) . ' <span class="time-since">%s</span>';         
     952                $content .= '<blockquote>' . $post_content . '</blockquote>';
     953               
     954                $content = apply_filters( 'bp_groups_new_forum_topic_activity', $content, $user_link, $group_link, $forum_topic['topic_id'], $forum_topic['topic_title'], $group_link, $group->name, $post_content );
    929955
    930956                return array(
     
    949975            $group = new BP_Groups_Group( $group_id, false, false );
    950976           
     977            $group_link = bp_group_permalink( $group, false );
     978           
    951979            if ( (int)$total_items > 1 ) {
    952                 return '<a href="' . bp_group_permalink( $group, false ) . '/admin/membership-requests/" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . sprintf( __('%d new membership requests for the group "%s"'), (int)$total_items, $group->name ) . '</a>';     
     980                return apply_filters( 'bp_groups_multiple_new_membership_requests_notification', '<a href="' . $group_link . '/admin/membership-requests/" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . sprintf( __('%d new membership requests for the group "%s"'), (int)$total_items, $group->name ) . '</a>', $group_link, $total_items, $group->name );     
    953981            } else {
    954982                $user_fullname = bp_core_global_user_fullname( $requesting_user_id );
    955                 return '<a href="' . bp_group_permalink( $group, false ) . '/admin/membership-requests/" title="' . $user_fullname .' requests group membership">' . sprintf( __('%s requests membership for the group "%s"'), $user_fullname, $group->name ) . '</a>';
     983                return apply_filters( 'bp_groups_single_new_membership_request_notification', '<a href="' . $group_link . '/admin/membership-requests/" title="' . $user_fullname .' requests group membership">' . sprintf( __('%s requests membership for the group "%s"'), $user_fullname, $group->name ) . '</a>', $group_link, $user_fullname, $group->name );
    956984            }   
    957985        break;
     
    961989           
    962990            $group = new BP_Groups_Group( $group_id, false, false );
     991            $group_link = bp_group_permalink( $group, false )  . '/?new';
    963992           
    964993            if ( (int)$total_items > 1 ) {
    965                 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d accepted group membership requests'), (int)$total_items, $group->name ) . '</a>';     
     994                return apply_filters( 'bp_groups_multiple_membership_request_accepted_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d accepted group membership requests'), (int)$total_items, $group->name ) . '</a>', $total_items, $group_name );     
    966995            } else {
    967                 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('Membership for group "%s" accepted'), $group->name ) . '</a>';
     996                return apply_filters( 'bp_groups_single_membership_request_accepted_notification', '<a href="' . $group_link . '">' . sprintf( __('Membership for group "%s" accepted'), $group->name ) . '</a>', $group_link, $group->name );
    968997            }   
    969998        break;
     
    9731002           
    9741003            $group = new BP_Groups_Group( $group_id, false, false );
     1004            $group_link = bp_group_permalink( $group, false )  . '/?new';
    9751005           
    9761006            if ( (int)$total_items > 1 ) {
    977                 return '<a href="' . site_url() . '/' . MEMBERS_SLUG . '/' . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d rejected group membership requests'), (int)$total_items, $group->name ) . '</a>';     
     1007                return apply_filters( 'bp_groups_multiple_membership_request_rejected_notification', '<a href="' . site_url() . '/' . MEMBERS_SLUG . '/' . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('%d rejected group membership requests'), (int)$total_items, $group->name ) . '</a>', $total_items, $group->name );     
    9781008            } else {
    979                 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('Membership for group "%s" rejected'), $group->name ) . '</a>';
     1009                return apply_filters( 'bp_groups_single_membership_request_rejected_notification', '<a href="' . $group_link . '">' . sprintf( __('Membership for group "%s" rejected'), $group->name ) . '</a>', $group_link, $group->name );
    9801010            }   
    9811011       
     
    9861016       
    9871017            $group = new BP_Groups_Group( $group_id, false, false );
    988 
     1018            $group_link = bp_group_permalink( $group, false )  . '/?new';
     1019           
    9891020            if ( (int)$total_items > 1 ) {
    990                 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to an admin in %d groups'), (int)$total_items ) . '</a>';     
     1021                return apply_filters( 'bp_groups_multiple_member_promoted_to_admin_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to an admin in %d groups'), (int)$total_items ) . '</a>', $total_items );       
    9911022            } else {
    992                 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('You were promoted to an admin in the group %s'), $group->name ) . '</a>';
     1023                return apply_filters( 'bp_groups_single_member_promoted_to_admin_notification', '<a href="' . $group_link . '">' . sprintf( __('You were promoted to an admin in the group %s'), $group->name ) . '</a>', $group_link, $group->name );
    9931024            }   
    9941025        break;
     
    9981029   
    9991030            $group = new BP_Groups_Group( $group_id, false, false );
    1000 
     1031            $group_link = bp_group_permalink( $group, false )  . '/?new';
     1032           
    10011033            if ( (int)$total_items > 1 ) {
    1002                 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to a mod in %d groups'), (int)$total_items ) . '</a>';     
     1034                return apply_filters( 'bp_groups_multiple_member_promoted_to_mod_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '" title="' . __( 'Groups', 'buddypress' ) . '">' . sprintf( __('You were promoted to a mod in %d groups'), (int)$total_items ) . '</a>', $total_items );       
    10031035            } else {
    1004                 return '<a href="' . bp_group_permalink( $group, false ) . '/?new">' . sprintf( __('You were promoted to a mod in the group %s'), $group->name ) . '</a>';
     1036                return apply_filters( 'bp_groups_single_member_promoted_to_mod_notification', '<a href="' . $group_link . '">' . sprintf( __('You were promoted to a mod in the group %s'), $group->name ) . '</a>', $group_link, $group->name );
    10051037            }   
    10061038        break;
     
    10131045           
    10141046            if ( (int)$total_items > 1 ) {
    1015                 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have %d new group invitations'), (int)$total_items ) . '</a>';       
     1047                return apply_filters( 'bp_groups_multiple_group_invite_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have %d new group invitations'), (int)$total_items ) . '</a>', $total_items );     
    10161048            } else {
    1017                 return '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have an invitation to the group: %s'), $group->name ) . '</a>';
     1049                return apply_filters( 'bp_groups_single_group_invite_notification', '<a href="' . $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites" title="' . __( 'Group Invites', 'buddypress' ) . '">' . sprintf( __('You have an invitation to the group: %s'), $group->name ) . '</a>', $group->name );
    10181050            }   
    10191051        break;
  • trunk/bp-messages.php

    r805 r854  
    361361    if ( $action == 'new_message') {
    362362        if ( (int)$total_items > 1 )
    363             return '<a href="' . $bp['loggedin_domain'] . $bp['messages']['slug'] . '/inbox" title="Inbox">' . sprintf( __('You have %d new messages'), (int)$total_items ) . '</a>';       
     363            return apply_filters( 'bp_messages_multiple_new_message_notification', '<a href="' . $bp['loggedin_domain'] . $bp['messages']['slug'] . '/inbox" title="Inbox">' . sprintf( __('You have %d new messages'), (int)$total_items ) . '</a>', $total_items );       
    364364        else
    365             return '<a href="' . $bp['loggedin_domain'] . $bp['messages']['slug'] . '/inbox" title="Inbox">' . sprintf( __('You have %d new message'), (int)$total_items ) . '</a>';
     365            return apply_filters( 'bp_messages_single_new_message_notification', '<a href="' . $bp['loggedin_domain'] . $bp['messages']['slug'] . '/inbox" title="Inbox">' . sprintf( __('You have %d new message'), (int)$total_items ) . '</a>', $total_items );
    366366    }
    367367}
  • trunk/bp-xprofile.php

    r816 r854  
    517517            if ( !$wire_post )
    518518                return false;
    519 
     519           
    520520            if ( ( $wire_post->item_id == $bp['loggedin_userid'] && $wire_post->user_id == $bp['loggedin_userid'] ) || ( $wire_post->item_id == $bp['current_userid'] && $wire_post->user_id == $bp['current_userid'] ) ) {
    521521               
    522                 $content = sprintf( __('%s wrote on their own wire', 'buddypress'), bp_core_get_userlink($wire_post->user_id) ) . ': <span class="time-since">%s</span>';               
     522                $from_user_link = bp_core_get_userlink($wire_post->user_id);
     523                $to_user_link = false;
     524                               
     525                $content = sprintf( __('%s wrote on their own wire', 'buddypress'), $from_user_link ) . ': <span class="time-since">%s</span>';             
    523526                $return_values['primary_link'] = bp_core_get_userlink( $wire_post->user_id, false, true );
    524527           
    525528            } else if ( ( $wire_post->item_id != $bp['loggedin_userid'] && $wire_post->user_id == $bp['loggedin_userid'] ) || ( $wire_post->item_id != $bp['current_userid'] && $wire_post->user_id == $bp['current_userid'] ) ) {
    526529           
    527                 $content = sprintf( __('%s wrote on %s wire', 'buddypress'), bp_core_get_userlink($wire_post->user_id), bp_core_get_userlink( $wire_post->item_id, false, false, true, true ) ) . ': <span class="time-since">%s</span>';           
     530                $from_user_link = bp_core_get_userlink($wire_post->user_id);
     531                $to_user_link = bp_core_get_userlink( $wire_post->item_id, false, false, true, true );
     532               
     533                $content = sprintf( __('%s wrote on %s wire', 'buddypress'), $from_user_link, $to_user_link ) . ': <span class="time-since">%s</span>';         
    528534                $return_values['primary_link'] = bp_core_get_userlink( $wire_post->item_id, false, true );
    529535           
     
    531537           
    532538            if ( $content != '' ) {
    533                 $content .= '<blockquote>' . bp_create_excerpt($wire_post->content) . '</blockquote>';
     539                $post_excerpt = bp_create_excerpt($wire_post->content);
     540               
     541                $content .= '<blockquote>' . $post_excerpt . '</blockquote>';
    534542                $return_values['content'] = $content;
     543               
     544                $return_values['content'] = apply_filters( 'bp_xprofile_new_wire_post_activity', $content, $from_user_link, $to_user_link, $post_excerpt );
     545               
    535546                return $return_values;
    536547            }
     
    544555                return false;
    545556           
     557            $user_link = bp_core_get_userlink($user_id);
     558           
    546559            return array(
    547560                'primary_link' => bp_core_get_userlink( $user_id, false, true ),
    548                 'content' => sprintf( __('%s updated the "%s" information on their profile', 'buddypress'), bp_core_get_userlink($user_id), '<a href="' . $bp['current_domain'] . $bp['profile']['slug'] . '">' . $profile_group->name . '</a>' ) . ' <span class="time-since">%s</span>'
     561                'content' => apply_filters( 'bp_xprofile_updated_profile_activity', sprintf( __('%s updated the "%s" information on their profile', 'buddypress'), $user_link, '<a href="' . $bp['current_domain'] . $bp['profile']['slug'] . '">' . $profile_group->name . '</a>' ) . ' <span class="time-since">%s</span>', $user_link, $profile_group->name )
    549562            );
    550563        break;
     
    572585    if ( $action == 'new_wire_post') {
    573586        if ( (int)$total_items > 1 ) {
    574             return '<a href="' . $bp['loggedin_domain'] . $bp['wire']['slug'] . '" title="Wire">' . sprintf( __('You have %d new posts on your wire'), (int)$total_items ) . '</a>';       
     587            return apply_filters( 'bp_xprofile_multiple_new_wire_post_notification', '<a href="' . $bp['loggedin_domain'] . $bp['wire']['slug'] . '" title="Wire">' . sprintf( __('You have %d new posts on your wire'), (int)$total_items ) . '</a>', $total_items );     
    575588        } else {
    576589            $user_fullname = bp_core_global_user_fullname( $item_id );
    577             return '<a href="' . $bp['loggedin_domain'] . $bp['wire']['slug'] . '" title="Wire">' . sprintf( __('%s posted on your wire'), $user_fullname ) . '</a>';
     590            return apply_filters( 'bp_xprofile_single_new_wire_post_notification', '<a href="' . $bp['loggedin_domain'] . $bp['wire']['slug'] . '" title="Wire">' . sprintf( __('%s posted on your wire'), $user_fullname ) . '</a>', $user_fullname );
    578591        }
    579592    }
Note: See TracChangeset for help on using the changeset viewer.