#13180 closed defect (bug) (invalid)
filter( 'the_content', 'prepend_attachment' ) on attachment pages may be problem
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | lowest | |
| Severity: | minor | Version: | 3.0 |
| Component: | Widgets | Keywords: | |
| Focuses: | Cc: |
Description
I'm not sure if this is a bug or feature: I have created widget where you can put text, and this text is then formated using apply_filters( 'the_content', $text )
it works great, and I think it is the right way, the only problem is on the attachment pages, where the widget text is automaticaly prepended by the attachment image.
the problem is
add_filter( 'the_content', 'prepend_attachment' );
filter on the_content, so it can be easily solved by
remove_filter( 'the_content', 'prepend_attachment' );
but i wonder, if it is not just workaround for a bug. IMHO the image is the content of the attachment page, not something which should be prepended by the_content filter.
Change History (3)
Note: See
TracTickets for help on using
tickets.
The filter
the_contentis reserved for post/page content only. It should not be applied to widgets.Suggesting to close as wontfix.