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
This commit is contained in:
Helen Hou-Sandi 2020-10-20 19:12:54 +00:00
parent 9defd1fabc
commit 29394d8a25
1 changed files with 1 additions and 1 deletions

View File

@ -649,7 +649,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
$updates = array(); $updates = array();
$no_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' ); $updates_transient = get_site_transient( 'update_themes' );
if ( isset( $updates_transient->response ) ) { if ( isset( $updates_transient->response ) ) {
$updates = $updates_transient->response; $updates = $updates_transient->response;