Skip to:
Content

BuddyPress.org

Ticket #6141: 6141.2.patch

File 6141.2.patch, 1.5 KB (added by boonebgorges, 9 years ago)
  • src/bp-activity/bp-activity-functions.php

    diff --git src/bp-activity/bp-activity-functions.php src/bp-activity/bp-activity-functions.php
    index 66b7415..50acac1 100644
    function bp_activity_generate_action_string( $activity ) { 
    12491249        }
    12501250
    12511251        // Check for registered format callback
    1252         if ( empty( buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'] ) ) {
     1252        $actions = bp_activity_get_actions();
     1253        if ( empty( $actions->{$activity->component}->{$activity->type}['format_callback'] ) ) {
    12531254                return false;
    12541255        }
    12551256
    12561257        // We apply the format_callback as a filter
    1257         add_filter( 'bp_activity_generate_action_string', buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 );
     1258        add_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 );
    12581259
    12591260        /**
    12601261         * Filters the string for the activity action being returned.
    function bp_activity_generate_action_string( $activity ) { 
    12671268        $action = apply_filters( 'bp_activity_generate_action_string', $activity->action, $activity );
    12681269
    12691270        // Remove the filter for future activity items
    1270         remove_filter( 'bp_activity_generate_action_string', buddypress()->activity->actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 );
     1271        remove_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 );
    12711272
    12721273        return $action;
    12731274}