Opened 6 years ago
Closed 6 years ago
#46871 closed enhancement (fixed)
Twenty Nineteen: Fix inconsistent HTML comments after closing HTML tags.
Reported by: | iamdmitrymayorov | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch commit |
Focuses: | Cc: |
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.
Attachments (2)
Change History (8)
This ticket was mentioned in Slack in #core by dmtrmrv. View the logs.
6 years ago
#3
@
6 years ago
- Milestone changed from Awaiting Review to 5.2
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
Fixes the same issue in other default themes.