Make WordPress Core


Ignore:
Timestamp:
12/16/2016 10:07:41 PM (8 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-audio.php

    r39146 r39618  
    1515<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1616    <?php
    17         if ( is_sticky() && is_home() ) :
     17        if ( is_sticky() && is_home() ) {
    1818            echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
    19         endif;
     19        }
    2020    ?>
    2121    <header class="entry-header">
    2222        <?php
    23             if ( 'post' === get_post_type() ) :
     23            if ( 'post' === get_post_type() ) {
    2424                echo '<div class="entry-meta">';
    25                     if ( is_single() ) :
     25                    if ( is_single() ) {
    2626                        twentyseventeen_posted_on();
    27                     else :
     27                    } else {
    2828                        echo twentyseventeen_time_link();
    2929                        twentyseventeen_edit_link();
    30                     endif;
     30                    };
    3131                echo '</div><!-- .entry-meta -->';
    32             endif;
     32            };
    3333
    3434            if ( is_single() ) {
     
    6161    <div class="entry-content">
    6262
    63         <?php if ( ! is_single() ) :
     63        <?php
     64        if ( ! is_single() ) {
    6465
    6566            // If not a single post, highlight the audio file.
    66             if ( ! empty( $audio ) ) :
     67            if ( ! empty( $audio ) ) {
    6768                foreach ( $audio as $audio_html ) {
    6869                    echo '<div class="entry-audio">';
     
    7071                    echo '</div><!-- .entry-audio -->';
    7172                }
    72             endif;
     73            };
    7374
    74         endif;
     75        };
    7576
    76         if ( is_single() || empty( $audio ) ) :
     77        if ( is_single() || empty( $audio ) ) {
    7778
    7879            /* translators: %s: Name of current post */
     
    8990            ) );
    9091
    91         endif; ?>
     92        };
     93        ?>
    9294
    9395    </div><!-- .entry-content -->
    9496
    95     <?php if ( is_single() ) : ?>
    96         <?php twentyseventeen_entry_footer(); ?>
    97     <?php endif; ?>
     97    <?php
     98    if ( is_single() ) {
     99        twentyseventeen_entry_footer();
     100    }
     101    ?>
    98102
    99103</article><!-- #post-## -->
Note: See TracChangeset for help on using the changeset viewer.