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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45527 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2019-06-13 15:30:37 +00:00
parent 2ce0519f60
commit 2d4887f4c7

View File

@ -93,8 +93,15 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
<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>