Make WordPress Core

Ticket #49831: 49831.1.diff

File 49831.1.diff, 1.1 KB (added by pbiron, 5 years ago)
  • src/wp-admin/includes/theme.php

    From 4021f1c21135cad58fbab0f6995b48cad1915436 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Tue, 15 Sep 2020 16:10:41 -0600
    Subject: [PATCH] Prevent theme updates from being shown in Appearance > Themes
     (and in the Customizer) in multisite.
    
    This brings the themes screen into parity with the plugins screen, where updates are also not shown.
    ---
     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 21730339cd..c862d002c4 100644
    a b function wp_prepare_themes_for_js( $themes = null ) { 
    649649
    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 ) ) {
    655655                        $updates = $updates_transient->response;