Opened 14 years ago
Last modified 4 years ago
#10275 reopened defect (bug)
Filter logic has been put into the template loader while it not belongs there.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | Themes | Keywords: | dev-feedback |
Focuses: | template | Cc: |
Description
Some time ago, filter logic has been introduced in the template-loader. Looks like a fix for the inability to handle attachments propperly (WP misses more and more a strict request parsing so that newer features tend to introduce more and more bugs).
The code has not been removed yet. It should be removed there or put into a more appropriate location.
The code in question is:
remove_filter('the_content', 'prepend_attachment');
in /wp-inclueds/template-loader.php around line 30.
Change History (8)
#4
@
11 years ago
- Keywords needs-patch removed
- Resolution set to maybelater
- Status changed from new to closed
#6
@
9 years ago
- Focuses template added
- Resolution maybelater deleted
- Status changed from closed to reopened
Is it planned to remove this filter in one of the next releases? I think this hack should be removed from code, otherwise you'll see the attachments image on the attachment page if you're using the the_content filter for compiling shortcodes in widgets or somewhere else.
For theme developers it should be very easy to add a new line of code to their single-attachment.php (or use map the attachment image to the post_thumbnail function). If you want I can publish a patch...
related: #6357 , code in question was introduced by ryan