display_name : '' ); ?>,
comment_post_ID ) ) ) { continue; } // uncomment to skip comments on protected posts. Hi Emma ;) $post = get_post( $comment->comment_post_ID ); setup_postdata( $post ); //shrink the post title if > 35 chars $post_title_short = mb_strimwidth( get_the_title( $post->ID ), 0, 35, '…' ); if ( post_password_required( $post ) ) { //hide comment author in protected posts $com_auth = __( 'someone','shiword' ); } else { //shrink the comment author if > 20 chars $com_auth = mb_strimwidth( $comment->comment_author, 0, 20, '…' ); } $output .= '
  • '. $com_auth . ' ' . __( 'on', 'shiword' ) . ' ' . $post_title_short . '
    '; if ( post_password_required( $post ) ) { $output .= '[' . __( 'No preview: this is a comment of a protected post', 'shiword' ) . ']'; } else { $output .= get_comment_excerpt( $comment->comment_ID ); } $output .= '
  • '; } } else { $output .= '
  • ' . __( 'No comments yet.', 'shiword' ) . '
  • '; } if ( $echo ) echo $output; else return $output; } } // Get Recent Entries if ( !function_exists( 'shiword_get_recententries' ) ) { function shiword_get_recententries( $number = 10 ) { $r = new WP_Query(array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true)); if ($r->have_posts()) { while ($r->have_posts()) { $r->the_post(); $post_title = get_the_title(); //shrink the post title if > 35 chars $post_title_short = mb_strimwidth( $post_title, 0, 35, '…' ); $post_auth = mb_strimwidth( get_the_author(), 0, 20, '…' ); echo '
  • ' . $post_title_short . ' ' . sprintf( __( 'by %s', 'shiword' ), $post_auth ) . '
    '; if ( post_password_required() ) { echo 'thumb'; echo '[' . __('No preview: this is a protected post', 'shiword' ) . ']'; } else { echo shiword_get_the_thumb( get_the_ID(), 50, 50, 'alignleft' ); the_excerpt(); } echo '
  • '; } } wp_reset_postdata(); } } // Get Categories List (with posts related) if ( !function_exists( 'shiword_get_categories_wpr' ) ) { function shiword_get_categories_wpr() { $args=array( 'orderby' => 'count', 'number' => 10, 'order' => 'DESC' ); $categories = get_categories( $args ); foreach( $categories as $category ) { $cat_title = category_description( $category->cat_ID ) ? esc_attr( strip_tags( category_description( $category->cat_ID ) ) ) : sprintf( __( 'View all posts in %s', 'shiword' ), $category->name ); echo '
  • ' . $category->name . ' (' . $category->count . ')
    ' . __( 'Recent Posts', 'shiword' ) . '
  • '; } } } ?>