PageRenderTime 50ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

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

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 78 lines | 60 code | 14 blank | 4 comment | 5 complexity | 37189e3832e38f68d62f19169eeeace3 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Toolbox
  5. */
  6. get_header(); ?>
  7. <div id="primary">
  8. <div id="content" role="main">
  9. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  10. <nav id="nav-above">
  11. <h1 class="section-heading"><?php _e( 'Post navigation', 'toolbox' ); ?></h1>
  12. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'toolbox' ) . '</span> %title' ); ?></div>
  13. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'toolbox' ) . '</span>' ); ?></div>
  14. </nav><!-- #nav-above -->
  15. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  16. <header class="entry-header">
  17. <h1 class="entry-title"><?php the_title(); ?></h1>
  18. <div class="entry-meta">
  19. <?php
  20. printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'toolbox' ),
  21. get_permalink(),
  22. get_the_date( 'c' ),
  23. get_the_date(),
  24. get_author_posts_url( get_the_author_meta( 'ID' ) ),
  25. sprintf( esc_attr__( 'View all posts by %s', 'toolbox' ), get_the_author() ),
  26. get_the_author()
  27. );
  28. ?>
  29. </div><!-- .entry-meta -->
  30. </header><!-- .entry-header -->
  31. <div class="entry-content">
  32. <?php the_content(); ?>
  33. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'toolbox' ), 'after' => '</div>' ) ); ?>
  34. </div><!-- .entry-content -->
  35. <footer class="entry-meta">
  36. <?php
  37. $tag_list = get_the_tag_list( '', ', ' );
  38. if ( '' != $tag_list ) {
  39. $utility_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' );
  40. } else {
  41. $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'toolbox' );
  42. }
  43. printf(
  44. $utility_text,
  45. get_the_category_list( ', ' ),
  46. $tag_list,
  47. get_permalink(),
  48. the_title_attribute( 'echo=0' )
  49. );
  50. ?>
  51. <?php edit_post_link( __( 'Edit', 'toolbox' ), '<span class="edit-link">', '</span>' ); ?>
  52. </footer><!-- .entry-meta -->
  53. </article><!-- #post-<?php the_ID(); ?> -->
  54. <nav id="nav-below">
  55. <h1 class="section-heading"><?php _e( 'Post navigation', 'toolbox' ); ?></h1>
  56. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'toolbox' ) . '</span> %title' ); ?></div>
  57. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'toolbox' ) . '</span>' ); ?></div>
  58. </nav><!-- #nav-below -->
  59. <?php comments_template( '', true ); ?>
  60. <?php endwhile; // end of the loop. ?>
  61. </div><!-- #content -->
  62. </div><!-- #primary -->
  63. <?php get_sidebar(); ?>
  64. <?php get_footer(); ?>