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
This commit is contained in:
parent
e8f35359d7
commit
123806ff28
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue