Make WordPress Core

Changeset 49253


Ignore:
Timestamp:
10/20/2020 07:12:54 PM (15 months ago)
Author:
helen
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/theme.php

    r49241 r49253  
    650650    $updates    = array();
    651651    $no_updates = array();
    652     if ( current_user_can( 'update_themes' ) ) {
     652    if ( ! is_multisite() && current_user_can( 'update_themes' ) ) {
    653653        $updates_transient = get_site_transient( 'update_themes' );
    654654        if ( isset( $updates_transient->response ) ) {
Note: See TracChangeset for help on using the changeset viewer.