[wp-trac] [WordPress Trac] #24549: Follow the WP Handbook Standard, and change The Loop of Core Themes to Use Brackets
WordPress Trac
noreply at wordpress.org
Mon Jun 10 12:34:12 UTC 2013
#24549: Follow the WP Handbook Standard, and change The Loop of Core Themes to Use
Brackets
------------------------------------------------+--------------------------
Reporter: chriscct7 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Bundled Theme | Review
Severity: normal | Version: trunk
Keywords: dev-feedback needs-codex has-patch | Resolution:
------------------------------------------------+--------------------------
Comment (by dd32):
Replying to [comment:10 kovshenin]:
> -1. Basic and Pascal are thought in many schools and use if/endif for
control structures, and CSS is not a programming language. Shorter is not
necessarily faster, but is often more difficult to read, especially when a
bunch of HTML is involved.
To echo that, one of the primary reasons for using endif verses braces was
to improve readability with large chunks of HTML, it's much harder to
discern which brace ends a if or while than an explicit endif; and
endwhile;.
I initially thought the old Coding style reflected that, but upon looking
at the revisions I can't find a reference that backs it up.
Default themes have changed a bit since then though, and some of these
changes concern if/endif wrapped around single lines which would be
generally discouraged at present in core, but keeping it consistent
through the theme should take higher precedence.
http://core.trac.wordpress.org/ticket/4779#comment:19 is the only
reference I can find to preferring if/endif where exiting PHP into blocks
of HTML is involved, but it's by no means a definitive discussion
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24549#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list