Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/19/2009 12:21:53 PM (17 years ago)
Author:
apeatling
Message:

Added value filters and before and after actions to all save() methods.

File:
1 edited

Legend:

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

    r1338 r1351  
    4545    function save() {
    4646        global $wpdb, $bp, $current_user;
     47       
     48        do_action( 'bp_activity_before_save', $this );
    4749
    4850        if ( !$this->item_id || !$this->user_id || $this->is_private || !$this->component_name )
     
    7072                $sitewide_cached = $wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->activity->table_name_sitewide} ( user_id, item_id, secondary_item_id, content, primary_link, component_name, component_action, date_cached, date_recorded ) VALUES ( %d, %d, %d, %s, %s, %s, %s, FROM_UNIXTIME(%d), FROM_UNIXTIME(%d) )", $this->user_id, $this->item_id, $this->secondary_item_id, $activity_content['content'], $activity_content['primary_link'], $this->component_name, $this->component_action, time(), $this->date_recorded ) );
    7173           
    72             if ( $activity && $activity_cached )
     74            if ( $activity && $activity_cached ) {
     75                do_action( 'bp_activity_after_save', $this );
    7376                return true;
     77            }
    7478           
    7579            return false;
Note: See TracChangeset for help on using the changeset viewer.