diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/theme-install.php --- a/wp/wp-admin/theme-install.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/theme-install.php Tue Dec 15 13:49:49 2020 +0100 @@ -7,8 +7,8 @@ */ /** WordPress Administration Bootstrap */ -require_once( dirname( __FILE__ ) . '/admin.php' ); -require( ABSPATH . 'wp-admin/includes/theme-install.php' ); +require_once __DIR__ . '/admin.php'; +require ABSPATH . 'wp-admin/includes/theme-install.php'; wp_reset_vars( array( 'tab' ) ); @@ -18,7 +18,7 @@ if ( is_multisite() && ! is_network_admin() ) { wp_redirect( network_admin_url( 'theme-install.php' ) ); - exit(); + exit; } $title = __( 'Add Themes' ); @@ -54,23 +54,25 @@ 'l10n' => array( 'addNew' => __( 'Add New Theme' ), 'search' => __( 'Search Themes' ), - 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) + 'searchPlaceholder' => __( 'Search themes...' ), // Placeholder (no ellipsis). 'upload' => __( 'Upload Theme' ), 'back' => __( 'Back' ), 'error' => sprintf( - /* translators: %s: support forums URL */ + /* translators: %s: Support forums URL. */ __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - __( 'https://wordpress.org/support/' ) + __( 'https://wordpress.org/support/forums/' ) ), 'tryAgain' => __( 'Try Again' ), + /* translators: %d: Number of themes. */ 'themesFound' => __( 'Number of Themes found: %d' ), 'noThemesFound' => __( 'No themes found. Try a different search.' ), 'collapseSidebar' => __( 'Collapse Sidebar' ), 'expandSidebar' => __( 'Expand Sidebar' ), - /* translators: accessibility text */ + /* translators: Accessibility text. */ 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ), ), 'installedThemes' => array_keys( $installed_themes ), + 'activeTheme' => get_stylesheet(), ) ); @@ -92,15 +94,15 @@ $help_overview = '
' . sprintf( - /* translators: %s: Theme Directory URL */ - __( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the WordPress Theme Directory. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ), + /* translators: %s: Theme Directory URL. */ + __( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the WordPress Theme Directory. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ), __( 'https://wordpress.org/themes/' ) ) . '
' . '' . __( 'You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter.' ) . ' ' . __( 'The search results will be updated as you type.' ) . '
' . '' . __( 'Alternately, you can browse the themes that are Featured, Popular, or Latest. When you find a theme you like, you can preview it or install it.' ) . '
' . '' . sprintf(
/* translators: %s: /wp-content/themes */
- __( 'You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme’s folder via FTP into your %s directory.' ),
+ __( 'You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme’s folder via FTP into your %s directory.' ),
'/wp-content/themes
'
) . '
' . __( 'For more information:' ) . '
' . - '' . __( 'Documentation on Adding New Themes' ) . '
' . + '' . __( 'Documentation on Adding New Themes' ) . '
' . '' . __( 'Support' ) . '
' ); -include( ABSPATH . 'wp-admin/admin-header.php' ); +require_once ABSPATH . 'wp-admin/admin-header.php'; ?>