[wp-trac] [WordPress Trac] #48447: Update WordPress packages with fixes targeted for 5.3 RC3

WordPress Trac noreply at wordpress.org
Mon Oct 28 17:34:42 UTC 2019


#48447: Update WordPress packages with fixes targeted for 5.3 RC3
-------------------------------------------+-----------------------
 Reporter:  youknowriad                    |       Owner:  (none)
     Type:  defect (bug)                   |      Status:  assigned
 Priority:  normal                         |   Milestone:  5.3
Component:  Editor                         |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch dev-feedback commit  |     Focuses:
-------------------------------------------+-----------------------

Comment (by azaozz):

 Replying to [comment:5 youknowriad]:
 > The problem is that these files are automatically synced...

 Right. Seems it would be good to make few "readability improvements" to
 `latest-comments.php`. Added 48447-readability-fixes.diff as an example
 here, will open a low-priority issue for Gutenberg too.

 Generally having nested function calls with each param on its own like
 adds a lot of "vertical bloat" and "indentation bloat" :)

 These can be avoided by making the code a bit more "wordy" but the result
 is quite easier to read. Also `if ()` statements usually signify a new
 "block" with its own indentation. Usually better to have empty lines
 around.

 Also, for better readability long ternary operators should probably be `if
 () {} ... else {}` blocks instead (especially when returning from them).

 The six level deep nested array in `register_block_core_latest_comments()`
 is also quite "problematic" with some vertical and indentation bloat and
 uneven/weird white spaces but that's a bug in WPCS that needs fixing
 upstream (the issue has been open there for over 6 months now!).

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


More information about the wp-trac mailing list