mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 12:51:58 +00:00
Use bool for allowed themes. Props PeteMall. see #14897
git-svn-id: https://develop.svn.wordpress.org/trunk@16241 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -23,7 +23,7 @@ if ( $action ) {
|
||||
$allowed_themes = get_site_option( 'allowedthemes' );
|
||||
switch ( $action ) {
|
||||
case 'network-enable':
|
||||
$allowed_themes[ $_GET['theme'] ] = 1;
|
||||
$allowed_themes[ $_GET['theme'] ] = true;
|
||||
update_site_option( 'allowedthemes', $allowed_themes );
|
||||
wp_redirect( wp_get_referer() ); // @todo add_query_arg for update message
|
||||
exit;
|
||||
@@ -41,7 +41,7 @@ if ( $action ) {
|
||||
exit;
|
||||
}
|
||||
foreach( (array) $themes as $theme )
|
||||
$allowed_themes[ $theme ] = 1;
|
||||
$allowed_themes[ $theme ] = true;
|
||||
update_site_option( 'allowedthemes', $allowed_themes );
|
||||
break;
|
||||
case 'network-disable-selected':
|
||||
|
||||
Reference in New Issue
Block a user