content-gallery.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * Template part for displaying gallery posts.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Scratchpad
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php scratchpad_sticky(); ?>
  12. <?php
  13. if ( get_post_gallery() && ! post_password_required() ) { ?>
  14. <div class="entry-gallery">
  15. <?php echo get_post_gallery(); ?>
  16. <div class="photo-corners">
  17. <?php
  18. get_template_part( 'images/inline', 'photo-corners.svg' );
  19. get_template_part( 'images/inline', 'photo-corners.svg' );
  20. get_template_part( 'images/inline', 'photo-corners.svg' );
  21. get_template_part( 'images/inline', 'photo-corners.svg' );
  22. ?>
  23. </div><!-- .photo-corners -->
  24. </div><!-- .entry-gallery -->
  25. <?php
  26. } // endif get_post_gallery()
  27. ?>
  28. <header class="entry-header">
  29. <?php if ( ! is_single() ) {
  30. the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
  31. } else {
  32. the_title( '<h2 class="entry-title">', '</h2>' );
  33. } ?>
  34. </header><!-- .entry-header -->
  35. <footer class="entry-meta">
  36. <?php scratchpad_post_format(); ?>
  37. <?php scratchpad_posted_on(); ?>
  38. <?php
  39. edit_post_link(
  40. sprintf(
  41. /* translators: %s: Name of current post */
  42. esc_html__( 'Edit %s', 'scratchpad' ),
  43. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  44. ),
  45. '<span class="edit-link"><span class="sep">&bull;</span>',
  46. '</span>'
  47. );
  48. ?>
  49. </footer><!-- .entry-footer -->
  50. <?php
  51. if ( post_password_required() ) {
  52. the_content();
  53. } ?>
  54. </article><!-- #post-## -->