Commit edccced54e for wordpress.org

commit edccced54ee08467e982ac930eee5a756a281297
Author: peterwilsoncc <peterwilsoncc@git.wordpress.org>
Date:   Thu Oct 15 04:13:52 2026 +0000

    Themes: Restore Add Theme to appearance sub-menu.

    Restores the Appearance > Add Theme menu item within the dashboard. The menu item was removed in r13533 in favour of a tabbed layout that was subsequently removed in r26141.

    This makes the appearance menu consistent with the posts, pages, media, plugins and users menus.

    Developed in https://github.com/WordPress/wordpress-develop/pull/14135.

    Props afercia, aristath, audrasjb, chaion07, dhruvang21, joedolson, joyously, sergeybiryukov.
    Fixes #47124.

    Built from https://develop.svn.wordpress.org/trunk@64352


    git-svn-id: http://core.svn.wordpress.org/trunk@63502 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-admin/menu.php b/wp-admin/menu.php
index 2a3430ebc3..789805d9aa 100644
--- a/wp-admin/menu.php
+++ b/wp-admin/menu.php
@@ -224,31 +224,35 @@ if ( ! is_multisite() && current_user_can( 'update_themes' ) ) {
 	/* translators: %s: Number of available theme updates. */
 	$submenu['themes.php'][5] = array( sprintf( __( 'Themes %s' ), $count ), $appearance_capability, 'themes.php' );

+if ( ! is_multisite() ) {
+	$submenu['themes.php'][6] = array( __( 'Add Theme' ), 'install_themes', 'theme-install.php', '', 'hide-if-no-js' );
+}
+
 if ( wp_is_block_theme() ) {
-	$submenu['themes.php'][6] = array( _x( 'Editor', 'site editor menu item' ), 'edit_theme_options', 'site-editor.php' );
+	$submenu['themes.php'][7] = array( _x( 'Editor', 'site editor menu item' ), 'edit_theme_options', 'site-editor.php' );
 } else {
 	$supports_stylebook = ( current_theme_supports( 'editor-styles' ) || wp_theme_has_theme_json() );

 	if ( $supports_stylebook ) {
-		$submenu['themes.php'][6] = array( _x( 'Design', 'design menu item' ), 'edit_theme_options', 'site-editor.php' );
+		$submenu['themes.php'][7] = array( _x( 'Design', 'design menu item' ), 'edit_theme_options', 'site-editor.php' );
 	} else {
-		$submenu['themes.php'][6] = array( _x( 'Patterns', 'patterns menu item' ), 'edit_theme_options', 'site-editor.php?p=/pattern' );
+		$submenu['themes.php'][7] = array( _x( 'Patterns', 'patterns menu item' ), 'edit_theme_options', 'site-editor.php?p=/pattern' );
 	}
 }

 // Font Library menu item.
-$submenu['themes.php'][9] = array( __( 'Fonts' ), 'edit_theme_options', 'font-library.php' );
+$submenu['themes.php'][10] = array( __( 'Fonts' ), 'edit_theme_options', 'font-library.php' );

 $customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' );

 // Hide Customize link on block themes unless a plugin or theme
 // is using 'customize_register' to add a setting.
 if ( ! wp_is_block_theme() || has_action( 'customize_register' ) ) {
-	$submenu['themes.php'][7] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
+	$submenu['themes.php'][8] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
 }

 if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
-	$submenu['themes.php'][10] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' );
+	$submenu['themes.php'][11] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' );
 }

 if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize' ) ) {
diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php
index a611a68193..2532b30766 100644
--- a/wp-admin/theme-install.php
+++ b/wp-admin/theme-install.php
@@ -26,7 +26,7 @@ $title       = __( 'Add Themes' );
 $parent_file = 'themes.php';

 if ( ! is_network_admin() ) {
-	$submenu_file = 'themes.php';
+	$submenu_file = 'theme-install.php';
 }

 $installed_themes = search_theme_directories();
diff --git a/wp-admin/update.php b/wp-admin/update.php
index a0ba9cfc06..c19e64e579 100644
--- a/wp-admin/update.php
+++ b/wp-admin/update.php
@@ -283,7 +283,7 @@ if ( isset( $_GET['action'] ) ) {
 		// Used in the HTML title tag.
 		$title        = __( 'Install Themes' );
 		$parent_file  = 'themes.php';
-		$submenu_file = 'themes.php';
+		$submenu_file = 'theme-install.php';

 		require_once ABSPATH . 'wp-admin/admin-header.php';

diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index ff532eee14..b56f4986fa 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -5628,7 +5628,7 @@ function wp_widgets_add_menu() {
 	if ( wp_is_block_theme() ) {
 		$submenu['themes.php'][] = array( $menu_name, 'edit_theme_options', 'widgets.php' );
 	} else {
-		$submenu['themes.php'][8] = array( $menu_name, 'edit_theme_options', 'widgets.php' );
+		$submenu['themes.php'][9] = array( $menu_name, 'edit_theme_options', 'widgets.php' );
 	}

 	ksort( $submenu['themes.php'], SORT_NUMERIC );
diff --git a/wp-includes/version.php b/wp-includes/version.php
index e3dee3a630..aaab11a042 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-alpha-64351';
+$wp_version = '7.2-alpha-64352';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.