mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@28633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2301,7 +2301,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
|
||||
$title = $error_data['title'];
|
||||
}
|
||||
$errors = $message->get_error_messages();
|
||||
switch ( count( $errors ) ) :
|
||||
switch ( count( $errors ) ) {
|
||||
case 0 :
|
||||
$message = '';
|
||||
break;
|
||||
@@ -2311,7 +2311,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
|
||||
default :
|
||||
$message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>";
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
} elseif ( is_string( $message ) ) {
|
||||
$message = "<p>$message</p>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user