[wp-trac] [WordPress Trac] #43566: CS: Fix elseif in WordPress core files

WordPress Trac noreply at wordpress.org
Fri Mar 16 17:45:49 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        |  Resolution:
 Keywords:  has-patch     |     Focuses:  docs, coding-standards
--------------------------+-------------------------------------

Comment (by birgire):

 @mukesh27 sorry if I misread the ticket, but in the changeset link I
 posted previously we can see that one of the changes made there in {{{wp-
 includes/admin-bar.php}}} is:

 {{{
 384         } elseif ( current_user_can( 'read' ) ) {
 385             // We're on the front end, link to the Dashboard.
 386             $wp_admin_bar->add_menu(
 387                 array(

 }}}

 There's also {{{elseif}}} in the latest trunk as well:

 https://core.trac.wordpress.org/browser/trunk/src/wp-includes/admin-
 bar.php#L384

 Is this the same part as in your patch?

 I tried to look for other cases of {{{else if}}} in the core, but only
 found  it in javascript code.

 Did you maybe find other cases in core PHP files?

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


More information about the wp-trac mailing list