PageRenderTime 41ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/toolbox/content-single.php

https://bitbucket.org/lgorence/quickpress
PHP | 58 lines | 41 code | 10 blank | 7 comment | 8 complexity | f6c2c4aee47a35f10f99139d9628e47f MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
  1. <?php
  2. /**
  3. * @package Toolbox
  4. */
  5. ?>
  6. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  7. <header class="entry-header">
  8. <h1 class="entry-title"><?php the_title(); ?></h1>
  9. <div class="entry-meta">
  10. <?php toolbox_posted_on(); ?>
  11. </div><!-- .entry-meta -->
  12. </header><!-- .entry-header -->
  13. <div class="entry-content">
  14. <?php the_content(); ?>
  15. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'toolbox' ), 'after' => '</div>' ) ); ?>
  16. </div><!-- .entry-content -->
  17. <footer class="entry-meta">
  18. <?php
  19. /* translators: used between list items, there is a space after the comma */
  20. $category_list = get_the_category_list( __( ', ', 'toolbox' ) );
  21. /* translators: used between list items, there is a space after the comma */
  22. $tag_list = get_the_tag_list( '', ', ' );
  23. if ( ! toolbox_categorized_blog() ) {
  24. // This blog only has 1 category so we just need to worry about tags in the meta text
  25. if ( '' != $tag_list ) {
  26. $meta_text = __( 'This entry was tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'toolbox' );
  27. } else {
  28. $meta_text = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'toolbox' );
  29. }
  30. } else {
  31. // But this blog has loads of categories so we should probably display them here
  32. if ( '' != $tag_list ) {
  33. $meta_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'toolbox' );
  34. } else {
  35. $meta_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'toolbox' );
  36. }
  37. } // end check for categories on this blog
  38. printf(
  39. $meta_text,
  40. $category_list,
  41. $tag_list,
  42. get_permalink(),
  43. the_title_attribute( 'echo=0' )
  44. );
  45. ?>
  46. <?php edit_post_link( __( 'Edit', 'toolbox' ), '<span class="edit-link">', '</span>' ); ?>
  47. </footer><!-- .entry-meta -->
  48. </article><!-- #post-<?php the_ID(); ?> -->