Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (9 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/image.php

    r31250 r42343  
    1919        <?php
    2020                // Start the Loop.
    21                 while ( have_posts() ) : the_post();
     21        while ( have_posts() ) :
     22                the_post();
    2223        ?>
    23                         <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    24                                 <header class="entry-header">
    25                                         <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
     24                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     25                        <header class="entry-header">
     26                                <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    2627
    27                                         <div class="entry-meta">
     28                                <div class="entry-meta">
    2829
    29                                                 <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>
     30                                        <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>
    3031
    31                                                 <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> &times; <?php echo esc_html( $metadata['height'] ); ?></a></span>
     32                                        <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> &times; <?php echo esc_html( $metadata['height'] ); ?></a></span>
    3233
    33                                                 <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>
    34                                                 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
    35                                         </div><!-- .entry-meta -->
    36                                 </header><!-- .entry-header -->
     34                                        <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>
     35                                        <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
     36                                </div><!-- .entry-meta -->
     37                        </header><!-- .entry-header -->
    3738
    38                                 <div class="entry-content">
    39                                         <div class="entry-attachment">
    40                                                 <div class="attachment">
    41                                                         <?php twentyfourteen_the_attached_image(); ?>
    42                                                 </div><!-- .attachment -->
     39                        <div class="entry-content">
     40                                <div class="entry-attachment">
     41                                        <div class="attachment">
     42                                                <?php twentyfourteen_the_attached_image(); ?>
     43                                        </div><!-- .attachment -->
    4344
    44                                                 <?php if ( has_excerpt() ) : ?>
     45                                        <?php if ( has_excerpt() ) : ?>
    4546                                                <div class="entry-caption">
    4647                                                        <?php the_excerpt(); ?>
    4748                                                </div><!-- .entry-caption -->
    4849                                                <?php endif; ?>
    49                                         </div><!-- .entry-attachment -->
     50                                </div><!-- .entry-attachment -->
    5051
    51                                         <?php
    52                                                 the_content();
    53                                                 wp_link_pages( array(
     52                                <?php
     53                                        the_content();
     54                                        wp_link_pages(
     55                                                array(
    5456                                                        'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
    5557                                                        'after'       => '</div>',
    5658                                                        'link_before' => '<span>',
    5759                                                        'link_after'  => '</span>',
    58                                                 ) );
    59                                         ?>
     60                                                )
     61                                        );
     62                                ?>
    6063                                </div><!-- .entry-content -->
    6164                        </article><!-- #post-## -->
Note: See TracChangeset for help on using the changeset viewer.