Lines: 1 to 81 of 81
<?php /** * The template for displaying image attachments * * @package WordPress * @subpackage Twenty_Fourteen * @since Twenty Fourteen 1.0 */ // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); get_header(); ?> <section id="primary" class="content-area image-attachment"> <div id="content" class="site-content" role="main"> <?php // Start the Loop. while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> <div class="entry-meta"> <span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span> <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> × <?php echo esc_html( $metadata['height'] ); ?></a></span> <span class="parent-post-link"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span> <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-meta --> </header><!-- .entry-header --> <div class="entry-content"> <div class="entry-attachment"> <div class="attachment"> <?php twentyfourteen_the_attached_image(); ?> </div><!-- .attachment --> <?php if ( has_excerpt() ) : ?> <div class="entry-caption"> <?php the_excerpt(); ?> </div><!-- .entry-caption --> <?php endif; ?> </div><!-- .entry-attachment --> <?php the_content(); wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', ) ); ?> </div><!-- .entry-content --> </article><!-- #post-## --> <nav id="image-navigation" class="navigation image-navigation"> <div class="nav-links"> <?php previous_image_link( false, '<div class="previous-image">' . __( 'Previous Image', 'twentyfourteen' ) . '</div>' ); ?> <?php next_image_link( false, '<div class="next-image">' . __( 'Next Image', 'twentyfourteen' ) . '</div>' ); ?> </div><!-- .nav-links --> </nav><!-- #image-navigation --> <?php comments_template(); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar(); get_footer();
Called by
Invoked by
Calls
1 to 25 of 25
- comments_template() – Load the comment template specified in $file.
- edit_post_link() – Displays the edit post link for post.
- esc_attr() – Escaping for HTML attributes.
- esc_html() – Escaping for HTML blocks.
- esc_url() – Checks and cleans a URL.
- get_footer() – Load footer template.
- get_header() – Load header template.
- get_permalink() – Retrieves the full permalink for the current post or post ID.
- get_sidebar() – Load sidebar template.
- get_the_date() – Retrieve the date on which the post was written.
- get_the_title() – Retrieve post title.
- has_excerpt() – Whether the post has a custom excerpt.
- have_posts() – Whether current WordPress query has results to loop over.
- next_image_link() – Displays next image link that has the same post parent.
- post_class() – Display the classes for the post div.
- previous_image_link() – Displays previous image link that has the same post parent.
- the_content() – Display the post content.
- the_excerpt() – Display the post excerpt.
- the_ID() – Display the ID of the current item in the WordPress Loop.
- the_post() – Iterate the post index in the loop.
- the_title() – Display or retrieve the current post title with optional markup.
- twentyfourteen_the_attached_image() – Print the attached image with a link to the next attached image.
- wp_get_attachment_metadata() – Retrieve attachment meta field for attachment ID.
- wp_get_attachment_url() – Retrieve the URL for an attachment.
- wp_link_pages() – The formatted output of a list of pages.