[wp-trac] [WordPress Trac] #38384: Twenty Seventeen: Replace inline control structure in `twentyseventeen_content_image_sizes_attr()`

WordPress Trac noreply at wordpress.org
Thu Oct 20 09:48:06 UTC 2016


#38384: Twenty Seventeen: Replace inline control structure in
`twentyseventeen_content_image_sizes_attr()`
---------------------------+-------------------------
 Reporter:  ocean90        |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  4.7
Component:  Bundled Theme  |    Version:
 Severity:  normal         |   Keywords:  needs-patch
  Focuses:                 |
---------------------------+-------------------------
 See
 https://github.com/WordPress/twentyseventeen/blob/5b5e4e86c2b8343863d7633758987da93c2bf2e8/functions.php#L317-L323.

 To improve code readability the lines 317 and 321 should be changed to a
 proper if ( ) {} block. Also, per WordPress' coding standards, yoda
 conditons should only be used for ==, !=, ===, and !==.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38384>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list