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-video.php

    r39146 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() ) {
     
    5960    <div class="entry-content">
    6061
    61         <?php if ( ! is_single() ) :
     62        <?php
     63        if ( ! is_single() ) {
    6264
    6365            // If not a single post, highlight the video file.
    64             if ( ! empty( $video ) ) :
     66            if ( ! empty( $video ) ) {
    6567                foreach ( $video as $video_html ) {
    6668                    echo '<div class="entry-video">';
     
    6870                    echo '</div>';
    6971                }
    70             endif;
     72            };
    7173
    72         endif;
     74        };
    7375
    74         if ( is_single() || empty( $video ) ) :
     76        if ( is_single() || empty( $video ) ) {
    7577
    7678            /* translators: %s: Name of current post */
     
    8688                'link_after'  => '</span>',
    8789            ) );
    88 
    89         endif; ?>
     90        };
     91        ?>
    9092
    9193    </div><!-- .entry-content -->
    9294
    93     <?php if ( is_single() ) : ?>
    94         <?php twentyseventeen_entry_footer(); ?>
    95     <?php endif; ?>
     95    <?php
     96    if ( is_single() ) {
     97        twentyseventeen_entry_footer();
     98    }
     99    ?>
    96100
    97101</article><!-- #post-## -->
Note: See TracChangeset for help on using the changeset viewer.