Bundled Themes: Make Twenty Twenty the new default theme.
After being imported in [46271], Twenty Twenty can now be set as the default theme in WordPress. See #48110. Props desrosj, ocean90. git-svn-id: https://develop.svn.wordpress.org/trunk@46278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e256cb1bef
commit
0f1636c621
@ -241,15 +241,15 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
* @param object $theme {
|
* @param object $theme {
|
||||||
* An object that contains theme data returned by the WordPress.org API.
|
* An object that contains theme data returned by the WordPress.org API.
|
||||||
*
|
*
|
||||||
* @type string $name Theme name, e.g. 'Twenty Nineteen'.
|
* @type string $name Theme name, e.g. 'Twenty Twenty'.
|
||||||
* @type string $slug Theme slug, e.g. 'twentynineteen'.
|
* @type string $slug Theme slug, e.g. 'twentytwenty'.
|
||||||
* @type string $version Theme version, e.g. '1.1'.
|
* @type string $version Theme version, e.g. '1.1'.
|
||||||
* @type string $author Theme author username, e.g. 'melchoyce'.
|
* @type string $author Theme author username, e.g. 'melchoyce'.
|
||||||
* @type string $preview_url Preview URL, e.g. 'http://2019.wordpress.net/'.
|
* @type string $preview_url Preview URL, e.g. 'http://2020.wordpress.net/'.
|
||||||
* @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentynineteen/'.
|
* @type string $screenshot_url Screenshot URL, e.g. 'https://wordpress.org/themes/twentytwenty/'.
|
||||||
* @type float $rating Rating score.
|
* @type float $rating Rating score.
|
||||||
* @type int $num_ratings The number of ratings.
|
* @type int $num_ratings The number of ratings.
|
||||||
* @type string $homepage Theme homepage, e.g. 'https://wordpress.org/themes/twentynineteen/'.
|
* @type string $homepage Theme homepage, e.g. 'https://wordpress.org/themes/twentytwenty/'.
|
||||||
* @type string $description Theme description.
|
* @type string $description Theme description.
|
||||||
* @type string $download_link Theme ZIP download URL.
|
* @type string $download_link Theme ZIP download URL.
|
||||||
* }
|
* }
|
||||||
|
@ -825,6 +825,7 @@ $_new_bundled_files = array(
|
|||||||
'themes/twentysixteen/' => '4.4',
|
'themes/twentysixteen/' => '4.4',
|
||||||
'themes/twentyseventeen/' => '4.7',
|
'themes/twentyseventeen/' => '4.7',
|
||||||
'themes/twentynineteen/' => '5.0',
|
'themes/twentynineteen/' => '5.0',
|
||||||
|
'themes/twentytwenty/' => '5.3',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -446,13 +446,15 @@ Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.'
|
|||||||
'sidebars_widgets',
|
'sidebars_widgets',
|
||||||
array(
|
array(
|
||||||
'wp_inactive_widgets' => array(),
|
'wp_inactive_widgets' => array(),
|
||||||
'sidebar-1' => array(
|
'footer-one' => array(
|
||||||
0 => 'search-2',
|
0 => 'search-2',
|
||||||
1 => 'recent-posts-2',
|
1 => 'recent-posts-2',
|
||||||
2 => 'recent-comments-2',
|
2 => 'recent-comments-2',
|
||||||
3 => 'archives-2',
|
),
|
||||||
4 => 'categories-2',
|
'footer-two' => array(
|
||||||
5 => 'meta-2',
|
0 => 'archives-2',
|
||||||
|
1 => 'categories-2',
|
||||||
|
2 => 'meta-2',
|
||||||
),
|
),
|
||||||
'array_version' => 3,
|
'array_version' => 3,
|
||||||
)
|
)
|
||||||
|
@ -542,8 +542,8 @@ if ( ! $locations_screen ) : // Main tab
|
|||||||
/* translators: 1: URL to Widgets screen, 2 and 3: The names of the default themes. */
|
/* 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 <a href="%1$s">Widgets</a> 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.' ),
|
__( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a “Navigation Menu” widget on the <a href="%1$s">Widgets</a> 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' ),
|
admin_url( 'widgets.php' ),
|
||||||
'Twenty Seventeen',
|
'Twenty Nineteen',
|
||||||
'Twenty Nineteen'
|
'Twenty Twenty'
|
||||||
) . '</p>';
|
) . '</p>';
|
||||||
$overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
|
$overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
|
||||||
$overview .= '<ul><li>' . __( 'Create, edit, and delete menus' ) . '</li>';
|
$overview .= '<ul><li>' . __( 'Create, edit, and delete menus' ) . '</li>';
|
||||||
|
@ -54,6 +54,7 @@ final class WP_Theme implements ArrayAccess {
|
|||||||
'twentysixteen' => 'Twenty Sixteen',
|
'twentysixteen' => 'Twenty Sixteen',
|
||||||
'twentyseventeen' => 'Twenty Seventeen',
|
'twentyseventeen' => 'Twenty Seventeen',
|
||||||
'twentynineteen' => 'Twenty Nineteen',
|
'twentynineteen' => 'Twenty Nineteen',
|
||||||
|
'twentytwenty' => 'Twenty Twenty',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -404,7 +404,7 @@ function wp_templating_constants() {
|
|||||||
* @see WP_Theme::get_core_default_theme()
|
* @see WP_Theme::get_core_default_theme()
|
||||||
*/
|
*/
|
||||||
if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
|
if ( ! defined( 'WP_DEFAULT_THEME' ) ) {
|
||||||
define( 'WP_DEFAULT_THEME', 'twentynineteen' );
|
define( 'WP_DEFAULT_THEME', 'twentytwenty' );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class Tests_WP_Customize_Widgets extends WP_UnitTestCase {
|
|||||||
|
|
||||||
unset( $GLOBALS['_wp_sidebars_widgets'] ); // clear out cache set by wp_get_sidebars_widgets()
|
unset( $GLOBALS['_wp_sidebars_widgets'] ); // clear out cache set by wp_get_sidebars_widgets()
|
||||||
$sidebars_widgets = wp_get_sidebars_widgets();
|
$sidebars_widgets = wp_get_sidebars_widgets();
|
||||||
$this->assertEqualSets( array( 'wp_inactive_widgets', 'sidebar-1' ), array_keys( wp_get_sidebars_widgets() ) );
|
$this->assertEqualSets( array( 'wp_inactive_widgets', 'footer-one', 'footer-two' ), array_keys( wp_get_sidebars_widgets() ) );
|
||||||
$this->assertContains( 'search-2', $sidebars_widgets['sidebar-1'] );
|
$this->assertContains( 'search-2', $sidebars_widgets['sidebar-1'] );
|
||||||
$this->assertContains( 'categories-2', $sidebars_widgets['sidebar-1'] );
|
$this->assertContains( 'categories-2', $sidebars_widgets['sidebar-1'] );
|
||||||
$this->assertArrayHasKey( 2, get_option( 'widget_search' ) );
|
$this->assertArrayHasKey( 2, get_option( 'widget_search' ) );
|
||||||
|
@ -18,6 +18,7 @@ class Tests_Theme extends WP_UnitTestCase {
|
|||||||
'twentysixteen',
|
'twentysixteen',
|
||||||
'twentyseventeen',
|
'twentyseventeen',
|
||||||
'twentynineteen',
|
'twentynineteen',
|
||||||
|
'twentytwenty',
|
||||||
);
|
);
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
|
Loading…
Reference in New Issue
Block a user