From 6d7522917da018b3905eff783e6fb1cfcdf4455f Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@20145 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 f6fe593fa..c21face3a 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' ); }