Make WordPress Core


Ignore:
Timestamp:
12/16/2016 10:07:41 PM (7 years ago)
Author:
davidakennedy
Message:

Twenty Seventeen: Improves code readability and code standards in files

Adds better DocBlock comments and fixes some spacing issues based on PHP_CodeSniffer WordPress coding standards.

Props sstoqnov.

Fixes #39152.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/template-parts/post/content-image.php

    r39072 r39618  
    1010 * @version 1.0
    1111 */
     12
    1213?>
    1314
    1415<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1516    <?php
    16         if ( is_sticky() && is_home() ) :
     17        if ( is_sticky() && is_home() ) {
    1718            echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
    18         endif;
     19        }
    1920    ?>
    2021    <header class="entry-header">
    2122        <?php
    22             if ( 'post' === get_post_type() ) :
     23            if ( 'post' === get_post_type() ) {
    2324                echo '<div class="entry-meta">';
    24                     if ( is_single() ) :
     25                    if ( is_single() ) {
    2526                        twentyseventeen_posted_on();
    26                     else :
     27                    } else {
    2728                        echo twentyseventeen_time_link();
    2829                        twentyseventeen_edit_link();
    29                     endif;
     30                    };
    3031                echo '</div><!-- .entry-meta -->';
    31             endif;
     32            };
    3233
    3334            if ( is_single() ) {
     
    4950    <div class="entry-content">
    5051
    51         <?php if ( is_single() || '' === get_the_post_thumbnail() ) :
     52        <?php if ( is_single() || '' === get_the_post_thumbnail() ) {
    5253
    5354            // Only show content if is a single post, or if there's no featured image.
     
    6566            ) );
    6667
    67         endif; ?>
     68        };
     69        ?>
    6870
    6971    </div><!-- .entry-content -->
    7072
    71     <?php if ( is_single() ) : ?>
    72         <?php twentyseventeen_entry_footer(); ?>
    73     <?php endif; ?>
     73    <?php
     74    if ( is_single() ) {
     75        twentyseventeen_entry_footer();
     76    }
     77    ?>
    7478
    7579</article><!-- #post-## -->
Note: See TracChangeset for help on using the changeset viewer.