Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#4998 closed enhancement (fixed)

bp_total_mention_count_for_user() et al should default to displayed user

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 1.8 Priority: low
Severity: minor Version:
Component: Core Keywords:
Cc:

Description

It'd make these functions a bit easier to use if bp_total_mention_count_for_user() and the other "_count_" functions defaulted to the displayed user when no param is passed. (displayed rather than loggedin because they're most often used to generate values for profile tabs)

I'm posting a ticket before just making the change because there might be backward compatibility issues with plugins/themes taking advantage of the current behavior. I can't think of anything obvious off the top of my head that would be actively broken, but I thought I'd open it for discussion.

Change History (3)

#1 @r-a-y
11 years ago

I think this should be fine. I also can't see an instance where this would break anything.

#2 @boonebgorges
11 years ago

  • Milestone changed from Awaiting Review to 1.8
  • Owner set to boonebgorges
  • Status changed from new to assigned

Thanks for having a look, r-a-y. This should be an easy fix. I'll do it for 1.8.

#3 @boonebgorges
11 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 7129:

Fall back on displayed user id in some activity template functions

In bp_get_total_favorite_count_for_user() and
bp_get_total_mention_count_for_user(), it's convenient to default to the
displayed user id when no id is passed manually.

Fixes #4998

Note: See TracTickets for help on using tickets.