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

    r1280 r1351  
    3939        global $wpdb, $bp;
    4040       
    41         $this->content = wp_filter_kses( $this->content );
     41        $this->item_id = apply_filters( 'bp_wire_post_item_id_before_save', $this->item_id, $this->id );
     42        $this->user_id = apply_filters( 'bp_wire_post_user_id_before_save', $this->user_id, $this->id );
     43        $this->content = apply_filters( 'bp_wire_post_content_before_save', $this->content, $this->id );
     44        $this->date_posted = apply_filters( 'bp_wire_post_date_posted_before_save', $this->date_posted, $this->id );
     45
     46        do_action( 'bp_wire_post_before_save', $this );     
    4247       
    4348        if ( $this->id ) {
     
    7984        if ( !$this->id )
    8085            $this->id = $wpdb->insert_id;
     86
     87        do_action( 'bp_wire_post_after_save', $this );     
    8188       
    8289        return $result;
Note: See TracChangeset for help on using the changeset viewer.