Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/25/2011 09:42:37 PM (14 years ago)
Author:
djpaul
Message:

Add new view_link parameter to bp_member_latest_update() to control generation of 'view' link or not.
Update members activity stream to not show the "view" links next to users' latest updates, as they can easily click through into the user's profile. See #3241

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-template.php

    r4824 r4858  
    535535}
    536536    function bp_get_member_latest_update( $args = '' ) {
    537         global $members_template, $bp;
     537        global $bp, $members_template;
    538538
    539539        $defaults = array(
    540             'length' => 70
     540            'length'    => 70,
     541            'view_link' => true
    541542        );
    542543
     
    547548            return false;
    548549
    549         $update_content = apply_filters( 'bp_get_activity_latest_update', '"' . trim( strip_tags( bp_create_excerpt( $update['content'], $length ) ) ) . '"' );
    550 
    551         if ( !empty( $update['id'] ) && bp_is_active( 'activity' ) )
     550        $update_content = apply_filters( 'bp_get_activity_latest_update', sprintf( _x( '- " %s "', 'member latest update in member directory', 'buddypress' ), trim( strip_tags( bp_create_excerpt( $update['content'], $length ) ) ) ) );
     551
     552        if ( $view_link && !empty( $update['id'] ) && bp_is_active( 'activity' ) )
    552553            $update_content .= ' <a href="' . bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>';
    553554
Note: See TracChangeset for help on using the changeset viewer.