Skip to:
Content

BuddyPress.org

#9026 closed defect (bug) (fixed)

Members loop: the link to view a member's latest activity is always output even if it hasn't been truncated

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version: 1.2
Component: Members Keywords: has-patch
Cc:

Description

Working on optimizing BuddyPress for the Twenty Twenty-Four theme, I noticed unlike what this comment was saying:

/*
 * If `$view_link` is true and the text returned by `bp_create_excerpt()` is different
 * from the original text (ie it's been truncated), add the "View" link.
 */

The link to view the single activity is always shown, no matter the activity was truncated or not.

Change History (2)

This ticket was mentioned in PR #193 on buddypress/buddypress by @imath.


10 months ago
#1

  • Keywords has-patch added; needs-patch removed

Improve bp_get_member_latest_update():

  • removing extract() usage.
  • making sure to only display a button to view the full activity if it has been truncated
  • adding a new parameter to the 'bp_get_member_latest_update' filter. This parameter contains all needed data to reset the excerpt.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9026

#2 @imath
10 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13647:

Only add a link to view member's latest update if it's been truncated

  • Stop using extract() in bp_get_member_latest_update()
  • Add a new $update parameter to the 'bp_get_member_latest_update' filter. This array contains all needed data to reset the member's latest update.

Fixes #9026
Closes https://github.com/buddypress/buddypress/pull/193

Note: See TracTickets for help on using tickets.