[wp-trac] [WordPress Trac] #44840: Don't assign to a variable inside if statement in get_post_format()
WordPress Trac
noreply at wordpress.org
Sat Aug 25 00:31:05 UTC 2018
#44840: Don't assign to a variable inside if statement in get_post_format()
-------------------------+-----------------------------
Reporter: Mirucon | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: minor | Keywords: has-patch
Focuses: |
-------------------------+-----------------------------
Currently in the get_post_format() function, there's variable assign
inside if statement. It is not a really good practice since assigning to a
variable inside could confuse people as it looks like a mistake of the
comparison operator. This patch will assign to a new variable just before
the line of if().
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44840>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list