Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'twentyten_posted_in' ) ) :
- /**
- * Prints HTML with meta information for the current post (category, tags and permalink).
- *
- * @since Twenty Ten 1.0
- */
- function twentyten_posted_in() {
- // Retrieves tag list of current post, separated by commas.
- $tag_list = get_the_tag_list( '', ', ' );
- if ( $tag_list ) {
- $posted_in = __( '<br>This post was posted in %1$s and tagged %2$s.', 'twentyten' );
- } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
- $posted_in = __( 'We save you time by listing: %5$s vouchers.
- <br><br>This post was posted in %1$s.<BR><BR><BR> ', 'twentyten' );
- } else {
- $posted_in = __( '<br>Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
- }
- $cat_list = ''; $sep = '';
- foreach(get_the_category($post->ID) as $cat) { $cat_list .= $sep.$cat->name; $sep=', '; }
- // Prints the string, replacing the placeholders.
- printf(
- $posted_in,
- get_the_category_list( ', ' ),
- $tag_list,
- get_permalink(),
- the_title_attribute( 'echo=0' ),
- $cat_list
- );
- }
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement