From 029dd1bbb929eec4df5f57789ef42c076aab83f0 Mon Sep 17 00:00:00 2001
From: Jonathan Desrosiers
Date: Tue, 20 Oct 2020 02:02:37 +0000
Subject: [PATCH] Bundled Themes: Make Twenty Twenty-One the default theme.
After being imported in [49216], Twenty Twenty-One can now be set as the default theme in WordPress.
See #48110.
git-svn-id: https://develop.svn.wordpress.org/trunk@49220 602fd350-edb4-49c9-b593-d223f7449a82
---
.../includes/class-wp-theme-install-list-table.php | 10 +++++-----
src/wp-admin/includes/update-core.php | 1 +
src/wp-admin/nav-menus.php | 4 ++--
src/wp-includes/class-wp-theme.php | 1 +
src/wp-includes/default-constants.php | 2 +-
tests/phpunit/tests/theme.php | 1 +
6 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/wp-admin/includes/class-wp-theme-install-list-table.php b/src/wp-admin/includes/class-wp-theme-install-list-table.php
index 37ee8d459d..f721f9473d 100644
--- a/src/wp-admin/includes/class-wp-theme-install-list-table.php
+++ b/src/wp-admin/includes/class-wp-theme-install-list-table.php
@@ -246,15 +246,15 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
* @param object $theme {
* An object that contains theme data returned by the WordPress.org API.
*
- * @type string $name Theme name, e.g. 'Twenty Twenty'.
- * @type string $slug Theme slug, e.g. 'twentytwenty'.
+ * @type string $name Theme name, e.g. 'Twenty Twenty-One'.
+ * @type string $slug Theme slug, e.g. 'twentytwentyone'.
* @type string $version Theme version, e.g. '1.1'.
* @type string $author Theme author username, e.g. 'melchoyce'.
- * @type string $preview_url Preview URL, e.g. 'https://2020.wordpress.net/'.
- * @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentytwenty/'.
+ * @type string $preview_url Preview URL, e.g. 'https://2021.wordpress.net/'.
+ * @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentytwentyone/'.
* @type float $rating Rating score.
* @type int $num_ratings The number of ratings.
- * @type string $homepage Theme homepage, e.g. 'https://wordpress.org/themes/twentytwenty/'.
+ * @type string $homepage Theme homepage, e.g. 'https://wordpress.org/themes/twentytwentyone/'.
* @type string $description Theme description.
* @type string $download_link Theme ZIP download URL.
* }
diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php
index 27599cc192..aee5436305 100644
--- a/src/wp-admin/includes/update-core.php
+++ b/src/wp-admin/includes/update-core.php
@@ -835,6 +835,7 @@ $_new_bundled_files = array(
'themes/twentyseventeen/' => '4.7',
'themes/twentynineteen/' => '5.0',
'themes/twentytwenty/' => '5.3',
+ 'themes/twentytwentyone/' => '5.6',
);
/**
diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php
index 0715c854b5..adad318ee3 100644
--- a/src/wp-admin/nav-menus.php
+++ b/src/wp-admin/nav-menus.php
@@ -596,8 +596,8 @@ if ( ! $locations_screen ) : // Main tab.
/* translators: 1: URL to Widgets screen, 2 and 3: The names of the default themes. */
__( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a “Navigation Menu” widget on the Widgets screen. If your theme does not support the navigation menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ),
admin_url( 'widgets.php' ),
- 'Twenty Nineteen',
- 'Twenty Twenty'
+ 'Twenty Twenty',
+ 'Twenty Twenty-One'
) . '
';
$overview .= '' . __( 'From this screen you can:' ) . '
';
$overview .= '- ' . __( 'Create, edit, and delete menus' ) . '
';
diff --git a/src/wp-includes/class-wp-theme.php b/src/wp-includes/class-wp-theme.php
index 9bf81c9352..f75b957c71 100644
--- a/src/wp-includes/class-wp-theme.php
+++ b/src/wp-includes/class-wp-theme.php
@@ -59,6 +59,7 @@ final class WP_Theme implements ArrayAccess {
'twentyseventeen' => 'Twenty Seventeen',
'twentynineteen' => 'Twenty Nineteen',
'twentytwenty' => 'Twenty Twenty',
+ 'twentytwentyone' => 'Twenty Twenty-One',
);
/**
diff --git a/src/wp-includes/default-constants.php b/src/wp-includes/default-constants.php
index bb57b96536..21a855ad25 100644
--- a/src/wp-includes/default-constants.php
+++ b/src/wp-includes/default-constants.php
@@ -409,7 +409,7 @@ function wp_templating_constants() {
* @see WP_Theme::get_core_default_theme()
*/
if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
- define( 'WP_DEFAULT_THEME', 'twentytwenty' );
+ define( 'WP_DEFAULT_THEME', 'twentytwentyone' );
}
}
diff --git a/tests/phpunit/tests/theme.php b/tests/phpunit/tests/theme.php
index 22110f352f..c4022eefcb 100644
--- a/tests/phpunit/tests/theme.php
+++ b/tests/phpunit/tests/theme.php
@@ -19,6 +19,7 @@ class Tests_Theme extends WP_UnitTestCase {
'twentyseventeen',
'twentynineteen',
'twentytwenty',
+ 'twentytwentyone',
);
function setUp() {