Opened 13 years ago
Closed 13 years ago
#1828 closed enhancement (invalid)
bbp_theme_before/after_forum_sub_forums inconsistency
Reported by: | JarretC | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0 |
Component: | API - Actions/Filters | Keywords: | has-patch |
Cc: |
Description
If you currently hook into bbp_theme_before_forum_sub_forums or bbp_theme_after_forum_sub_forums content isn't echoed where you might expect it to be.
add_action( 'bbp_theme_before_forum_sub_forums', 'jc_before_forum_sub_forums' ); function jc_before_forum_sub_forums() { echo 'Hello world!'; }
You'll see in the image subforum-test-1.png that the output is returned in the same exact place that do_action( 'bbp_theme_after_forum_title' ); returns it's output as well. If you ask me this somewhat makes bbp_theme_before/after_forum_sub_forums somewhat useless as there are already actions there to place content.
I propose an addition of args to the bbp_list_forums() function that allow us to place content within the default unordered list of the subforums but before the actual links are displayed. Which if you ask me makes more sense and places the content in the correct area where you might possibly want to add something in.
The patch adds 'list_before' and 'list_after' arguments to the bbp_list_forums() function. If this is acceptable we could most likely do away with bbp_theme_before/after_forum_sub_forums actions.
You can see where the content is placed with the addition of the new argument in subforum-test-2.png which was added using
bbp_list_forums( array( 'list_before' => 'Subforums: ' ) );
Three things:
Closing as invalid, as there are at least a few alternatives.