diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php
index b787d6ce1d..6c5da9fccb 100644
--- a/src/wp-admin/themes.php
+++ b/src/wp-admin/themes.php
@@ -300,6 +300,7 @@ if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_
@@ -308,6 +309,9 @@ $can_delete = current_user_can( 'delete_themes' );
|
+
+ |
+
@@ -325,6 +329,22 @@ $can_delete = current_user_can( 'delete_themes' );
|
errors()->get_error_code() ) {
+ $parent_theme_name = $broken_theme->get( 'Template' );
+ $parent_theme = themes_api( 'theme_information', array( 'slug' => urlencode( $parent_theme_name ) ) );
+
+ if ( ! is_wp_error( $parent_theme ) ) {
+ $install_url = add_query_arg( array(
+ 'action' => 'install-theme',
+ 'theme' => urlencode( $parent_theme_name ),
+ ), admin_url( 'update.php' ) );
+ $install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name );
+ ?>
+ |
+