[wp-hackers] the_tags does not apply_filters('the_tags')

Silverstein, Jesse Jesse.Silverstein at xerox.com
Mon Apr 6 19:22:22 GMT 2009

Wow, that was a lot of extra line breaks. Guess I shouldn't write to
this list in html.
Anyway, update:
The exact same code goes back as far as WP 2.5.1 (that's as far back I
can check readily). That leads me to believe it IS the desired behavior,
but I don't understand why.

Isn't standard practice for templates to have <?php the_tags(); ?> or
some variant of that? That's how all the templates I've checked display
tags, including WP Default and WP Classic. And if it is standard,
shouldn't "the_tags" filter be called during that function?

Dev-feedback would be appreciated.

-Jesse Silverstein

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of
Silverstein, Jesse
Sent: Monday, April 06, 2009 3:09 PM
To: wp-hackers at lists.automattic.com
Subject: [wp-hackers] the_tags does not apply_filter('the_tags')

As the subject states, calling the_tags() does not
apply_filters('the_tags', ...) In order to get the filter applied, you
have to call get_the_tag_list()

At least in 2.8-bleeding.


Is this the desired behavior?


If not, it could be fixed by changing:


function the_tags( $before = 'Tags: ', $sep = ', ', $after = '' ) {

     return the_terms( 0, 'post_tag', $before, $sep, $after );





function the_tags( $before = 'Tags: ', $sep = ', ', $after = '' ) {

     return get_the_tag_list ( $before, $sep, $after );



-Jesse Silverstein

wp-hackers mailing list
wp-hackers at lists.automattic.com

More information about the wp-hackers mailing list