Make WordPress Core


Ignore:
Timestamp:
06/13/2019 03:30:37 PM (5 years ago)
Author:
desrosj
Message:

Customize: Remove “Update” link for themes on multisite installs.

In [38887], installing themes in the Customizer was disabled for multisite installs. However, an update link continues to be displayed when a theme update is available. Clicking the link causes a JavaScript error.

This removes that update link because updates cannot actually be performed in the Customizer in this situation.

Props desrosj, earnjam, mukesh27, audrasjb, garrett-eclipse.
Fixes #46997.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-theme-control.php

    r45435 r45527  
    9494                    <p>
    9595                        <?php
    96                         /* translators: %s: "Update now" button */
    97                         printf( __( 'New version available. %s' ), '<button class="button-link update-theme" type="button">' . __( 'Update now' ) . '</button>' );
     96                        if ( is_multisite() ) {
     97                            _e( 'New version available.' );
     98                        } else {
     99                            printf(
     100                                /* translators: %s: "Update now" button */
     101                                __( 'New version available. %s' ),
     102                                '<button class="button-link update-theme" type="button">' . __( 'Update now' ) . '</button>'
     103                            );
     104                        }
    98105                        ?>
    99106                    </p>
Note: See TracChangeset for help on using the changeset viewer.