[wp-trac] [WordPress Trac] #43644: Revert multiline calls to actions and filters
WordPress Trac
noreply at wordpress.org
Wed Jul 18 08:07:44 UTC 2018
#43644: Revert multiline calls to actions and filters
-------------------------------------+-------------------------------------
Reporter: johnbillion | Owner: johnbillion
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 5.0
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch 2nd-opinion | Focuses: docs, coding-standards
-------------------------------------+-------------------------------------
Comment (by pento):
I agree, that's some ugly code.
As with everything, there are steps we can take to improve the situation.
The first thing we can do is enforce the proposed "one argument per line"
rule, as there's an existing sniff and fixer for it, and it applies to the
vast majority of function calls. (Where "vast majority" is entirely
unscientific, and based on my brief read through a handful of core files.)
I don't know if a sniff exists to block multline arguments, even if there
is, I assume there isn't a fixer. I'm fine with updating Core's coding
standards to prevent multiline arguments, and then proceeding with the
[https://github.com/WordPress-Coding-Standards/WordPress-Coding-
Standards/issues/1330 corresponding WPCS ticket].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43644#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list