Skip to:
Content

BuddyPress.org

Ticket #695: filter-needed.patch

File filter-needed.patch, 1.3 KB (added by nicolagreco, 15 years ago)
  • .

     
    5959                        $activity = $wpdb->query( $wpdb->prepare( "INSERT INTO {$this->table_name} ( item_id, secondary_item_id, user_id, component_name, component_action, date_recorded, is_private, no_sitewide_cache ) VALUES ( %d, %d, %d, %s, %s, FROM_UNIXTIME(%d), %d, %d )", $this->item_id, $this->secondary_item_id, $this->user_id, $this->component_name, $this->component_action, $this->date_recorded, $this->is_private, $this->no_sitewide_cache ) );
    6060
    6161                        // Fetch the formatted activity content so we can add it to the cache.
    62                         if ( function_exists( $bp->{$this->component_name}->format_activity_function ) ) {
    63                                 if ( !$activity_content = call_user_func( $bp->{$this->component_name}->format_activity_function, $this->item_id, $this->user_id, $this->component_action, $this->secondary_item_id, $this->for_secondary_user ) )
     62
     63                        $callback = apply_filter( "bp_activity_format_{$this->component_name}", $bp->{$this->component_name}->format_activity_function )
     64
     65                        if ( function_exists( $callback ) ) {
     66                                if ( !$activity_content = call_user_func( $callback, $this->item_id, $this->user_id, $this->component_action, $this->secondary_item_id, $this->for_secondary_user ) )
    6467                                        return false;
    6568                        }
    6669