From 123806ff28c3072f4c82f8bb12925c33ea65422f Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 20 Sep 2020 12:03:05 +0000 Subject: [PATCH] Themes: Remove the ability to delete themes from the single site Appearance screen on Multisite installations. This brings theme deletion inline with plugin deletion and theme and plugin editing, which can only be performed from within Network Admin. Props Mista-Flo, williampatton, johnbillion Fixes #41441 Built from https://develop.svn.wordpress.org/trunk@49011 git-svn-id: http://core.svn.wordpress.org/trunk@48773 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/theme.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 21730339cd..84b13c58f7 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -748,7 +748,7 @@ function wp_prepare_themes_for_js( $themes = null ) { 'actions' => array( 'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null, 'customize' => $customize_action, - 'delete' => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null, + 'delete' => ( ! is_multisite() && current_user_can( 'delete_themes' ) ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null, 'autoupdate' => wp_is_auto_update_enabled_for_type( 'theme' ) && ! is_multisite() && current_user_can( 'update_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=' . $auto_update_action . '&stylesheet=' . $encoded_slug ), 'updates' ) : null, diff --git a/wp-includes/version.php b/wp-includes/version.php index a76c0c98a2..dbbbed5f12 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49010'; +$wp_version = '5.6-alpha-49011'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.