WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 6 months ago

Last modified 6 months ago

#51950 closed defect (bug) (fixed)

Twenty Twenty-One: Fix inconsistent HTML comments after closing HTML tags

Reported by: arcangelini Owned by: SergeyBiryukov
Milestone: 5.6.1 Priority: normal
Severity: normal Version: 5.6
Component: Bundled Theme Keywords: has-patch, fixed-major, twenty-twenty-one-1.1
Focuses: coding-standards Cc:

Description

The post id number is missing in the code comment of the content loop. Specifically in: twentytwentyone/template-parts/content/content.php:46

</article><!-- #post-${ID} -->

Should be...

</article><!-- #post-<?php the_ID(); ?> -->

Attachments (1)

51950.diff (1.7 KB) - added by audrasjb 7 months ago.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
7 months ago

  • Component changed from General to Bundled Theme
  • Summary changed from Post ID missing in comments to Twenty Twenty-One: Fix inconsistent HTML comments after closing HTML tags

Hi there, welcome to WordPress Trac! Thanks for the report.

Looking at the other bundled themes, they do indeed all use <!-- #post-<?php the_ID(); ?> -->, some of them since [45209] / #46871.

Looks like Twenty Twenty-One is not very consistent with this:

  • It uses <!-- #post-<?php the_ID(); ?> --> in template-parts/content/content-page.php.
  • And <!-- #post-${ID} --> in other content templates.

So I think it makes sense to bring some consistency here.

@audrasjb
7 months ago

#2 @audrasjb
7 months ago

  • Keywords has-patch added

Hi @arcangelini and welcome to WordPress Core Trac,

That's a good catch.
51950.diff fixes this small issue in the following files:

  • image.php
  • template-parts/content/content-single.php
  • template-parts/content/content.php

#3 @SergeyBiryukov
7 months ago

  • Milestone changed from Awaiting Review to 5.7

#4 @SergeyBiryukov
7 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 49761:

Twenty Twenty-One: Use consistent HTML comments after closing HTML tags.

Follow-up to [45209] for other bundled themes.

Props arcangelini, audrasjb.
Fixes #51950.

#5 @desrosj
6 months ago

  • Version set to 5.6

#6 @desrosj
6 months ago

  • Keywords fixed-major added
  • Milestone changed from 5.7 to 5.6.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

Since we're doing a separate Twenty Twenty-One release in a few days, let's include this.

#7 @desrosj
6 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 49827:

Twenty Twenty-One: Use consistent HTML comments after closing HTML tags.

Follow-up to [45209] for other bundled themes.

Props arcangelini, audrasjb.
Merges [49761] to the 5.6 branch.
Fixes #51950.

#8 @desrosj
6 months ago

  • Keywords twenty-twenty-one-1.1 added

Adding a custom keyword for querying tickets included in the Twenty Twenty-One version 1.1 release in the future.

Note: See TracTickets for help on using tickets.