diff -r be944660c56a -r 3d72ae0968f4 wp/wp-admin/theme-install.php --- a/wp/wp-admin/theme-install.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-admin/theme-install.php Tue Sep 27 16:37:53 2022 +0200 @@ -21,6 +21,7 @@ exit; } +// Used in the HTML title tag. $title = __( 'Add Themes' ); $parent_file = 'themes.php'; @@ -34,9 +35,10 @@ $installed_themes = array(); } -foreach ( $installed_themes as $k => $v ) { - if ( false !== strpos( $k, '/' ) ) { - unset( $installed_themes[ $k ] ); +foreach ( $installed_themes as $theme_slug => $theme_data ) { + // Ignore child themes. + if ( str_contains( $theme_slug, '/' ) ) { + unset( $installed_themes[ $theme_slug ] ); } } @@ -123,7 +125,7 @@ ); $help_installing = - '
' . __( 'Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you’re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.' ) . '
' . + '' . __( 'Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you are interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.' ) . '
' . '' . __( 'To install the theme so you can preview it with your site’s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Manage Themes screen and clicking the "Live Preview" link under any installed theme’s thumbnail image.' ) . '
'; get_current_screen()->add_help_tab( @@ -136,7 +138,7 @@ get_current_screen()->set_help_sidebar( '' . __( 'For more information:' ) . '
' . - '' . __( 'Documentation on Adding New Themes' ) . '
' . + '' . __( 'Documentation on Adding New Themes' ) . '
' . '' . __( 'Support' ) . '
' ); @@ -220,15 +222,14 @@ // and to ensure tags are translated. $feature_list = get_theme_feature_list( false ); - foreach ( $feature_list as $feature_name => $features ) { + foreach ( $feature_list as $feature_group => $features ) { echo ''; @@ -281,7 +282,7 @@