Skip to content

Loading…

Minor Change: removed wp tag in html comment #85

Closed
wants to merge 1 commit into from

4 participants

@pixolin

The usage of a WordPress Tag within a html comment to identify a html end tag is a performance waste (needs to be rendered by PHP) and doesn't improve the readability of the code.
This applies to a couple of other templates, too.

@pixolin pixolin Minor Change: removed wp tag in html comment
The usage of a WordPress Tag within a html comment to identify a html end tag is a performance waste (needs to be rendered by PHP) and doesn't improve the readability of the code.
This applies to a couple of other templates, too.
7409757
@ashfame

I disagree. The very minute performance gain here is very easily outweighed by the advantage of having markup being easy to read.

@kovshenin

a html end tag is a performance waste (needs to be rendered by PHP)

The whole file needs to be parsed and rendered by PHP anyway, so the "extra" call to the_ID doesn't really decrease performance. I don't think it's more readable, or less readable, and I don't really see a point if it being there in the first place. I've never found a good use for it when reading markup, since Chrome's developer tools and Firebug would indent elements in a way where you can always see the corresponding closing tag.

In any case, if people do find it useful, I think we should leave it as is.

@ashfame

Yep! We all use tools that make the process of inspecting markup easier but think of "View source", some extra indication over there can't hurt IMO :)

@mfields

I agree @kovshenin here. While I personally do not find these tags useful, I'm sure there are many others that do. I think it is a good idea to keep them around to aid in debugging for developers of all skill levels.

@mfields mfields closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 19, 2012
  1. @pixolin

    Minor Change: removed wp tag in html comment

    pixolin committed
    The usage of a WordPress Tag within a html comment to identify a html end tag is a performance waste (needs to be rendered by PHP) and doesn't improve the readability of the code.
    This applies to a couple of other templates, too.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 content-page.php
View
2 content-page.php
@@ -17,4 +17,4 @@
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', '_s' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit', '_s' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->
-</article><!-- #post-<?php the_ID(); ?> -->
+</article><!-- #post-ID -->
Something went wrong with that request. Please try again.