/wp-content/themes/news/attachment.php
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
- <?php
- /**
- * Attachment Template
- *
- * This is the default attachment template. It is used when visiting the singular view of a post attachment
- * page (images, videos, audio, etc.).
- *
- * @package News
- * @subpackage Template
- */
- get_header(); ?>
- <?php do_atomic( 'before_content' ); // Before content hook ?>
- <div id="content">
- <?php do_atomic( 'open_content' ); // Open content hook ?>
- <div class="hfeed">
- <?php if ( have_posts() ) : ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php do_atomic( 'before_entry' ); // Before loop hook ?>
- <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
- <?php do_atomic( 'open_entry' ); // Open loop hook ?>
- <?php echo apply_atomic_shortcode( 'entry_utility', '<div class="entry-utility">' . __( '[entry-print-link] [entry-email-link] [entry-popup-shortlink]', 'news' ) . '</div>' ); ?>
- <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
- <?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>' ); ?>
- <div class="entry-content">
- <?php if ( wp_attachment_is_image( get_the_ID() ) ) : ?>
- <p class="attachment-image">
- <img class="aligncenter" src="<?php echo wp_get_attachment_url(); ?>" alt="<?php the_title_attribute(); ?>" title="<?php the_title_attribute(); ?>" />
- </p><!-- .attachment-image -->
- <?php else : ?>
- <?php hybrid_attachment(); ?>
- <p class="download">
- <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 "%1$s"', 'news' ), the_title( '<span class="fn">', '</span>', false) ); ?></a>
- </p><!-- .download -->
- <?php endif; ?>
- <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'news' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'news' ), 'after' => '</p>' ) ); ?>
- </div><!-- .entry-content -->
- <?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>' ); ?>
- <?php do_atomic( 'close_loop' ); // Close loop hook ?>
- </div><!-- .hentry -->
- <?php do_atomic( 'after_entry' ); // After loop hook ?>
- <?php get_sidebar( 'after-singular' ); ?>
- <?php do_atomic( 'after_singular' ); // After singular hook ?>
- <?php comments_template( '/comments.php', true ); ?>
- <?php endwhile; ?>
- <?php endif; ?>
- </div><!-- .hfeed -->
- <?php do_atomic( 'close_content' ); // Close content hook ?>
- <?php get_template_part( 'loop-nav' ); ?>
- </div><!-- #content -->
- <?php do_atomic( 'after_content' ); // After content hook ?>
- <?php get_footer(); ?>