Make WordPress Core

Changeset 45528 for branches/5.2


Ignore:
Timestamp:
06/13/2019 03:33:27 PM (7 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.

Reviewed by desrosj and azaozz.
Merges [45527] to the 5.2 branch.

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

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-includes/customize/class-wp-customize-theme-control.php

    r43571 r45528  
    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.