Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/28/2010 06:01:42 PM (14 years ago)
Author:
apeatling
Message:

Merged activity delete functions for better usability. Fixed some issues with the group extension API and plugin compatibility in 1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r2463 r2471  
    298298    function bp_get_activity_user_link() {
    299299        global $activities_template;
    300         return apply_filters( 'bp_get_activity_user_link', bp_core_get_user_domain( $activities_template->activity->user_id, $activities_template->activity->user_nicename, $activities_template->activity->user_login ) );
     300
     301        if ( empty( $activities_template->activity->user_id ) )
     302            $link = $activities_template->activity->primary_link;
     303        else
     304            $link = bp_core_get_user_domain( $activities_template->activity->user_id, $activities_template->activity->user_nicename, $activities_template->activity->user_login );
     305
     306        return apply_filters( 'bp_get_activity_user_link', $link );
    301307    }
    302308
     
    446452            return false;
    447453
     454        if ( empty( $parent_activity->content ) )
     455            $content = $parent_activity->action;
     456        else
     457            $content = $parent_activity->action . $parent_activity->content;
     458
    448459        /* Remove the time since content */
    449         $parent_activity->content = str_replace( '<span class="time-since">%s</span>', '', $parent_activity->content );
     460        $content = str_replace( '<span class="time-since">%s</span>', '', $content );
    450461
    451462        /* Remove images */
    452         $parent_activity->content = preg_replace( '/<img[^>]*>/Ui', '', $parent_activity->content );
    453 
    454         return apply_filters( 'bp_get_activity_parent_content', $parent_activity->content );
     463        $content = preg_replace( '/<img[^>]*>/Ui', '', $content );
     464
     465        return apply_filters( 'bp_get_activity_parent_content', $content );
    455466    }
    456467
Note: See TracChangeset for help on using the changeset viewer.