PageRenderTime 42ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/news/attachment.php

https://bitbucket.org/lgorence/quickpress
PHP | 87 lines | 43 code | 35 blank | 9 comment | 4 complexity | bd493cdc31289bb9580245d5e7e0050c MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
  1. <?php
  2. /**
  3. * Attachment Template
  4. *
  5. * This is the default attachment template. It is used when visiting the singular view of a post attachment
  6. * page (images, videos, audio, etc.).
  7. *
  8. * @package News
  9. * @subpackage Template
  10. */
  11. get_header(); ?>
  12. <?php do_atomic( 'before_content' ); // Before content hook ?>
  13. <div id="content">
  14. <?php do_atomic( 'open_content' ); // Open content hook ?>
  15. <div class="hfeed">
  16. <?php if ( have_posts() ) : ?>
  17. <?php while ( have_posts() ) : the_post(); ?>
  18. <?php do_atomic( 'before_entry' ); // Before loop hook ?>
  19. <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
  20. <?php do_atomic( 'open_entry' ); // Open loop hook ?>
  21. <?php echo apply_atomic_shortcode( 'entry_utility', '<div class="entry-utility">' . __( '[entry-print-link] [entry-email-link] [entry-popup-shortlink]', 'news' ) . '</div>' ); ?>
  22. <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
  23. <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . __( 'By [entry-author] on [entry-published] [entry-terms taxonomy="category" before=" in "] [entry-edit-link before=" | "]', 'news' ) . '</div>' ); ?>
  24. <div class="entry-content">
  25. <?php if ( wp_attachment_is_image( get_the_ID() ) ) : ?>
  26. <p class="attachment-image">
  27. <img class="aligncenter" src="<?php echo wp_get_attachment_url(); ?>" alt="<?php the_title_attribute(); ?>" title="<?php the_title_attribute(); ?>" />
  28. </p><!-- .attachment-image -->
  29. <?php else : ?>
  30. <?php hybrid_attachment(); ?>
  31. <p class="download">
  32. <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="enclosure" type="<?php echo get_post_mime_type(); ?>"><?php printf( __( 'Download &quot;%1$s&quot;', 'news' ), the_title( '<span class="fn">', '</span>', false) ); ?></a>
  33. </p><!-- .download -->
  34. <?php endif; ?>
  35. <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'news' ) ); ?>
  36. <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'news' ), 'after' => '</p>' ) ); ?>
  37. </div><!-- .entry-content -->
  38. <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '<span class="share">Share this on:</span> [entry-mixx-link] [entry-delicious-link] [entry-digg-link] [entry-facebook-link] [entry-twitter-link]', 'news' ) . '</div>' ); ?>
  39. <?php do_atomic( 'close_loop' ); // Close loop hook ?>
  40. </div><!-- .hentry -->
  41. <?php do_atomic( 'after_entry' ); // After loop hook ?>
  42. <?php get_sidebar( 'after-singular' ); ?>
  43. <?php do_atomic( 'after_singular' ); // After singular hook ?>
  44. <?php comments_template( '/comments.php', true ); ?>
  45. <?php endwhile; ?>
  46. <?php endif; ?>
  47. </div><!-- .hfeed -->
  48. <?php do_atomic( 'close_content' ); // Close content hook ?>
  49. <?php get_template_part( 'loop-nav' ); ?>
  50. </div><!-- #content -->
  51. <?php do_atomic( 'after_content' ); // After content hook ?>
  52. <?php get_footer(); ?>