Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/20/2011 06:25:30 PM (14 years ago)
Author:
djpaul
Message:

Add before delete hooks to Friends and Activity components (see #2773). Props kunalb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r3771 r3772  
    245245
    246246    // Call the action before the delete so plugins can still fetch information about it
    247     do_action( 'bp_activity_action_delete_activity', $_POST['id'], $activity->user_id );
     247    do_action( 'bp_activity_before_action_delete_activity', $_POST['id'], $activity->user_id );
    248248
    249249    if ( !bp_activity_delete( array( 'id' => $_POST['id'], 'user_id' => $activity->user_id ) ) ) {
     
    252252    }
    253253
     254    do_action( 'bp_activity_action_delete_activity', $_POST['id'], $activity->user_id );
     255
    254256    return true;
    255257}
     
    278280
    279281    /* Call the action before the delete so plugins can still fetch information about it */
    280     do_action( 'bp_activity_action_delete_activity', $_POST['id'], $comment->user_id );
     282    do_action( 'bp_activity_before_action_delete_activity', $_POST['id'], $comment->user_id );
    281283
    282284    if ( !bp_activity_delete_comment( $comment->item_id, $comment->id ) ) {
     
    284286        return false;
    285287    }
     288
     289    do_action( 'bp_activity_action_delete_activity', $_POST['id'], $comment->user_id );
    286290
    287291    return true;
Note: See TracChangeset for help on using the changeset viewer.