Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#51950 closed defect (bug) (fixed)

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

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

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 6 years ago.

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
6 years ago

  • Component General → Bundled Theme
  • Summary Post ID missing in comments → 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.

#2 @audrasjb
6 years 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
6 years ago

  • Milestone Awaiting Review → 5.7

#4 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → 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 years ago

  • Version → 5.6

#6 @desrosj
6 years ago

  • Keywords fixed-major added
  • Milestone 5.7 → 5.6.1
  • Resolution fixed
  • Status closed → reopened

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

#7 @desrosj
6 years ago

  • Resolution → fixed
  • Status reopened → 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 years 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.