From 29394d8a254ff849370fe8fc9771b38199a13f83 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Tue, 20 Oct 2020 19:12:54 +0000 Subject: [PATCH] Upgrade/Install: Don't show theme update prompts on subsites. If you are using `wp_prepare_themes_for_js()` and relying on `updates`/`no_updates` in multisite, you will need to filter that data back in using the `wp_prepare_themes_for_js` hook. Props pbiron, afragen. Fixes #49831. git-svn-id: https://develop.svn.wordpress.org/trunk@49253 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index e83653bc17..f11a6fc234 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -649,7 +649,7 @@ function wp_prepare_themes_for_js( $themes = null ) { $updates = array(); $no_updates = array(); - if ( current_user_can( 'update_themes' ) ) { + if ( ! is_multisite() && current_user_can( 'update_themes' ) ) { $updates_transient = get_site_transient( 'update_themes' ); if ( isset( $updates_transient->response ) ) { $updates = $updates_transient->response;