PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/themes/OneMozilla-Air/content-summary.php

https://github.com/fvignals/One-Mozilla-blog
PHP | 27 lines | 25 code | 2 blank | 0 comment | 4 complexity | 093a890f581abad90f95acad1532e7f5 MD5 | raw file
  1. <?php
  2. $date_format = get_option( 'date_format' );
  3. $time_format = get_option( 'time_format' );
  4. $eventdate = get_post_meta($post->ID, 'eventdate', true);
  5. ?>
  6. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  7. <header class="entry-header">
  8. <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>
  9. </header>
  10. <div class="entry-summary">
  11. <?php if ($eventdate) : ?>
  12. <p class="event-date"><?php echo esc_attr($eventdate); ?></p>
  13. <?php else : ?>
  14. <p class="event-date"><time class="published" datetime="<?php the_time('Y-m-d\TH:i:sP'); ?>"><?php the_time($date_format.' '.$time_format); ?></time></p>
  15. <?php endif; ?>
  16. <a href="<?php the_permalink(); ?>">
  17. <?php if (has_post_thumbnail()) : ?>
  18. <?php the_post_thumbnail(array(68,68), array('alt' => "", 'title' => ""));?>
  19. <?php else : ?>
  20. <img src="<?php echo get_stylesheet_directory_uri(); ?>/img/thumbnail-sm.png" alt="" width="68" height="68" class="wp-post-image">
  21. <?php endif; ?>
  22. </a>
  23. <?php the_excerpt(); ?>
  24. </div><!-- .entry-summary -->
  25. </article><!-- #post-<?php the_ID(); ?> -->