[wp-trac] [WordPress Trac] #43644: Revert multiline calls to actions and filters

WordPress Trac noreply at wordpress.org
Tue Mar 27 19:14:54 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 ocean90):

 Replying to [comment:6 azaozz]:
 > I'd go one step further: for best readability arrays should be defined
 outside of function and filter calls.

 That's a nice workaround that I'd support too.

 Replying to [comment:7 jrf]:
 > @azaozz For significant changes to the WordPress Coding Standards, an
 RFC process has been put in place: https://github.com/WordPress-Coding-
 Standards/rfcs

 I don't think we need a RFC process for this or at all. That's not really
 straightforward and just delays stuff unnecessarily. WordPress has worked
 pretty well without them. If you need them for WPCS sniffs that's fine, of
 course.
 What we need here is 1-2 sentences with a small example for the
 Indentation section on our handbook:

 > For multi-line argument lists, each argument should start on a new line
 and indented once. There should be only one argument per line.

 Note that there's already a similar example in the
 [https://make.wordpress.org/core/handbook/best-practices/coding-
 standards/php/#opening-and-closing-php-tags Opening and Closing PHP Tags]
 section, added 9 months ago.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43644#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list