[wp-trac] [WordPress Trac] #46871: Twenty Nineteen: Fix inconsistent HTML comments after closing HTML tags.

WordPress Trac noreply at wordpress.org
Wed Apr 10 01:36:16 UTC 2019


#46871: Twenty Nineteen: Fix inconsistent HTML comments after closing HTML tags.
------------------------------+-----------------------------
 Reporter:  iamdmitrymayorov  |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:
 Severity:  normal            |   Keywords:  has-patch
  Focuses:                    |
------------------------------+-----------------------------
 Some comments after HTML closing tags are either incorrect or
 inconsistent. I first discovered one in `header.php`.

 Should be:

 {{{#!php
 <div class="site-branding-container">
         <?php get_template_part( 'template-parts/header/site', 'branding'
 ); ?>
 </div><!-- .site-branding-container -->
 }}}

 Was:
 {{{#!php
 <div class="site-branding-container">
         <?php get_template_part( 'template-parts/header/site', 'branding'
 ); ?>
 </div><!-- .layout-wrap -->
 }}}

 After that I checked comments after closing HTML tags in all theme files
 and found another incorrect one in `template-parts/header/entry-
 header.php`. Should be `<!-- .entry-meta -->` but was `<!-- .meta-info
 -->`.

 Lastly, some comments that are placed right after the tags that have
 dynamic IDs were inconsistent. I've found three versions `<!-- #post-##
 -->`, `<!-- #post-${ID} -->`, and `<!-- #post-<?php the_ID(); ?> -->`. The
 last one actually prints the ID in HTML. I have updated all occurrences to
 use `<!-- #post-<?php the_ID(); ?> -->` for consistency.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46871>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list