Skip to:
Content

BuddyPress.org

Changeset 1882


Ignore:
Timestamp:
09/15/2009 12:47:43 AM (16 years ago)
Author:
apeatling
Message:

Restoring missing set and get activity action functions. Fixes #1009 props jeffsayre.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r1878 r1882  
    339339}
    340340
     341function bp_activity_set_action( $component_id, $key, $value ) {
     342    global $bp;
     343
     344    if ( empty( $component_id ) || empty( $key ) || empty( $value ) )
     345        return false;
     346
     347    $bp->activity->actions->{$component_id}->{$key} = apply_filters( 'bp_activity_set_action', array(
     348        'key' => $key,
     349        'value' => $value
     350    ), $component_id, $key, $value );
     351}
     352
     353function bp_activity_get_action( $component_id, $key ) {
     354    global $bp;
     355
     356    if ( empty( $component_id ) || empty( $key ) )
     357        return false;
     358
     359    return apply_filters( 'bp_activity_get_action', $bp->activity->actions->{$component_id}->{$key}, $component_id, $key );
     360}
     361
    341362function bp_activity_check_exists_by_content( $content ) {
    342363    /* Insert the "time-since" placeholder to match the existing content in the DB */
Note: See TracChangeset for help on using the changeset viewer.