Advertisement
alchymyth

list vouchers

Aug 20th, 2011
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. if ( ! function_exists( 'twentyten_posted_in' ) ) :
  2. /**
  3. * Prints HTML with meta information for the current post (category, tags and permalink).
  4. *
  5. * @since Twenty Ten 1.0
  6. */
  7. function twentyten_posted_in() {
  8. // Retrieves tag list of current post, separated by commas.
  9. $tag_list = get_the_tag_list( '', ', ' );
  10. if ( $tag_list ) {
  11. $posted_in = __( '<br>This post was posted in %1$s and tagged %2$s.', 'twentyten' );
  12. } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
  13. $posted_in = __( 'We save you time by listing: %5$s vouchers.
  14. <br><br>This post was posted in %1$s.<BR><BR><BR> ', 'twentyten' );
  15. } else {
  16. $posted_in = __( '<br>Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
  17. }
  18. $cat_list = ''; $sep = '';
  19. foreach(get_the_category($post->ID) as $cat) { $cat_list .= $sep.$cat->name; $sep=', '; }
  20. // Prints the string, replacing the placeholders.
  21. printf(
  22. $posted_in,
  23. get_the_category_list( ', ' ),
  24. $tag_list,
  25. get_permalink(),
  26. the_title_attribute( 'echo=0' ),
  27. $cat_list
  28. );
  29. }
  30. endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement