Replies: 8 comments 1 reply
-
Please don't do this. When I first started out with this theme, the comments were a godsend. |
Beta Was this translation helpful? Give feedback.
-
May I ask in what way the comments were useful? And what comments exactly were useful? |
Beta Was this translation helpful? Give feedback.
-
Area comments. Helped with figuring out what was what. |
Beta Was this translation helpful? Give feedback.
-
I always use this, might be handy for someone: add_action('get_header', 'buffer_start'); (and I also vote for removing them) |
Beta Was this translation helpful? Give feedback.
-
@gettonet I recommend to not use this code. Your're literally matching nothing. If you want to remove Here's what it should look like: $buffer = preg_replace('/<!--(.*)-->/U', '', $buffer); // removes <!-- <p>I am a comment!</p> --> |
Beta Was this translation helpful? Give feedback.
-
@IanDelMar I just saw that code was sanitized and is not showing properly in comment :)
|
Beta Was this translation helpful? Give feedback.
-
@bacoords is it possible to move this issue to the discussions page and have a poll over there? |
Beta Was this translation helpful? Give feedback.
-
As a matter of personal preference (talking purely about the 2 types of HTML comments above) I have no need or never had value from seeing large section comments in any markup. I do however find great value in ending comments for any tags which may open in one file but close in another. A common example is the content area opening in the No strong opinions on them by any means. Just adding one other voice and thoughts to the discussion :) |
Beta Was this translation helpful? Give feedback.
-
Opening a new discussion to carry on what was discussed here: #1864
The topic: removing all HTML comments from Understrap. I think the PHP comments are valuable (and there is a lot of improvement on that front, especially moving comments for PHP functions out of HTML and into PHP) but there's a number of HTML comments that honestly we could do without.
Examples of unnecessary HTML Comments
Area comments
<!-- ******************* The Navbar Area ******************* -->
Closing tag comments
Request
So this is essentially a public poll: Are there strong arguments in favor of keeping the HTML comments in the template files or is it time to move past them?
Beta Was this translation helpful? Give feedback.
All reactions