Opened 11 years ago
Closed 11 years ago
#2354 closed enhancement (fixed)
Add filter for dropdown arguments in bbp_get_dropdown
Reported by: | nofearinc | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.4 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | Tools - Code Improvements | Keywords: | |
Cc: |
Description
bbp_get_dropdown
in includes/common/template-tags.php is fetching entries with get_posts
based on input arguments for all bbPress dropdown filters. The arguments passed to get_posts could not be filtered from plugins.
I would suggest adding a filter to the get_posts
arguments array for external manipulation for dropdowns.
Attachments (1)
Change History (8)
#1
@
11 years ago
Is this something you can solve using the passive and aggressive filters in bbp_parse_args()
- bbp_before_get_dropdown_parse_args
- bbp_after_get_dropdown_parse_args
#2
@
11 years ago
- Keywords close added; has-patch removed
- Resolution set to invalid
- Status changed from new to closed
Yes, bbp_after_get_dropdown_parse_args
would do the work here, thanks
#4
@
11 years ago
- Keywords close removed
- Resolution invalid deleted
- Status changed from closed to reopened
I'm reopening this ticket as the post_status
is set after the filter in question.
This snippet could be found after those filters, before get_posts in template-tags.php
:
// Define local variable(s) $post_stati = array(); // Public $post_stati[] = bbp_get_public_status_id();
Therefore I cannot modify the post status.
includes/common/template-tags.php filter added for get_posts args