Skip to content
Permalink
Browse files

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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.2@45528 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
desrosj committed Jun 13, 2019
1 parent 1e089c3 commit 30e6113002a8e4fbbc6cbcd003597dc098e5efcf
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/wp-includes/customize/class-wp-customize-theme-control.php
@@ -93,8 +93,15 @@ public function content_template() {
<div class="update-message notice inline notice-warning notice-alt" data-slug="{{ data.theme.id }}">
<p>
<?php
/* translators: %s: "Update now" button */
printf( __( 'New version available. %s' ), '<button class="button-link update-theme" type="button">' . __( 'Update now' ) . '</button>' );
if ( is_multisite() ) {
_e( 'New version available.' );
} else {
printf(
/* translators: %s: "Update now" button */
__( 'New version available. %s' ),
'<button class="button-link update-theme" type="button">' . __( 'Update now' ) . '</button>'
);
}
?>
</p>
</div>

0 comments on commit 30e6113

Please sign in to comment.
You can’t perform that action at this time.