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.

Built from https://develop.svn.wordpress.org/trunk@49253


git-svn-id: http://core.svn.wordpress.org/trunk@49015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2020-10-20 19:14:09 +00:00
parent 499e4e9053
commit 874b812ce3
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-alpha-49252';
$wp_version = '5.6-alpha-49253';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.