Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#54851 new defect (bug)

Prevent unnecessary code comments from being output to the front end

Reported by: kjellr's profile kjellr Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: General Keywords:
Focuses: Cc:


Gutenberg's "Post Comments" block appears to pull its code from the WordPress' theme compat comments.php file here:

This includes some code comments that may be useful for developers, but don't actually need to be send to the front end:

I'd suggest we change these from HTML comments to PHP comments, so they aren't visible in the outputted markup.



Tested with Gutenberg 12.4
WordPress 5.8.3

Change History (1)

#1 @parinpanjari
2 years ago

-> That effectively kills the line after it which is where "Comments are closed" is output, but without just deleting it completely.

if ( 0 && ! comments_open() ) :

-> simplest way is to find out the following line and delete or comment it.

Last edited 2 years ago by parinpanjari (previous) (diff)
Note: See TracTickets for help on using tickets.