diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-admin/theme-install.php --- a/wp/wp-admin/theme-install.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-admin/theme-install.php Fri Sep 05 18:40:08 2025 +0200 @@ -10,7 +10,7 @@ require_once __DIR__ . '/admin.php'; require ABSPATH . 'wp-admin/includes/theme-install.php'; -wp_reset_vars( array( 'tab' ) ); +$tab = ! empty( $_REQUEST['tab'] ) ? sanitize_text_field( $_REQUEST['tab'] ) : ''; if ( ! current_user_can( 'install_themes' ) ) { wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); @@ -56,7 +56,6 @@ 'l10n' => array( 'addNew' => __( 'Add New Theme' ), 'search' => __( 'Search Themes' ), - 'searchPlaceholder' => __( 'Search themes...' ), // Placeholder (no ellipsis). 'upload' => __( 'Upload Theme' ), 'back' => __( 'Back' ), 'error' => sprintf( @@ -70,7 +69,7 @@ 'noThemesFound' => __( 'No themes found. Try a different search.' ), 'collapseSidebar' => __( 'Collapse Sidebar' ), 'expandSidebar' => __( 'Expand Sidebar' ), - /* translators: Accessibility text. */ + /* translators: Hidden accessibility text. */ 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ), ), 'installedThemes' => array_keys( $installed_themes ), @@ -90,6 +89,7 @@ * * Possible hook names include: * + * - `install_themes_pre_block-themes` * - `install_themes_pre_dashboard` * - `install_themes_pre_featured` * - `install_themes_pre_new` @@ -98,6 +98,7 @@ * - `install_themes_pre_upload` * * @since 2.8.0 + * @since 6.1.0 Added the `install_themes_pre_block-themes` hook name. */ do_action( "install_themes_pre_{$tab}" ); } @@ -136,10 +137,24 @@ ) ); +// Help tab: Block themes. +$help_block_themes = + '
' . __( 'A block theme is a theme that uses blocks for all parts of a site including navigation menus, header, content, and site footer. These themes are built for the features that allow you to edit and customize all parts of your site.' ) . '
' . + '' . __( 'With a block theme, you can place and edit blocks without affecting your content by customizing or creating new templates.' ) . '
'; + +get_current_screen()->add_help_tab( + array( + 'id' => 'block_themes', + 'title' => __( 'Block themes' ), + 'content' => $help_block_themes, + ) +); + get_current_screen()->set_help_sidebar( '' . __( 'For more information:' ) . '
' . - '' . __( 'Documentation on Adding New Themes' ) . '
' . - '' . __( 'Support' ) . '
' + '' . __( 'Documentation on Adding New Themes' ) . '
' . + '' . __( 'Documentation on Block Themes' ) . '
' . + '' . __( 'Support forums' ) . '
' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -167,15 +182,25 @@