Make WordPress Core


Ignore:
Timestamp:
12/14/2018 03:24:35 AM (6 years ago)
Author:
pento
Message:

General: Fix some code formatting issues.

A handful of code formatting issues were introduced in recent commits, runs the auto-fixer on them.

File:
1 edited

Legend:

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

    r44149 r44155  
    1616            <?php
    1717                // Start the loop.
    18                 while ( have_posts() ) :
    19                     the_post();
    20             ?>
     18            while ( have_posts() ) :
     19                the_post();
     20                ?>
    2121
    2222                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    2323
    2424                    <header class="entry-header">
    25                         <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
     25                    <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    2626                    </header><!-- .entry-header -->
    2727
     
    2929
    3030                        <figure class="entry-attachment wp-block-image">
    31                             <?php
    32                                 /**
    33                                 * Filter the default twentynineteen image attachment size.
    34                                 *
    35                                 * @since Twenty Sixteen 1.0
    36                                 *
    37                                 * @param string $image_size Image size. Default 'large'.
    38                                 */
    39                                 $image_size = apply_filters( 'twentynineteen_attachment_size', 'full' );
     31                        <?php
     32                            /**
     33                            * Filter the default twentynineteen image attachment size.
     34                            *
     35                            * @since Twenty Sixteen 1.0
     36                            *
     37                            * @param string $image_size Image size. Default 'large'.
     38                            */
     39                            $image_size = apply_filters( 'twentynineteen_attachment_size', 'full' );
    4040
    41                                 echo wp_get_attachment_image( get_the_ID(), $image_size );
    42                             ?>
     41                            echo wp_get_attachment_image( get_the_ID(), $image_size );
     42                        ?>
    4343
    4444                            <figcaption class="wp-caption-text"><?php echo get_the_excerpt(); ?></figcaption>
     
    4747
    4848                        <?php
    49                             the_content();
    50                             wp_link_pages(
    51                                 array(
    52                                     'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentynineteen' ) . '</span>',
    53                                     'after'       => '</div>',
    54                                     'link_before' => '<span>',
    55                                     'link_after'  => '</span>',
    56                                     'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'twentynineteen' ) . ' </span>%',
    57                                     'separator'   => '<span class="screen-reader-text">, </span>',
    58                                 )
    59                             );
     49                        the_content();
     50                        wp_link_pages(
     51                            array(
     52                                'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentynineteen' ) . '</span>',
     53                                'after'       => '</div>',
     54                                'link_before' => '<span>',
     55                                'link_after'  => '</span>',
     56                                'pagelink'    => '<span class="screen-reader-text">' . __( 'Page', 'twentynineteen' ) . ' </span>%',
     57                                'separator'   => '<span class="screen-reader-text">, </span>',
     58                            )
     59                        );
    6060                        ?>
    6161                    </div><!-- .entry-content -->
    6262
    6363                    <footer class="entry-footer">
    64                         <?php
    65                             // Retrieve attachment metadata.
    66                             $metadata = wp_get_attachment_metadata();
    67                             if ( $metadata ) {
    68                                 printf(
    69                                     '<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s &times; %4$s</a></span>',
    70                                     _x( 'Full size', 'Used before full size attachment link.', 'twentynineteen' ),
    71                                     esc_url( wp_get_attachment_url() ),
    72                                     absint( $metadata['width'] ),
    73                                     absint( $metadata['height'] )
    74                                 );
    75                             }
    76                         ?>
     64                    <?php
     65                        // Retrieve attachment metadata.
     66                        $metadata = wp_get_attachment_metadata();
     67                    if ( $metadata ) {
     68                        printf(
     69                            '<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s &times; %4$s</a></span>',
     70                            _x( 'Full size', 'Used before full size attachment link.', 'twentynineteen' ),
     71                            esc_url( wp_get_attachment_url() ),
     72                            absint( $metadata['width'] ),
     73                            absint( $metadata['height'] )
     74                        );
     75                    }
     76                    ?>
    7777
    7878                        <?php twentynineteen_entry_footer(); ?>
     
    8282
    8383                <?php
    84                     // Parent post navigation.
    85                     the_post_navigation(
    86                         array(
    87                             'prev_text' => _x( '<span class="meta-nav">Published in</span><br><span class="post-title">%title</span>', 'Parent post link', 'twentynineteen' ),
    88                         )
    89                     );
     84                // Parent post navigation.
     85                the_post_navigation(
     86                    array(
     87                        'prev_text' => _x( '<span class="meta-nav">Published in</span><br><span class="post-title">%title</span>', 'Parent post link', 'twentynineteen' ),
     88                    )
     89                );
    9090
    91                     // If comments are open or we have at least one comment, load up the comment template.
    92                     if ( comments_open() || get_comments_number() ) {
    93                         comments_template();
    94                     }
     91                // If comments are open or we have at least one comment, load up the comment template.
     92                if ( comments_open() || get_comments_number() ) {
     93                    comments_template();
     94                }
    9595
    9696                // End the loop.
Note: See TracChangeset for help on using the changeset viewer.