content-gallery.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * @package Spun
  4. * @since Spun 1.0
  5. */
  6. $format = get_post_format();
  7. $content = get_the_content();
  8. $gallery = spun_gallery_shortcode( $content );
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php if ( '' != $gallery ) : ?>
  12. <div class="single-gallery">
  13. <?php echo do_shortcode( $gallery[0] ); ?>
  14. </div>
  15. <?php endif; ?>
  16. <header class="entry-header">
  17. <h1 class="entry-title"><?php the_title(); ?></h1>
  18. </header><!-- .entry-header -->
  19. <div class="entry-content">
  20. <?php the_content(); ?>
  21. </div><!-- .entry-content -->
  22. <footer class="entry-meta">
  23. <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
  24. <span class="comments-link">
  25. <a href="#comments-toggle">
  26. <span class="tail"></span>
  27. <?php echo comments_number( __( '+', 'spun' ), __( '1', 'spun' ), __( '%', 'spun' ) ); ?>
  28. </a>
  29. </span>
  30. <?php endif; ?>
  31. <div class="entry-meta-wrapper">
  32. <span class="post-date">
  33. <?php spun_posted_on(); ?>
  34. </span>
  35. <span class="entry-format">
  36. <a href="<?php echo esc_url( get_post_format_link( $format ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'spun' ), get_post_format_string( $format ) ) ); ?>"><?php echo get_post_format_string( $format ); ?></a>
  37. </span>
  38. <?php
  39. /* translators: used between list items, there is a space after the comma */
  40. $tags_list = get_the_tag_list( '', __( ', ', 'spun' ) );
  41. if ( $tags_list ) :
  42. ?>
  43. <span class="tags-links">
  44. <?php printf( __( '%1$s', 'spun' ), $tags_list ); ?>
  45. </span>
  46. <?php endif; // End if $tags_list ?>
  47. <?php edit_post_link( __( 'Edit', 'spun' ), '<span class="edit-link">', '</span>' ); ?>
  48. </div>
  49. </footer><!-- .entry-meta -->
  50. </article><!-- #post-<?php the_ID(); ?> -->