Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'et_get_the_author_posts_link' ) ){
- function et_get_the_author_posts_link(){
- global $authordata, $themename;
- $link = sprintf(
- '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
- get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
- esc_attr( sprintf( __( 'Posts by %s', $themename ), get_the_author() ) ),
- get_the_author()
- );
- return apply_filters( 'coauthors_posts_links', $link );
- }
- }
- if ( ! function_exists( 'et_get_comments_popup_link' ) ){
- function et_get_comments_popup_link( $zero = false, $one = false, $more = false ){
- global $themename;
- $id = get_the_ID();
- $number = get_comments_number( $id );
- if ( 0 == $number && !comments_open() && !pings_open() ) return;
- if ( $number > 1 )
- $output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% Comments', $themename) : $more);
- elseif ( $number == 0 )
- $output = ( false === $zero ) ? __('No Comments',$themename) : $zero;
- else // must be one
- $output = ( false === $one ) ? __('1 Comment', $themename) : $one;
- return '<span class="comments-number">' . '<a href="' . esc_url( get_permalink() . '#respond' ) . '">' . apply_filters('comments_number', $output, $number) . '</a>' . '</span>';
- }
- }
- if ( ! function_exists( 'et_postinfo_meta' ) ){
- function et_postinfo_meta( $postinfo, $date_format, $comment_zero, $comment_one, $comment_more ){
- global $themename;
- $postinfo_meta = '';
- if ( in_array( 'author', $postinfo ) ){
- $postinfo_meta .= ' ' . esc_html__('by',$themename) . ' ' .
- coauthors_posts_links();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement