Skip to:

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#5709 closed enhancement (fixed)

Sites count in main navigation not filterable

Reported by: needle's profile needle Owned by: boonebgorges's profile boonebgorges
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Blogs Keywords: has-patch


On line 129 of 'bp-blogs/bp-blogs-loader.php', BP uses bp_blogs_total_blogs_for_user() to retrieve the number of sites for a user and build the menu item. The return value from this function is not passed through any filters, so cannot be overridden. If bp_get_total_blog_count_for_user() is used instead, then the count can be filtered.

Attachments (1)

5709.patch (658 bytes) - added by needle 10 years ago.

Download all attachments as: .zip

Change History (4)

10 years ago

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.1
  • Type changed from defect (bug) to enhancement

Looks good to me. (Note for posterity that bp_get_total_blog_count_for_user() is a wrapper for bp_blogs_total_blogs_for_user() (for whatever reason).)

#2 @boonebgorges
10 years ago

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

In 8508:

Use bp_get_total_blog_count_for_user() when setting up blog nav

This allows the value to be filtered by plugins.

Fixes #5709

Props needle

#3 @johnjamesjacoby
8 years ago

2 years later, just running into this now -- r8508 was the appropriate fix.

bp_get_total_blog_count_for_user() is the Template specific variation of bp_blogs_total_blogs_for_user() which stems from BuddyPress's old approach to having a built-in functional abstraction layer between template output and database requests.

Note: See TracTickets for help on using tickets.