Skip to:
Content

BuddyPress.org

Changeset 1750 for trunk/bp-friends.php


Ignore:
Timestamp:
09/01/2009 02:12:35 AM (17 years ago)
Author:
apeatling
Message:

Further activity action revisions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends.php

    r1749 r1750  
    4747    $bp->friends->format_notification_function = 'friends_format_notifications';
    4848    $bp->friends->slug = BP_FRIENDS_SLUG;
    49 
    50     /* Register the activity stream actions for this component */
    51     friends_register_activity_action( 'friendship_created', __( 'New friendship created', 'buddypress' ) );
    52 
     49   
    5350    /* Register this in the active components array */
    5451    $bp->active_components[$bp->friends->slug] = $bp->friends->id;
     
    326323}
    327324
    328 function friends_register_activity_action( $key, $value ) {
     325function friends_register_activity_actions() {
    329326    global $bp;
    330327   
    331328    if ( !function_exists( 'bp_activity_set_action' ) )
    332329        return false;
    333    
    334     return apply_filters( 'friends_register_activity_action', bp_activity_set_action( $bp->friends->id, $key, $value ), $key, $value );
    335 }
     330
     331    bp_activity_set_action( $bp->friends->id, 'friends_register_activity_action', __( 'New friendship created', 'buddypress' ) );
     332
     333    do_action( 'friends_register_activity_actions' );
     334}
     335add_action( 'plugins_loaded', 'friends_register_activity_actions' );
    336336
    337337function friends_format_notifications( $action, $item_id, $secondary_item_id, $total_items ) {
Note: See TracChangeset for help on using the changeset viewer.