Make WordPress Core

Ticket #49831: 49831.diff

File 49831.diff, 1.8 KB (added by afragen, 5 years ago)
  • wp-admin/includes/theme.php

    diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php
    index 21730339cd..4d08c0fe5a 100644
    a b function wp_prepare_themes_for_js( $themes = null ) { 
    745745                                'supported' => $auto_update_supported,
    746746                                'forced'    => $auto_update_forced,
    747747                        ),
     748                        'isMultisite'    => is_multisite(),
    748749                        'actions'        => array(
    749750                                'activate'   => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
    750751                                'customize'  => $customize_action,
  • wp-admin/themes.php

    diff --git a/wp-admin/themes.php b/wp-admin/themes.php
    index 157a42e629..f09c0df93f 100644
    a b foreach ( $themes as $theme ) : 
    391391        <?php if ( $theme['hasUpdate'] ) : ?>
    392392                <?php if ( $theme['updateResponse']['compatibleWP'] && $theme['updateResponse']['compatiblePHP'] ) : ?>
    393393                        <div class="update-message notice inline notice-warning notice-alt"><p>
    394                                 <?php if ( $theme['hasPackage'] ) : ?>
     394                                <?php if ( $theme['hasPackage'] && ! is_multisite() ) : ?>
    395395                                        <?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?>
    396396                                <?php else : ?>
    397397                                        <?php _e( 'New version available.' ); ?>
    function wp_theme_auto_update_setting_template() { 
    730730        <# if ( data.hasUpdate ) { #>
    731731                <# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
    732732                        <div class="update-message notice inline notice-warning notice-alt"><p>
    733                                 <# if ( data.hasPackage ) { #>
     733                                <# if ( data.hasPackage && ! data.isMultisite ) { #>
    734734                                        <?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?>
    735735                                <# } else { #>
    736736                                        <?php _e( 'New version available.' ); ?>