Skip to:
Content

BuddyPress.org

Changeset 2733 for trunk/bp-activity.php


Ignore:
Timestamp:
02/16/2010 12:33:39 PM (16 years ago)
Author:
apeatling
Message:

Moving delete activity actions before the delete to make sure plugins can access activity details, before they are deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r2695 r2733  
    348348        return false;
    349349
     350    /* Call the action before the delete so plugins can still fetch information about it */
     351    do_action( 'bp_activity_action_delete_activity', $activity_id, $activity->user_id );
     352
    350353    /* Now delete the activity item */
    351     if ( bp_activity_delete( array( 'id' => $activity_id, 'user_id' => $activity->user_id  ) ) )
     354    if ( bp_activity_delete( array( 'id' => $activity_id, 'user_id' => $activity->user_id ) ) )
    352355        bp_core_add_message( __( 'Activity deleted', 'buddypress' ) );
    353356    else
    354357        bp_core_add_message( __( 'There was an error when deleting that activity', 'buddypress' ), 'error' );
    355 
    356     do_action( 'bp_activity_action_delete_activity', $activity_id );
    357358
    358359    bp_core_redirect( wp_get_referer() );
Note: See TracChangeset for help on using the changeset viewer.