WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/30/2014 05:57:51 PM (7 years ago)
Author:
wonderboymusic
Message:

Cleanup for switch statements:

  • Move default to the bottom in WP_Theme_Install_List_Table
  • switch/endswitch syntax is not supported in Hack. Switch to switch (...) { .... } syntax. (A few template-type instances linger).

Fixes #28409.
See #27881.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r28609 r28633  
    23022302        }
    23032303        $errors = $message->get_error_messages();
    2304         switch ( count( $errors ) ) :
     2304        switch ( count( $errors ) ) {
    23052305        case 0 :
    23062306            $message = '';
     
    23122312            $message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>";
    23132313            break;
    2314         endswitch;
     2314        }
    23152315    } elseif ( is_string( $message ) ) {
    23162316        $message = "<p>$message</p>";
Note: See TracChangeset for help on using the changeset viewer.