[wp-trac] [WordPress Trac] #58063: Replace 'else if' with 'elseif' in wp-includes/atomlib.php

WordPress Trac noreply at wordpress.org
Mon Apr 3 03:57:26 UTC 2023


#58063: Replace 'else if' with 'elseif' in wp-includes/atomlib.php
------------------------------+-----------------------------
 Reporter:  wpfy              |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:  trunk
 Severity:  normal            |   Keywords:  needs-patch
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 The WordPress coding standards recommend using 'elseif' instead of 'else
 if' for conditionals to ensure consistency in the code syntax. This is
 because 'else if' is not compatible with the colon syntax for if|elseif
 blocks.

 However, in the WordPress core file wp-includes/atomlib.php, on lines 251,
 263, 265, and 305, 'else if' is used for conditionals. To ensure
 consistency with the WordPress coding standards and improve the
 readability and maintainability of the code, I propose replacing all
 instances of 'else if' with 'elseif' on these lines.

 This change will ensure that the code follows the recommended syntax and
 is consistent with the rest of the WordPress core codebase.

 I will create a pull request to the WordPress core repository with this
 change.

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


More information about the wp-trac mailing list