PageRenderTime 37ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://github.com/markjaquith/WordPress
PHP | 66 lines | 48 code | 10 blank | 8 comment | 7 complexity | 8402d816c6fd38d0b0924ef9c80bdbe4 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * The template for displaying posts in the Link post format
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Fourteen
  7. * @since Twenty Fourteen 1.0
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <?php twentyfourteen_post_thumbnail(); ?>
  12. <header class="entry-header">
  13. <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ), true ) && twentyfourteen_categorized_blog() ) : ?>
  14. <div class="entry-meta">
  15. <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
  16. </div><!-- .entry-meta -->
  17. <?php
  18. endif;
  19. if ( is_single() ) :
  20. the_title( '<h1 class="entry-title">', '</h1>' );
  21. else :
  22. the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  23. endif;
  24. ?>
  25. <div class="entry-meta">
  26. <span class="post-format">
  27. <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>"><?php echo get_post_format_string( 'link' ); ?></a>
  28. </span>
  29. <?php twentyfourteen_posted_on(); ?>
  30. <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
  31. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
  32. <?php endif; ?>
  33. <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
  34. </div><!-- .entry-meta -->
  35. </header><!-- .entry-header -->
  36. <div class="entry-content">
  37. <?php
  38. the_content(
  39. sprintf(
  40. /* translators: %s: Post title. */
  41. __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
  42. the_title( '<span class="screen-reader-text">', '</span>', false )
  43. )
  44. );
  45. wp_link_pages(
  46. array(
  47. 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
  48. 'after' => '</div>',
  49. 'link_before' => '<span>',
  50. 'link_after' => '</span>',
  51. )
  52. );
  53. ?>
  54. </div><!-- .entry-content -->
  55. <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
  56. </article><!-- #post-<?php the_ID(); ?> -->