Opened 7 years ago
Closed 7 years ago
#46871 closed enhancement (fixed)
Twenty Nineteen: Fix inconsistent HTML comments after closing HTML tags.
| Reported by: | iamdmitrymayorov | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.2 |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
Some comments after HTML closing tags are either incorrect or inconsistent. I first discovered one in header.php.
Should be:
<div class="site-branding-container"> <?php get_template_part( 'template-parts/header/site', 'branding' ); ?> </div><!-- .site-branding-container -->
Was:
<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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Fixes the same issue in other default themes.