Advertisement
alchymyth

twenty ten comment number single post

Mar 22nd, 2011
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. //mod to show comment numbers with anchor link in single post//
  2. function twentyten_posted_on() {
  3.     $comment_number_addon = (is_single()) ? ', %4$s' : '';
  4.     printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ).$comment_number_addon,
  5.         'meta-prep meta-prep-author',
  6.         sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
  7.             get_bloginfo('wpurl').'/'.get_the_date('Y/m'),
  8.             esc_attr( get_the_time() ),
  9.             get_the_date()
  10.         ),
  11.         sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
  12.             get_author_posts_url( get_the_author_meta( 'ID' ) ),
  13.             sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
  14.             get_the_author()
  15.         ),
  16.         sprintf( '<span class="meta-comment-count"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
  17.             '#comments', // use #comments to jump to top of comments; use #respond to jump to comment form
  18.             'jump to comments', // link alt text
  19.             (get_comments_number() != 1) ? get_comments_number().' comments' : get_comments_number().' comment'  // comments number
  20.         )
  21.     );
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement