Network Themes cleanup. Props PeteMall. See #14897
git-svn-id: http://svn.automattic.com/wordpress/trunk@16193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
94339af889
commit
a4621924db
|
@ -14,11 +14,10 @@ $wp_list_table->check_permissions();
|
||||||
|
|
||||||
$action = $wp_list_table->current_action();
|
$action = $wp_list_table->current_action();
|
||||||
|
|
||||||
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
|
||||||
$s = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
|
$s = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
|
||||||
|
|
||||||
// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
|
// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
|
||||||
$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']);
|
$_SERVER['REQUEST_URI'] = remove_query_arg(array('network-enable', 'network-disable', 'network-enable-selected', 'network-disable-selected'), $_SERVER['REQUEST_URI']);
|
||||||
|
|
||||||
if ( $action ) {
|
if ( $action ) {
|
||||||
$allowed_themes = get_site_option( 'allowedthemes' );
|
$allowed_themes = get_site_option( 'allowedthemes' );
|
||||||
|
@ -36,8 +35,6 @@ if ( $action ) {
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
case 'network-enable-selected':
|
case 'network-enable-selected':
|
||||||
check_admin_referer('bulk-plugins');
|
|
||||||
|
|
||||||
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||||
if ( empty($themes) ) {
|
if ( empty($themes) ) {
|
||||||
wp_redirect( wp_get_referer() );
|
wp_redirect( wp_get_referer() );
|
||||||
|
@ -48,8 +45,6 @@ if ( $action ) {
|
||||||
update_site_option( 'allowedthemes', $allowed_themes );
|
update_site_option( 'allowedthemes', $allowed_themes );
|
||||||
break;
|
break;
|
||||||
case 'network-disable-selected':
|
case 'network-disable-selected':
|
||||||
check_admin_referer('bulk-plugins');
|
|
||||||
|
|
||||||
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
$themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
||||||
if ( empty($themes) ) {
|
if ( empty($themes) ) {
|
||||||
wp_redirect( wp_get_referer() );
|
wp_redirect( wp_get_referer() );
|
||||||
|
@ -59,7 +54,6 @@ if ( $action ) {
|
||||||
unset( $allowed_themes[ $theme ] );
|
unset( $allowed_themes[ $theme ] );
|
||||||
update_site_option( 'allowedthemes', $allowed_themes );
|
update_site_option( 'allowedthemes', $allowed_themes );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue