This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

coauthors

By: zwrodgers on Mar 6th, 2013  |  syntax: None  |  size: 1.68 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if ( ! function_exists( 'et_get_the_author_posts_link' ) ){
  2.  
  3.  function et_get_the_author_posts_link(){
  4.  
  5.   global $authordata, $themename;
  6.  
  7.  
  8.  
  9.   $link = sprintf(
  10.  
  11.    '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
  12.  
  13.    get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
  14.  
  15.    esc_attr( sprintf( __( 'Posts by %s', $themename ), get_the_author() ) ),
  16.  
  17.    get_the_author()
  18.  
  19.   );
  20.  
  21.   return apply_filters( 'coauthors_posts_links', $link );
  22.  
  23.  }
  24.  
  25. }
  26.  
  27.  
  28.  
  29. if ( ! function_exists( 'et_get_comments_popup_link' ) ){
  30.  
  31.  function et_get_comments_popup_link( $zero = false, $one = false, $more = false ){
  32.  
  33.   global $themename;
  34.  
  35.  
  36.  
  37.   $id = get_the_ID();
  38.  
  39.   $number = get_comments_number( $id );
  40.  
  41.  
  42.  
  43.   if ( 0 == $number && !comments_open() && !pings_open() ) return;
  44.  
  45.  
  46.  
  47.   if ( $number > 1 )
  48.  
  49.    $output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% Comments', $themename) : $more);
  50.  
  51.   elseif ( $number == 0 )
  52.  
  53.    $output = ( false === $zero ) ? __('No Comments',$themename) : $zero;
  54.  
  55.   else // must be one
  56.  
  57.    $output = ( false === $one ) ? __('1 Comment', $themename) : $one;
  58.  
  59.  
  60.  
  61.   return '<span class="comments-number">' . '<a href="' . esc_url( get_permalink() . '#respond' ) . '">' . apply_filters('comments_number', $output, $number) . '</a>' . '</span>';
  62.  
  63.  }
  64.  
  65. }
  66.  
  67.  
  68.  
  69. if ( ! function_exists( 'et_postinfo_meta' ) ){
  70.  
  71.  function et_postinfo_meta( $postinfo, $date_format, $comment_zero, $comment_one, $comment_more ){
  72.  
  73.   global $themename;
  74.  
  75.  
  76.  
  77.   $postinfo_meta = '';
  78.  
  79.  
  80.  
  81.   if ( in_array( 'author', $postinfo ) ){
  82.  
  83.    $postinfo_meta .= ' ' . esc_html__('by',$themename) . ' ' .
  84.  
  85. coauthors_posts_links();
  86.  
  87.   }
clone this paste RAW Paste Data