Skip to:
Content

BuddyPress.org

Changeset 2381 for trunk/bp-xprofile.php


Ignore:
Timestamp:
01/20/2010 04:21:20 PM (16 years ago)
Author:
apeatling
Message:

Standardizing activity stream fields and splitting the action from the content for better manageability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile.php

    r2359 r2381  
    484484    $defaults = array(
    485485        'user_id' => $bp->loggedin_user->id,
    486         'content' => false,
    487         'primary_link' => false,
    488         'component_name' => $bp->profile->id,
    489         'component_action' => false,
     486        'action' => '',
     487        'content' => '',
     488        'primary_link' => '',
     489        'component' => $bp->profile->id,
     490        'type' => false,
    490491        'item_id' => false,
    491492        'secondary_item_id' => false,
     
    497498    extract( $r, EXTR_SKIP );
    498499
    499     return bp_activity_add( array( 'user_id' => $user_id, 'content' => $content, 'primary_link' => $primary_link, 'component_name' => $component_name, 'component_action' => $component_action, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide ) );
     500    return bp_activity_add( array( 'user_id' => $user_id, 'action' => $action, 'content' => $content, 'primary_link' => $primary_link, 'component' => $component, 'type' => $type, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide ) );
    500501}
    501502
     
    516517    if ( function_exists('bp_activity_delete_by_item_id') ) {
    517518        extract($args);
    518         bp_activity_delete_by_item_id( array( 'item_id' => $item_id, 'component_name' => $bp->profile->id, 'component_action' => $component_action, 'user_id' => $user_id, 'secondary_item_id' => $secondary_item_id ) );
     519        bp_activity_delete_by_item_id( array( 'item_id' => $item_id, 'component' => $bp->profile->id, 'type' => $type, 'user_id' => $user_id, 'secondary_item_id' => $secondary_item_id ) );
    519520    }
    520521}
Note: See TracChangeset for help on using the changeset viewer.