PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/lgorence/quickpress
PHP | 61 lines | 49 code | 7 blank | 5 comment | 13 complexity | 4756f0dfe5634b29cf681c69a3f8b23a 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"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'toolbox' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  9. <?php if ( 'post' == get_post_type() ) : ?>
  10. <div class="entry-meta">
  11. <?php toolbox_posted_on(); ?>
  12. </div><!-- .entry-meta -->
  13. <?php endif; ?>
  14. </header><!-- .entry-header -->
  15. <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  16. <div class="entry-summary">
  17. <?php the_excerpt(); ?>
  18. </div><!-- .entry-summary -->
  19. <?php else : ?>
  20. <div class="entry-content">
  21. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'toolbox' ) ); ?>
  22. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'toolbox' ), 'after' => '</div>' ) ); ?>
  23. </div><!-- .entry-content -->
  24. <?php endif; ?>
  25. <footer class="entry-meta">
  26. <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
  27. <?php
  28. /* translators: used between list items, there is a space after the comma */
  29. $categories_list = get_the_category_list( __( ', ', 'toolbox' ) );
  30. if ( $categories_list && toolbox_categorized_blog() ) :
  31. ?>
  32. <span class="cat-links">
  33. <?php printf( __( 'Posted in %1$s', 'toolbox' ), $categories_list ); ?>
  34. </span>
  35. <span class="sep"> | </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( '', __( ', ', 'toolbox' ) );
  40. if ( $tags_list ) :
  41. ?>
  42. <span class="tag-links">
  43. <?php printf( __( 'Tagged %1$s', 'toolbox' ), $tags_list ); ?>
  44. </span>
  45. <span class="sep"> | </span>
  46. <?php endif; // End if $tags_list ?>
  47. <?php endif; // End if 'post' == get_post_type() ?>
  48. <?php if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>
  49. <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'toolbox' ), __( '1 Comment', 'toolbox' ), __( '% Comments', 'toolbox' ) ); ?></span>
  50. <span class="sep"> | </span>
  51. <?php endif; ?>
  52. <?php edit_post_link( __( 'Edit', 'toolbox' ), '<span class="edit-link">', '</span>' ); ?>
  53. </footer><!-- #entry-meta -->
  54. </article><!-- #post-<?php the_ID(); ?> -->