#1978 closed defect (bug) (invalid)
bbp_replace_the_content function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.1.2 |
Component: | General | Keywords: | |
Cc: |
Description
When I start using bbPress the first thing I saw that the page.php file from the template folder is used for displaying all Forums/Topics/Replies and other stuff that is used by the plugin. I imagined that all this content is generated with $wp_query somehow, but as I looked a little in the code I saw that everything works in the other way: replacing with a filter all the content of a post with this function... so now the_content function can not be used for other purposes and is not independent anymore. Why everything works in this way?
I want to apply the_content filters to a text in a widget and what I get is a list of forums or topics but not the text I submitted in the widget...
Change History (7)
#2
in reply to:
↑ 1
@
13 years ago
Replying to johnjamesjacoby :
Things that can be are generated by $wp_query, are. Great care has been taken to make sure everything works the normal way when it can, and WP_Query is used otherwise. This is not a bug, or a defect; it's by design.
But how to use this function apply_filters("the_content") in the same page then?
Instead of getting what I want I will get a list of topics, or forums...
#3
follow-up:
↓ 4
@
13 years ago
- Milestone Awaiting Review deleted
Why do you want to use the 'the_content' filter on something that isn't post or page content?
#4
in reply to:
↑ 3
@
13 years ago
Replying to johnjamesjacoby:
Why do you want to use the 'the_content' filter on something that isn't post or page content?
I created a widget that has WordPress Editor build in, and to apply all filters so the text will display like in a post...
#5
follow-up:
↓ 7
@
12 years ago
You should mirror the default filters that are added to the content, instead of using the_content out of its intended purpose. Other plugins could be doing what bbPress is doing (or worse) and it seems unlikely that you want your sidebar widget to include everything that all plugins would be doing to typical post body copy.
#7
in reply to:
↑ 5
@
12 years ago
Replying to johnjamesjacoby:
You should mirror the default filters that are added to the content, instead of using the_content out of its intended purpose. Other plugins could be doing what bbPress is doing (or worse) and it seems unlikely that you want your sidebar widget to include everything that all plugins would be doing to typical post body copy.
I think bbPress should mirror instead :)
Things that can be are generated by $wp_query, are. Great care has been taken to make sure everything works the normal way when it can, and WP_Query is used otherwise. This is not a bug, or a defect; it's by design.