content-link.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Template part for displaying posts with the Link format
  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. <header class="entry-header">
  13. <?php
  14. /* Uses URL from post's link for title link, unless one doesn't exist. */
  15. the_title( '<h2 class="entry-title"><a href="' . esc_url( scratchpad_get_link_url() ) . '" rel="bookmark">', '</a></h2>' ); ?>
  16. </header><!-- .entry-header -->
  17. <div class="entry-content">
  18. <?php
  19. the_content( sprintf(
  20. /* translators: %s: Name of current post. */
  21. wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'scratchpad' ), array( 'span' => array( 'class' => array() ) ) ),
  22. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  23. ) );
  24. wp_link_pages( array(
  25. 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'scratchpad' ),
  26. 'after' => '</div>',
  27. 'link_before' => '<span>',
  28. 'link_after' => '</span>',
  29. ) );
  30. ?>
  31. </div><!-- .entry-content -->
  32. <footer class="entry-meta">
  33. <?php scratchpad_post_format(); ?>
  34. <?php scratchpad_posted_on(); ?>
  35. <?php
  36. edit_post_link(
  37. sprintf(
  38. /* translators: %s: Name of current post */
  39. esc_html__( 'Edit %s', 'scratchpad' ),
  40. the_title( '<span class="screen-reader-text">"', '"</span>', false )
  41. ),
  42. '<span class="edit-link"><span class="sep">&bull;</span>',
  43. '</span>'
  44. );
  45. ?>
  46. </footer><!-- .entry-footer -->
  47. <?php get_template_part( 'images/inline', 'binderclip.svg' ); ?>
  48. </article><!-- #post-## -->