[wp-trac] [WordPress Trac] #43566: CS: Fix elseif in WordPress core files
WordPress Trac
noreply at wordpress.org
Fri Mar 16 10:16:36 UTC 2018
#43566: CS: Fix elseif in WordPress core files
------------------------------------+-----------------------------
Reporter: mukesh27 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: docs, coding-standards |
------------------------------------+-----------------------------
CS: Fix elseif in WordPress core files
Many apologies if this is a duplicate. I have searched but did not find it
yet posted.
According to PHP Coding Standards(
https://make.wordpress.org/core/handbook/best-practices/coding-
standards/php/#use-elseif-not-else-if ) handbook else if is not compatible
with the colon syntax for if|elseif blocks. For this reason, use elseif
for conditionals. in many place core developer use '''else if''' so we
have to change else if to elseif or remove '''Use elseif, not else if'''
block from '''PHP Coding Standards''' document.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43566>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list