Bundled Themes: Import Twenty Twenty-Two, the new default theme for WordPress 5.9.
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.
To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.
Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52081
git-svn-id: http://core.svn.wordpress.org/trunk@51673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:02:02 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Twenty Twenty-Two functions and definitions
|
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/theme-functions/
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Twenty_Twenty_Two
|
|
|
|
* @since Twenty Twenty-Two 1.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentytwentytwo_support' ) ) :
|
|
|
|
|
|
|
|
/**
|
2021-11-15 20:15:04 +01:00
|
|
|
* Sets up theme defaults and registers support for various WordPress features.
|
Bundled Themes: Import Twenty Twenty-Two, the new default theme for WordPress 5.9.
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.
To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.
Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52081
git-svn-id: http://core.svn.wordpress.org/trunk@51673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:02:02 +01:00
|
|
|
*
|
|
|
|
* @since Twenty Twenty-Two 1.0
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function twentytwentytwo_support() {
|
|
|
|
|
2021-11-15 20:15:04 +01:00
|
|
|
// Add support for block styles.
|
Bundled Themes: Import Twenty Twenty-Two, the new default theme for WordPress 5.9.
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.
To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.
Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52081
git-svn-id: http://core.svn.wordpress.org/trunk@51673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:02:02 +01:00
|
|
|
add_theme_support( 'wp-block-styles' );
|
|
|
|
|
2021-11-15 20:15:04 +01:00
|
|
|
// Enqueue editor styles.
|
|
|
|
add_editor_style( 'style.css' );
|
|
|
|
|
Bundled Themes: Import Twenty Twenty-Two, the new default theme for WordPress 5.9.
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.
To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.
Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52081
git-svn-id: http://core.svn.wordpress.org/trunk@51673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:02:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
endif;
|
|
|
|
|
|
|
|
add_action( 'after_setup_theme', 'twentytwentytwo_support' );
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentytwentytwo_styles' ) ) :
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enqueue styles.
|
|
|
|
*
|
|
|
|
* @since Twenty Twenty-Two 1.0
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function twentytwentytwo_styles() {
|
|
|
|
// Register theme stylesheet.
|
Twenty Twenty-Two: Sync updates from GitHub for Beta 4.
This commit syncs changes for the default theme from its active development repository to core.
This is a follow up to [52081], [52107], [52164], [52222], [52283], [52335], and [52375]. It updates the theme's font size presets and fixes an issue with query padding.
To view the full set of changes, visit https://github.com/WordPress/twentytwentytwo/compare/623a4d798227a5eb948d0286d3fa779383997649...d6cb56cce4d4789965d05327ec54e48a1be4a171.
Props schlessera, williampatton, hellofromtonya, kjellr.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52392
git-svn-id: http://core.svn.wordpress.org/trunk@51984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-20 17:50:05 +01:00
|
|
|
$theme_version = wp_get_theme()->get( 'Version' );
|
|
|
|
|
|
|
|
$version_string = is_string( $theme_version ) ? $theme_version : false;
|
Bundled Themes: Import Twenty Twenty-Two, the new default theme for WordPress 5.9.
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.
To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.
Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52081
git-svn-id: http://core.svn.wordpress.org/trunk@51673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:02:02 +01:00
|
|
|
wp_register_style(
|
|
|
|
'twentytwentytwo-style',
|
|
|
|
get_template_directory_uri() . '/style.css',
|
|
|
|
array(),
|
Twenty Twenty-Two: Sync updates from GitHub for Beta 4.
This commit syncs changes for the default theme from its active development repository to core.
This is a follow up to [52081], [52107], [52164], [52222], [52283], [52335], and [52375]. It updates the theme's font size presets and fixes an issue with query padding.
To view the full set of changes, visit https://github.com/WordPress/twentytwentytwo/compare/623a4d798227a5eb948d0286d3fa779383997649...d6cb56cce4d4789965d05327ec54e48a1be4a171.
Props schlessera, williampatton, hellofromtonya, kjellr.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52392
git-svn-id: http://core.svn.wordpress.org/trunk@51984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-20 17:50:05 +01:00
|
|
|
$version_string
|
Bundled Themes: Import Twenty Twenty-Two, the new default theme for WordPress 5.9.
Twenty Twenty-Two arrives during an exciting time for WordPress themes. With the advent of Full Site Editing and Global Styles, themes are changing structurally and functionally to enable far more avenues for customization than users have come to expect in the past.
To take advantage of these new abilities, Twenty Twenty-Two has been designed to be the most flexible default theme ever created for WordPress.
Props sourav926, aristath, audrasjb, bgardner, briceduclos, poena, colorful-tones, dgwyer, dimadin, gregrickaby, ellenbauer, jffng, kafleg, karmatosed, kraftbj, kjellr, littlebigthing, onemaggie, matveb, mburridge, mtoensing, nickcernis, nielslange, williampatton, pgking, ribaricplusplus, scruffian, soean, utz119, youknowriad, desrosj, richtabor.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52081
git-svn-id: http://core.svn.wordpress.org/trunk@51673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 22:02:02 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
// Enqueue theme stylesheet.
|
|
|
|
wp_enqueue_style( 'twentytwentytwo-style' );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
endif;
|
|
|
|
|
|
|
|
add_action( 'wp_enqueue_scripts', 'twentytwentytwo_styles' );
|
|
|
|
|
|
|
|
// Add block patterns
|
|
|
|
require get_template_directory() . '/inc/block-patterns.php';
|