[wp-trac] [WordPress Trac] #13180: filter( 'the_content', 'prepend_attachment' ) on attachment pages may be problem
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 29 21:48:44 UTC 2010
#13180: filter( 'the_content', 'prepend_attachment' ) on attachment pages may be
problem
--------------------------+-------------------------------------------------
Reporter: thomask | Owner: azaozz
Type: defect (bug) | Status: new
Priority: lowest | Milestone: Future Release
Component: Widgets | Version: 3.0
Severity: minor | Keywords:
--------------------------+-------------------------------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13180>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list