Skip to:
Content

BuddyPress.org

Ticket #1009: jeffsayre_1009_bp_activity.patch

File jeffsayre_1009_bp_activity.patch, 1.4 KB (added by jeffsayre, 16 years ago)
  • Users/jeffsayre/Desktop/BuddyPress

     
    316316        return true;
    317317}
    318318
     319function bp_activity_set_action( $component_id, $key, $value ) {
     320        global $bp;
     321       
     322        if ( empty( $component_id ) || empty( $key ) || empty( $value ) )
     323                return false;
     324     
     325                $bp->activity->actions->{$component_id}->{$key} = apply_filters( 'bp_activity_set_action', array(
     326                                'key' => $key,
     327                                'value' => $value
     328                ), $component_id, $key, $value );
     329}
     330       
     331function bp_activity_get_action( $component_id, $key ) {
     332        global $bp;
     333               
     334        if ( empty( $component_id ) || empty( $key ) )
     335                return false;
     336       
     337        return apply_filters( 'bp_activity_get_action', $bp->activity->actions->{$component_id}->{$key}, $component_id, $key );
     338}
     339       
     340function groups_get_activity_action( $key ) {
     341        if ( !function_exists( 'bp_activity_get_action' ) )
     342                return false;
     343               
     344                return apply_filters( 'groups_get_activity_action', bp_activity_get_action( $key ), $key );
     345}
     346       
    319347function bp_activity_add_timesince_placeholder( $content ) {
    320348        /* Check a time-since span doesn't already exist */
    321349        if ( false === strpos( $content, '<span class="time-since">' ) ) {