PageRenderTime 45ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/themes/OneMozilla/content-summary.php

https://github.com/fvignals/One-Mozilla-blog
PHP | 39 lines | 33 code | 6 blank | 0 comment | 16 complexity | c423556b1f596c7e6075238a87b5251c MD5 | raw file
  1. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  2. <header class="entry-header">
  3. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permanent link to &ldquo;%s&rdquo;', 'onemozilla' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  4. <?php if ( 'post' == get_post_type() ) : // No posted date for Pages ?>
  5. <p class="entry-posted">
  6. <time class="published" title="<?php the_time('Y-m-d\TH:i:sP'); ?>" datetime="<?php the_time('Y-m-d\TH:i:sP'); ?>">
  7. <a class="posted-month" href="<?php echo get_month_link(get_the_time('Y'), get_the_time('m')); ?>" title="<?php printf( __( 'See all posts from %s', 'onemozilla' ), get_the_time('F, Y') ); ?>"><?php strftime(the_time('M')); ?></a>
  8. <span class="posted-date"><?php the_time('j'); ?></span>
  9. <a class="posted-year" href="<?php echo get_year_link(get_the_time('Y'), get_the_time('y')); ?>" title="<?php printf( __( 'See all posts from %s', 'onemozilla' ), get_the_time('Y') ); ?>"><?php the_time('Y'); ?></a>
  10. </time>
  11. </p>
  12. <?php endif; ?>
  13. <?php if ( $options['hide_author'] != 1 ) : ?>
  14. <address class="vcard"><cite class="author fn"><a class="url" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) ?>" title="<?php printf( esc_attr__('See all %1$s posts by %2$s', 'onemozilla'), the_author_posts(), the_author())?>"><?php the_author() ?> <?php echo get_avatar(get_the_author_meta('user_email'), 24) ?></a></cite></address>
  15. <?php endif; ?>
  16. <?php $comment_count = get_comments_number($post->ID);
  17. if ( comments_open() || pings_open() || ($comment_count > 0) ) : ?>
  18. <p class="entry-comments"><a href="<?php comments_link() ?>" title="<?php if($comment_count > 0) { printf(_n( '1 response', '%d responses', $comment_count, 'onemozilla'), $comment_count); } else { _e('No responses yet'); } ?>"><?php if ($comment_count > 999) : comments_number('0','1','1000+'); else : comments_number('0','1','%'); endif; ?></a></p>
  19. <?php endif; ?>
  20. </header>
  21. <div class="entry-summary">
  22. <?php if (has_post_thumbnail()) : ?><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array(68,68), array('alt' => "", 'title' => ""));?></a><?php endif; ?>
  23. <?php the_excerpt(); ?>
  24. </div><!-- .entry-summary -->
  25. <?php if ( has_tag() || ( 'post' == get_post_type() ) ) : // No need for a footer if there's nothing to show ?>
  26. <footer class="entry-meta">
  27. <?php if (has_tag()) : ?>
  28. <p class="meta"><b><?php _e('Tags','onemozilla'); ?>:</b> <?php $tags_list = the_tags('',', ',''); ?></p>
  29. <?php endif; ?>
  30. <p class="meta"><b><?php _e('Categories','onemozilla'); ?>:</b> <?php the_category(', ') ?></p>
  31. </footer>
  32. <?php endif; ?>
  33. </article><!-- #post -->