From 2d4887f4c7dc3a18592facdc38120cf9146a1bf3 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 13 Jun 2019 15:30:37 +0000 Subject: [PATCH] =?UTF-8?q?Customize:=20Remove=20=E2=80=9CUpdate=E2=80=9D?= =?UTF-8?q?=20link=20for=20themes=20on=20multisite=20installs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../customize/class-wp-customize-theme-control.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/customize/class-wp-customize-theme-control.php b/src/wp-includes/customize/class-wp-customize-theme-control.php index 5aca6639b5..ce2594bff6 100644 --- a/src/wp-includes/customize/class-wp-customize-theme-control.php +++ b/src/wp-includes/customize/class-wp-customize-theme-control.php @@ -93,8 +93,15 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {

' . __( 'Update now' ) . '' ); + if ( is_multisite() ) { + _e( 'New version available.' ); + } else { + printf( + /* translators: %s: "Update now" button */ + __( 'New version available. %s' ), + '' + ); + } ?>