#3505 closed defect (bug) (fixed)
Audit usage of bp_create_excerpt()
Reported by: | r-a-y | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | minor | Version: | 1.5 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
There are a couple of instances where the updated version of bp_create_excerpt() hasn't been updated in other parts of BP.
The attached patch alters:
- bp_get_group_description_excerpt() - Removed $length argument so it uses the default one in bp_create_excerpt()
- bp_get_member_latest_update() - Removed $length argument so it uses the default one in bp_create_excerpt(); made some changes to how the "View" link is rendered (similar to how bp_activity_truncate_entry() does it)
- bp_get_the_topic_latest_post_excerpt() - Removed arguments altogether. I don't believe this function is even being used at the moment so this should be relatively safe.
---
There are some other instances, but those are the main offenders.
Attachments (3)
Change History (9)
Note: See
TracTickets for help on using
tickets.
Thanks for the patch, r-a-y. Good catch on the length issues.
I would rather not remove arguments where they once existed, if there is no pressing reason to do so. At the very least, if we are going to remove them, they should be properly deprecated.
3505.03.patch adapts .02.patch by reintroducing the arguments you removed. If you've got a reason for deprecating the arguments instead (aside from "we don't use them internally"), speak now or forever hold your peace :)