In `wp-admin/network/themes.php`, `break` is unreachabled after `exit`.
See #27882. Built from https://develop.svn.wordpress.org/trunk@28308 git-svn-id: http://core.svn.wordpress.org/trunk@28136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f5d23b82bd
commit
64418c0192
|
@ -40,14 +40,12 @@ if ( $action ) {
|
||||||
else
|
else
|
||||||
wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) );
|
wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) );
|
||||||
exit;
|
exit;
|
||||||
break;
|
|
||||||
case 'disable':
|
case 'disable':
|
||||||
check_admin_referer('disable-theme_' . $_GET['theme']);
|
check_admin_referer('disable-theme_' . $_GET['theme']);
|
||||||
unset( $allowed_themes[ $_GET['theme'] ] );
|
unset( $allowed_themes[ $_GET['theme'] ] );
|
||||||
update_site_option( 'allowedthemes', $allowed_themes );
|
update_site_option( 'allowedthemes', $allowed_themes );
|
||||||
wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) );
|
wp_safe_redirect( add_query_arg( 'disabled', '1', $referer ) );
|
||||||
exit;
|
exit;
|
||||||
break;
|
|
||||||
case 'enable-selected':
|
case 'enable-selected':
|
||||||
check_admin_referer('bulk-themes');
|
check_admin_referer('bulk-themes');
|
||||||
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||||
|
@ -60,7 +58,6 @@ if ( $action ) {
|
||||||
update_site_option( 'allowedthemes', $allowed_themes );
|
update_site_option( 'allowedthemes', $allowed_themes );
|
||||||
wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
|
wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
|
||||||
exit;
|
exit;
|
||||||
break;
|
|
||||||
case 'disable-selected':
|
case 'disable-selected':
|
||||||
check_admin_referer('bulk-themes');
|
check_admin_referer('bulk-themes');
|
||||||
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||||
|
@ -73,7 +70,6 @@ if ( $action ) {
|
||||||
update_site_option( 'allowedthemes', $allowed_themes );
|
update_site_option( 'allowedthemes', $allowed_themes );
|
||||||
wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
|
wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
|
||||||
exit;
|
exit;
|
||||||
break;
|
|
||||||
case 'update-selected' :
|
case 'update-selected' :
|
||||||
check_admin_referer( 'bulk-themes' );
|
check_admin_referer( 'bulk-themes' );
|
||||||
|
|
||||||
|
@ -99,7 +95,6 @@ if ( $action ) {
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
require_once(ABSPATH . 'wp-admin/admin-footer.php');
|
require_once(ABSPATH . 'wp-admin/admin-footer.php');
|
||||||
exit;
|
exit;
|
||||||
break;
|
|
||||||
case 'delete-selected':
|
case 'delete-selected':
|
||||||
if ( ! current_user_can( 'delete_themes' ) )
|
if ( ! current_user_can( 'delete_themes' ) )
|
||||||
wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
|
wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
|
||||||
|
@ -190,7 +185,6 @@ if ( $action ) {
|
||||||
's' => $s
|
's' => $s
|
||||||
), network_admin_url( 'themes.php' ) ) );
|
), network_admin_url( 'themes.php' ) ) );
|
||||||
exit;
|
exit;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue