From f7bd4afbeb51368ea1b4b798fae7c63cab8e5252 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 7 Mar 2012 23:39:56 +0000 Subject: [PATCH] Only update the old allowed_themes network option from the main site admin or in the network admin. see #20103, #20146. git-svn-id: https://develop.svn.wordpress.org/trunk@20145 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index f6fe593fac..c21face3ab 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -1103,7 +1103,7 @@ final class WP_Theme implements ArrayAccess { $allowed_themes = $converted; } // Set the option so we never have to go through this pain again. - if ( is_admin() ) { + if ( ( is_admin() && is_main_site() ) || is_network_admin() ) { update_site_option( 'allowedthemes', $allowed_themes ); delete_site_option( 'allowed_themes' ); }