PageRenderTime 52ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 1ms

/wp-content/themes/twentyfifteen/content-link.php

https://github.com/markjaquith/WordPress
PHP | 64 lines | 46 code | 7 blank | 11 comment | 4 complexity | d63cde233ffef1fa83e5f3738f709454 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * The template for displaying link post formats
  4. *
  5. * Used for both single and index/archive/search.
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Fifteen
  9. * @since Twenty Fifteen 1.0
  10. */
  11. ?>
  12. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  13. <?php twentyfifteen_post_thumbnail(); ?>
  14. <header class="entry-header">
  15. <?php
  16. if ( is_single() ) :
  17. the_title( sprintf( '<h1 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h1>' );
  18. else :
  19. the_title( sprintf( '<h2 class="entry-title"><a href="%s">', esc_url( twentyfifteen_get_link_url() ) ), '</a></h2>' );
  20. endif;
  21. ?>
  22. </header>
  23. <!-- .entry-header -->
  24. <div class="entry-content">
  25. <?php
  26. the_content(
  27. sprintf(
  28. /* translators: %s: Post title. */
  29. __( 'Continue reading %s', 'twentyfifteen' ),
  30. the_title( '<span class="screen-reader-text">', '</span>', false )
  31. )
  32. );
  33. wp_link_pages(
  34. array(
  35. 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfifteen' ) . '</span>',
  36. 'after' => '</div>',
  37. 'link_before' => '<span>',
  38. 'link_after' => '</span>',
  39. 'pagelink' => '<span class="screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>%',
  40. 'separator' => '<span class="screen-reader-text">, </span>',
  41. )
  42. );
  43. ?>
  44. </div>
  45. <!-- .entry-content -->
  46. <?php
  47. // Author bio.
  48. if ( is_single() && get_the_author_meta( 'description' ) ) :
  49. get_template_part( 'author-bio' );
  50. endif;
  51. ?>
  52. <footer class="entry-footer">
  53. <?php twentyfifteen_entry_meta(); ?>
  54. <?php edit_post_link( __( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
  55. </footer>
  56. <!-- .entry-footer -->
  57. </article><!-- #post-<?php the_ID(); ?> -->