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.
Built from https://develop.svn.wordpress.org/trunk@45527


git-svn-id: http://core.svn.wordpress.org/trunk@45338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-06-13 15:31:52 +00:00
parent c622fb4fe1
commit 7be747f86d
2 changed files with 10 additions and 3 deletions

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>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45526';
$wp_version = '5.3-alpha-45527';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.