Make WordPress Core


Ignore:
Timestamp:
12/18/2018 10:08:33 PM (5 years ago)
Author:
desrosj
Message:

Twenty Nineteen: Code Quality Improvements.

This change adds general code quality and documentation improvements.

More info here: https://github.com/WordPress/twentynineteen/pull/546

Props grapplerulrich, iCaleb, allancole.

Merges [44187] to trunk.

See #45424.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-content/themes/twentynineteen/header.php

    r44149 r44298  
    3232            <?php if ( is_singular() && twentynineteen_can_show_post_thumbnail() ) : ?>
    3333                <div class="site-featured-image">
    34                     <?php twentynineteen_post_thumbnail(); ?>
    35                     <?php the_post(); ?>
    36                     <?php $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null; ?>
    37                     <div class="<?php echo ( ! empty( $discussion ) && count( $discussion->responses ) > 0 ) ? 'entry-header has-discussion' : 'entry-header'; ?>">
     34                    <?php
     35                        twentynineteen_post_thumbnail();
     36                        the_post();
     37                        $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null;
     38
     39                        $classes = 'entry-header';
     40                    if ( ! empty( $discussion ) && count( $discussion->responses ) > 0 ) {
     41                        $classes = 'entry-header has-discussion';
     42                    }
     43                    ?>
     44                    <div class="<?php echo $classes; ?>">
    3845                        <?php get_template_part( 'template-parts/header/entry', 'header' ); ?>
    3946                    </div><!-- .entry-header -->
Note: See TracChangeset for help on using the changeset viewer.