[wp-trac] [WordPress Trac] #24906: Post Formats: Allow to check for any post format
WordPress Trac
noreply at wordpress.org
Fri Aug 23 18:44:43 UTC 2013
#24906: Post Formats: Allow to check for any post format
--------------------------+--------------------
Reporter: obenland | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.7
Component: Post Formats | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Comment (by nacin):
The use of `! empty( $single )` felt like a code smell — under what
circumstances would an item in this array be empty? It seems like that
could occur if someone passed false, null, etc., as $format, which would
then get converted to `array( 0 => false )`.
[attachment:24906.3.diff] tries a different branching of the logic.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24906#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list