#5709 closed enhancement (fixed)
Sites count in main navigation not filterable
Reported by: | needle | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Blogs | Keywords: | has-patch |
Cc: |
Description
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)
Change History (4)
#1
@
10 years ago
- Milestone changed from Awaiting Review to 2.1
- Type changed from defect (bug) to enhancement
#2
@
10 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 8508:
#3
@
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.
Looks good to me. (Note for posterity that
bp_get_total_blog_count_for_user()
is a wrapper forbp_blogs_total_blogs_for_user()
(for whatever reason).)