Use the stylesheet rather than the template to create the network enable theme nonce. Fix network enable redirect following theme installation. Props duck_, nacin. fixes #20916

git-svn-id: https://develop.svn.wordpress.org/trunk@21062 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-06-12 15:31:25 +00:00
parent d81496ca18
commit d0e8e5ca35
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -40,7 +40,10 @@ if ( $action ) {
check_admin_referer('enable-theme_' . $_GET['theme']);
$allowed_themes[ $_GET['theme'] ] = true;
update_site_option( 'allowedthemes', $allowed_themes );
wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) );
if ( false === strpos( $referer, '/network/themes.php' ) )
wp_redirect( network_admin_url( 'themes.php?enabled=1' ) );
else
wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) );
exit;
break;
case 'disable':