[wp-trac] [WordPress Trac] #18691: Check for specific post formats with `current_theme_supports()`
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 18 21:03:24 UTC 2011
#18691: Check for specific post formats with `current_theme_supports()`
-------------------------------------+--------------------
Reporter: ericmann | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.3
Component: Post Types | Version: 3.2.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+--------------------
Comment (by ericmann):
Replying to [comment:2 johnbillion]:
> I think this patch can be simplified further. The logic is the same as
that for post thumbnails, so it can use the same case statement.
I'm tempted to agree, but I'm concerned that a fall-through case statement
might not be very clear for others looking at the code later. Considering
this coding standard:
> In general, readability is more important than cleverness or brevity.
Fall-though case statements usually aren't very self-explanatory ...
particularly if we ever add new cases to the statement. I'd rather leave
in the full code now than need to re-add it if/when we add new cases down
the road.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18691#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list