PageRenderTime 50ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/content.php

https://github.com/kcssm/news
PHP | 61 lines | 48 code | 7 blank | 6 comment | 13 complexity | 522a00faf24853dc502cb6cfe6c8cbe4 MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php
  2. /**
  3. * @package _gpp
  4. * @since _gpp 1.0
  5. */
  6. ?>
  7. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  8. <header class="entry-header">
  9. <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', '_gpp' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  10. <?php if ( 'post' == get_post_type() ) : ?>
  11. <div class="entry-meta">
  12. <?php _gpp_posted_on(); ?>
  13. </div><!-- .entry-meta -->
  14. <?php endif; ?>
  15. </header><!-- .entry-header -->
  16. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  17. <div class="entry-summary">
  18. <?php the_excerpt(); ?>
  19. </div><!-- .entry-summary -->
  20. <?php else : ?>
  21. <div class="entry-content">
  22. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', '_gpp' ) ); ?>
  23. <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', '_gpp' ), 'after' => '</div>' ) ); ?>
  24. </div><!-- .entry-content -->
  25. <?php endif; ?>
  26. <footer class="entry-meta">
  27. <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
  28. <?php
  29. /* translators: used between list items, there is a space after the comma */
  30. $categories_list = get_the_category_list( __( ', ', '_gpp' ) );
  31. if ( $categories_list && _gpp_categorized_blog() ) :
  32. ?>
  33. <span class="cat-links">
  34. <?php printf( __( 'Posted in %1$s', '_gpp' ), $categories_list ); ?>
  35. </span>
  36. <?php endif; // End if categories ?>
  37. <?php
  38. /* translators: used between list items, there is a space after the comma */
  39. $tags_list = get_the_tag_list( '', __( ', ', '_gpp' ) );
  40. if ( $tags_list ) :
  41. ?>
  42. <span class="sep"> | </span>
  43. <span class="tag-links">
  44. <?php printf( __( 'Tagged %1$s', '_gpp' ), $tags_list ); ?>
  45. </span>
  46. <?php endif; // End if $tags_list ?>
  47. <?php endif; // End if 'post' == get_post_type() ?>
  48. <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
  49. <span class="sep"> | </span>
  50. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', '_gpp' ), __( '1 Comment', '_gpp' ), __( '% Comments', '_gpp' ) ); ?></span>
  51. <?php endif; ?>
  52. <?php edit_post_link( __( 'Edit', '_gpp' ), '<span class="sep"> | </span><span class="edit-link">', '</span>' ); ?>
  53. </footer><!-- #entry-meta -->
  54. </article><!-- #post-<?php the_ID(); ?> -->