[wp-hackers] the_tags weirdness

Otto otto at ottodestruct.com
Mon Sep 22 18:37:06 GMT 2008


Can somebody explain to me how this makes the slightest bit of sense?

function get_the_tag_list( $before = '', $sep = '', $after = '' ) {
	return apply_filters( 'the_tags', get_the_term_list(0, 'post_tag',
$before, $sep, $after) );
}

function the_tags( $before = 'Tags: ', $sep = ', ', $after = '' ) {
	return the_terms( 0, 'post_tag', $before, $sep, $after );
}

Note that "the_terms" basically echos the results of get_the_term_list().


Suggested refactoring:

function the_tags( $before = 'Tags: ', $sep = ', ', $after = '' ) {
	echo get_the_tag_list($before, $sep, $after );
}


More information about the wp-hackers mailing list