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-friends/bp-friends-classes.php

    r1052 r1351  
    5050    function save() {
    5151        global $wpdb, $bp;
     52
     53        $this->initiator_user_id = apply_filters( 'friends_friendship_initiator_user_id_before_save', $this->initiator_user_id, $this->id );
     54        $this->friend_user_id = apply_filters( 'friends_friendship_friend_user_id_before_save', $this->friend_user_id, $this->id );
     55        $this->is_confirmed = apply_filters( 'friends_friendship_is_confirmed_before_save', $this->is_confirmed, $this->id );
     56        $this->is_limited = apply_filters( 'friends_friendship_is_limited_before_save', $this->is_limited, $this->id );
     57        $this->date_created = apply_filters( 'friends_friendship_date_created_before_save', $this->date_created, $this->id );
     58
     59        do_action( 'friends_friendship_before_save', $this );       
    5260       
    5361        if ( $this->id ) {
     
    5967            $this->id = $wpdb->insert_id;
    6068        }
     69
     70        do_action( 'friends_friendship_after_save', $this );       
    6171       
    6272        return $result;
Note: See TracChangeset for help on using the changeset viewer.