Skip to:
Content

BuddyPress.org

Changeset 4858


Ignore:
Timestamp:
07/25/2011 09:42:37 PM (13 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

Location:
trunk
Files:
2 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
  • trunk/bp-themes/bp-default/members/members-loop.php

    r3810 r4858  
    4949                    <?php if ( bp_get_member_latest_update() ) : ?>
    5050
    51                         <span class="update"> - <?php bp_member_latest_update( 'length=10' ); ?></span>
     51                        <span class="update"> <?php bp_member_latest_update( array( 'length' => 10, 'view_link' => false ) ); ?></span>
    5252
    5353                    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.