Introducing Twenty Twenty-Five

The WordPress 6.7 release will feature a new default theme: Twenty Twenty-Five.

Four public domain film photographs: one showing a historical building, the other a close up of flowers, the other shows birds and the other an African woman. Below it is written Twenty Twenty-Five.

Concept

While ideating Twenty Twenty-Five, one recurring idea was that simple things should be intuitive while complex things should be possible. This concept of simplicity and complexity leads to a reliable foundation for extending a default WordPress experience to make it yours.

Twenty Twenty-Five embodies ultimate flexibility and adaptability, showcasing the many ways WordPress enables people to tell their stories with many patterns and styles to choose from. The glimpses of natural beauty and ancestry woven into the theme evoke ideas of impermanence, the passage of time, and continuous evolution.

The demo content imagery, all from the Public Domain, carries a poetic, universal, and ubiquitous tone that complements the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. concept. There was an opportunity to visually lean into a positive tone to bring softness, lightness, and inspiration through its aesthetic.

A collage kind of composition showing many of the photographs used in the 2025 default theme.

Patterns

Structurally, Twenty Twenty-Five offers a robust set of patterns, promoting interoperability and enabling users to compose intentional pages quickly. A broad range of patterns was designed for categories such as services, about, landing pages, products, calls to actions, events, and others.

A broad range of patterns designed for the 2025 theme in categories like services, about, landing pages, products, calls to actions, events, etc.

Styles

Given the theme’s global use, high-quality and comprehensive fonts that support multiple languages have been considered from the first conceptual steps of the design. Furthermore, we’re refining a set of diverse color palettes to be bundled within the theme as style variations.

Eight different color palettes that were designed for the 2025 default theme.
Eight different typography pairings that were designed for the 2025 default theme.
Showing nine examples applied to different templates of style variations designed for the 2025 theme.

Templates

Twenty Twenty-Five also features a versatile set of blogblog (versus network, site) templates: text-centric blogs with sidebars, photo blogs that highlight featured images, and more complex blogs with diverse content. Twenty Twenty-Five will be fully compatible with the Site Editor and will use many of the new design tools like the Grid blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. and Pattern/Section Styles.

Personal Blog (Default)

In keeping with the idea of simplicity, the personal blog tendency is to lean on a default template that just works, whether you want to write a post with a title and featured imageFeatured image A featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts. or not, and showing all the post’s content out-of-the-box, instead of just excerpts.

Two mockups: the one on the left shows blog posts with an image, a post title and the full content of the post and the one on the right shows a single post.

Photo Blog (Alternative)

The alternative “photo blog” templates tailored primarily for photography or portfolios lean on an image-heavy approach, with interesting layouts that can be used for a variety of purposes.

Two mockups: the one on the left shows just the featured image of blog posts and the one on the right shows a single post with a full width image.

Complex Blog (Alternative)

Lastly, the set of complex blog alternative templates would be more suitable for websites with greater complexity in content. Some of these templates, with more variety in type scales and more opinionated designs can also appeal to different audiences.

Two mockups: the one on the left shows a 3 column grid with blog posts containing featured images and post titles followed by a 2 column grid, and the one on the right shows a single post with a big left-aligned title, post meta and a wide image, followed by post content with a sidebar on the right.

Development

As part of the 6.7 release, Carolina Nymark (@poena) and Juanfra Aldasoro (@juanfra) are leading development while Beatriz Fialho (@beafialho) is leading design. If you’re interested in contributing, make sure you’re following this blog; we look forward to your involvement and support throughout the process. 

The Figma file is the design source of truth. Comments in the main file are open, and anyone should feel free to duplicate the Figma to their drafts and remix. Both of these actions are free, whereas every edit access is paid and therefore reserved.

Theme development will happen on the Twenty Twenty-Five GitHub repository. You can contribute by submitting and reviewing pull requests or opening new issues and, as usual, once the theme is stable, it will be merged into Core and the GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ repository will be archived.

Starting on Wednesday August 21st at 3:00 PM UTC , there will be weekly Slack meetings in #core-themes to coordinate development of the theme. Agenda notes will be posted before meetings and summaries posted after the meeting.

Learn more

For information about previous default themes, read the following posts:

Here are a few resources if you’re interested in learning more about Block Themes and the Site Editor:

+make.wordpress.org/themes/

Props @richtabor, @karmatosed, @priethor, @poena, @cbringmann and @joen for helping co-create this post and to @luminuu for proofreading it.

#6-7, #bundled-theme, #twenty-twenty-five

Bundled Theme Bug Scrubs

Starting Monday, April 15th 2024 at 13:00 UTC there will be a bundled theme bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub.

Currently, there are over 326 tickets in the bundled theme component queue. Recently, efforts have been made to reduce the queue, which is going well. This is part of the default theme taskforce work this year. Now is also a great time to introduce a scrub as part of that process. The following is what to expect:

  • An hour going through tickets one by one.
  • Progressing each ticketticket Created for both bug reports and feature development on the bug tracker. raised in some way: this might be through keywords or time-framed discussions.
  • The scrub will be held in #core-themes within SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.
  • Scrubs will be held every two weeks.

Thanks to @poena @luminuu @desrosj for pre-publication review.

#bug-scrub #bundled-theme #core-themes

Default Theme chat summary: September 6, 2023

This post summarizes the latest weekly Default Theme meeting (agenda, slack transcript), held in the #core-themes SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ channel, on Wednesday, september 6th 2023 at 3pm UTC.

Announcements

Twenty Twenty-Four introduction post: https://make.wordpress.org/core/2023/08/24/introducing-twenty-twenty-four/

Housekeeping and updates

  • Most patterns are in the theme, but need polish
  • Over 40 contributors so far

Changes in the editor are needed for the default theme. Please check out the list of issues and PRs relevant to TT4 and see if you can help in any way.

Open Floor

@colorful-tones proposed adding clarification for contributors to add the new define( ‘WP_DEVELOPMENT_MODE’, ‘theme’ ); in their wp-config.php. Will open a PR for the theme’s README

Translations will happen later on because it is hard to keep updating patterns and then making sure the translations functions persist when copy/pasting blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. markup from editor into files.

@maneshtimilsina pointed out that there are some issues with new lines, non-uniform spaces/tabs, which can be verified with linting. It exists in the repo. We’ll wait and do this as part of the overall cleanup later on.

@onemaggie is prioritizing getting patterns merged

It would be helpful for someone to do a walk-through of how to modify a pattern in the Site Editor, which could help onboard contributors (and be used in future default themes going forward).

Reminder: contributing to the theme is not just adding patterns or designing things, but documentation and triaging communication and GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ issues/PRs is invaluable work too.

Props to @colorful-tones for helping with creating this post.

#6-4 #bundled-theme #core-themes #summary #twenty-twenty-four

Default Theme Chat Agenda: September 6th, 2023

This is the agenda for the weekly Default Theme chat scheduled for Sep 6th, 2023, 3pm UTC.

This meeting is held in the #core-themes channel in Making WordPress SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.

  • Topics
    • Housekeeping and updates
    • Changes in the editor needed for the default theme.
  • Open Floor

#6-4 #agenda #bundled-theme #core-themes #twenty-twenty-four

Default Theme chat summary: August 30th, 2023

This post summarizes the latest weekly Default Theme meeting (agenda, slack transcript), held in the #core-themes SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ channel, on Wednesday, August 30th 2023 at 3pm UTC.

Announcements

  • This meeting is aimed at the work around the next default theme Twenty Twenty-Four, which will be released with WordPress 6.4 in November. Please keep the topic on the theme!
  • We set the meeting time to Wednesday, 3pm UTC. In the agenda, the meeting time will be noted with the automatic timezone conversion. The meetings happen weekly and may be switched to bi-weekly if we’re closer to the release.
  • The next default theme has been introduced last week: Introduction to Twenty Twenty-Four
  • How you can contribute:
    • The work on TT4 will happen in this GithubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ repository: https://github.com/WordPress/twentytwentyfour
    • Please read through the readme file carefully, as it contains important information on how to get started.
    • If you want to contribute, check out the open issues and Pull Requests first, to see if your topic has been addressed already. If not, feel free to open an issue!
    • It would be fantastic if you can link a created PR to an issue, so it’s easier to keep track of things.

Open Floor

@maneshtimilsina mentioned contributers get confused about using esc_html__ or esc_html_x_ functions in patterns for translations.

  • Resource to translation documentation: https://developer.wordpress.org/apis/internationalization/internationalization-functions/
  • Resource to esc_html__ documentation: https://developer.wordpress.org/reference/functions/esc_html__/
  • Resource to esc_html_x documentation: https://developer.wordpress.org/reference/functions/esc_html_x/
  • Discussion summary:
    • Patterns should be checked if they use the correct functions
    • Any sample text should be commented that this is sample text, using the esc_html_x function
    • Any strings that may need further explanation to be correctly translated also need comments
    • Check on previous default themes for similar strings to see how it was handled there

@maneshtimilsina mentioned that there’s confusion about the home.php file, which contains multiple patterns

  • The patterns should be extracted into smaller components, which then possibly make home.php not needed anymore.

@kafleg mentioned the backlog of open PRs regarding patterns in the repository.

  • These will be taken care of this week.

@poena asked about the status of pattern categories and pattern switching for 6.4, and if this will work with non synced patterns

  • It seems this has not yet been discussed, an issue needs to be created to start a discussion around this topic

#6-4 #bundled-theme #core-themes #summary #twenty-twenty-four

Default Theme Chat Agenda: August 30th, 2023

This is the agenda for the weekly Default Theme chat scheduled for Aug 30, 2023 3pm UTC.

This meeting is held in the #core-themes channel in Making WordPress SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.

Props to @poena for helping with creating this post.

#6-4 #agenda #bundled-theme #core-themes #twenty-twenty-four

Introducing Twenty Twenty-Four

Hey, everyone! It’s that time of the year. A brand new default theme will be featured with the next WordPress 6.4 release: Twenty Twenty-Four.

The Concept

The idea behind Twenty Twenty-Four is to make a default theme that can be used on any type of site, with any topic. Because of that, and contrary to past years, it has no single topic. Instead, three use cases were explored: one more tailored for entrepreneurs and small businesses, one tailored for photographers and artists and one specifically tailored for writers and bloggers. In essence, it’s a collection of templates and patterns which, all combined, make up a theme. These patterns include different Home templates for different use cases such as an About page, project overviews, RSVPs, and landing pages.

Twenty Twenty-Four’s styles and elements are instantly recognizable, inspired by modern design trends. The theme uses Cardo font for headlines, which provides a hint of elegance and a sans-serif system font for paragraphs. The default color palette of Twenty Twenty Four is light, and it also includes a dark style variation that maintains the same typography. Additionally, there are two more sans-serif variations available: one in light mode and another in dark mode.

Twenty Twenty-Four will be a blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. theme fully compatible with all the site editor tooling and it will surface new design tools like the details block or vertical text. Another key intent for the theme is to properly present whole page patterns and template variations so that users don’t need to assemble whole pages themselves, thus easing up their site building process.

Thanks to Twenty Twenty-Four’s remarkable flexibility and adaptability, a multitude of possibilities open up with just a few adjustments to color and typography. This beautiful theme was designed by Beatriz Fialho.

Development

As part of the 6.4 release, Maggie Cabrera and Jessica Lyschik are leading development. We are looking forward to your involvement and support throughout the process. If you’re interested in contributing, make sure you’re following this blogblog (versus network, site).

There’s a guiding Figma file that will continue to be updated as work progresses.

Theme development will happen on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ and, as usual, once the theme is stable, it will be merged into CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and its GitHub repository will be deprecated. A repository has been created here that you can follow if you’d like:

https://github.com/wordpress/twentytwentyfour

Starting on August 30th at 3:00 PM UTC, there will be weekly SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ meetings in #core-themes to coordinate development of the theme.

Learn more

For information about about previous default themes, you can read the following posts:

If you’re interested in learning more about Block Themes and Full Site Editing, here are some resources for you:

Props @kellychoffman @richtabor @beafialho @annezazu @onemaggie @luminuu @joen for helping co-create this post.

#6-4 #bundled-theme #core-themes #twenty-twenty-four

+make.wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org//themes/

#core-themes

Bundled themes dropping Internet Explorer scripts and styles

Due to very low traffic from Internet Explorer users, and because WordPress no longer supports this obsolete browser, default themes have removed some IE-specific scripts and styles to give everyone else a better experience.

Most default themes had a skip-link focus fix script for navigating by keyboard in Internet Explorer and old versions of Chrome. As of WordPress 6.3, Twenty Thirteen and Twenty Fourteen no longer include it in their functions.js files, and the six themes from Twenty Fifteen to Twenty Twenty-One do not enqueue or print the script.

In addition, special stylesheets and the HTML5 Shiv script are not enqueued or included in the header.php template for three themes:

  • Twenty Thirteen (its conditional code is also removed)
  • Twenty Fifteen
  • Twenty Seventeen

Future versions of Twenty Eleven, Twenty Twelve, Twenty Fourteen and Twenty Sixteen may remove their special styles and conditional code too.

What if I want to continue supporting Internet Explorer?

Twenty Thirteen users can add a minified version of the script found in later themes:

function wpdocs_twentythirteen_add_skip_link_fix_inline() {
	wp_add_inline_script(
		'twentythirteen-script',
		'/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);'
	);
}
add_action( 'wp_enqueue_scripts', 'wpdocs_twentythirteen_add_skip_link_fix_inline', 11 );

Twenty Fourteen would need an adjustment for the fixed headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.:

function wpdocs_twentyfourteen_add_skip_link_fix_inline() {
	wp_add_inline_script(
		'twentyfourteen-script',
		'/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus(),window.scrollBy(0,-80))},!1);'
	);
}
add_action( 'wp_enqueue_scripts', 'wpdocs_twentyfourteen_add_skip_link_fix_inline', 11 );

Enqueue the theme’s script for Twenty Fifteen, Twenty Sixteen or Twenty Seventeen:

function wpdocs_twentyseventeen_add_skip_link_fix() {
	wp_enqueue_script( 'twentyseventeen-skip-link-focus-fix' );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_twentyseventeen_add_skip_link_fix' );

Add the theme’s function to the wp_print_footer_scripts action for Twenty Nineteen, Twenty Twenty or Twenty Twenty-One:

add_action( 'wp_print_footer_scripts', 'twenty_twenty_one_skip_link_focus_fix' );

Restoring conditional code, styles and scripts

Sites may have been severely broken when using old versions of Internet Explorer, even with the HTML5 Shiv script and IE-specific styles, but you could add them again.

If you have a child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. It’s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/ of Twenty Thirteen, you can ensure it has a header.php template that includes the conditional code and HTML5 script from previous versions of the theme. Then you could enqueue the styles in the child theme functions (or a pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party.).

function wpdocs_twentythirteen_ie_restore() {
	wp_enqueue_style( 'twentythirteen-ie' );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_twentythirteen_ie_restore' );

For Twenty Fifteen, you could enqueue the two IE stylesheets. If a child theme does not already have the HTML5 script in a header.php template, the same function could enqueue that too.

function wpdocs_twentyfifteen_ie_restore() {
	// Enqueue stylesheets.
	wp_enqueue_style( 'twentyfifteen-ie' );
	wp_enqueue_style( 'twentyfifteen-ie7' );

	// If the header template does not have the HTML5 script already, enqueue it.
	wp_enqueue_script(
		'twentyfifteen-html5',
		get_template_directory_uri() . '/js/html5.js',
		array(),
		'3.7.0',
		false
	);
	wp_script_add_data( 'twentyfifteen-html5', 'conditional', 'lt IE 9' );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_twentyfifteen_ie_restore' );

With Twenty Seventeen, both the style and script can be enqueued.

function wpdocs_twentyseventeen_ie_restore() {
	wp_enqueue_style( 'twentyseventeen-ie8' );
	wp_enqueue_script( 'html5' );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_twentyseventeen_ie_restore' );

For more details, see TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets #54421 and #56699.

Props to @westonruter and @joedolson for technical review, to @stevenlinx and @audrasjb for review.

#6-3, #bundled-theme, #core-themes, #dev-notes, #dev-notes6-3

Google Fonts are included locally in bundled themes

Due to privacy concerns, the themes from Twenty Twelve to Twenty Seventeen will not fetch their fonts from Google addresses, starting with the next version.

Twenty Twelve3.9
Twenty Thirteen3.8
Twenty Fourteen3.6
Twenty Fifteen3.4
Twenty Sixteen2.9
Twenty Seventeen3.2


Each theme would serve a new stylesheet from the theme directory, under the site’s domain. With multiple fonts, Twenty Thirteen creates a reference like this:

<link rel='stylesheet' id='twentythirteen-fonts-css' href='https://example.com/wp-content/themes/twentythirteen/fonts/source-sans-pro-plus-bitter.css?ver=20230328' media='all' />

If you have edited or removed the font stylesheet in a child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. It’s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/ or pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party., please verify that your site will work properly with this change.

Language support

When a language has disabled certain custom fonts, the stylesheet should continue to respect that setting.

Google Fonts had offered all character sets, ignoring any specified in the URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org, so the new styles for all six themes likewise gather the font files for any character sets. Modern browsers select only the sets they need for the page.

Developers may still choose only certain character subsets, either to create a reduced stylesheet or to use in a preload resource hint. Creating an array of language codes could help, mapping them to their script families.

Fixing the editor style within a custom theme-setup function

Twenty Fourteen, Twenty Fifteen and Twenty Sixteen have allowed custom overrides to their setup functions in a child theme.

  • twentyfourteen_setup()
  • twentyfifteen_setup()
  • twentysixteen_setup()

For the blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor, the new font stylesheet URL needs to be relative in the add_editor_style() function, or else it would try fetching fonts from a nonexistent wp-admin URL. If a child theme replaces the setup function, it should remove the theme directory before including the fonts in the editor style array. Twenty Fourteen has this (arranged in fewer lines):

$font_stylesheet = str_replace(
	array(
		get_template_directory_uri() . '/',
		get_stylesheet_directory_uri() . '/'
	),
	'',
	twentyfourteen_font_url()
);
add_editor_style(
	array(
		'css/editor-style.css',
		$font_stylesheet,
		'genericons/genericons.css'
	)
);

Removing the font stylesheet

Twenty Fifteen and Twenty Sixteen have allowed replacing the font stylesheet since their debut, and the upcoming versions of the other four themes will enable the same. (Previous versions of those four would cause an error by declaring the function twice.)

To remove the font stylesheet and use system fonts, you could return an empty string in the child theme’s functions.php.

function twentyfifteen_fonts_url() {
	return '';
}

To protect against errors in older versions of Twenty Twelve, Twenty Thirteen, Twenty Fourteen or Twenty Seventeen, the child theme could establish a minimum version for the parent theme before declaring the function.

if ( version_compare( wp_get_theme( 'twentythirteen' )->get( 'Version' ), '3.8', '>=' ) ) {
	function twentythirteen_fonts_url() {
		return '';
	}
}

Including a custom set of fonts in the child theme

A child theme could include a different set of fonts and its own stylesheet. For example, a site that needs additional weights and styles for Montserrat—but does not use Twenty Sixteen’s other fonts—could have this in its functions.php:

function twentysixteen_fonts_url() {
	return get_stylesheet_directory_uri() . '/fonts/montserrat-all.css';
}

Classic Editor would require special considerations for the new URL:

  1. The above example uses '/fonts/montserrat-all.css' because Twenty Sixteen has '/fonts/montserrat.css' in its directory. If the child theme’s filename and directory match a stylesheet in the parent theme, the editor would fetch both stylesheets. Child themes that already have a font stylesheet with the same name and directory could use the mce_css filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. to remove the extra file.
  2. If the child theme font URL includes a version query string, whether hardcoding ver=1.0 or using add_query_arg(), Classic Editor would ignore the entire stylesheet. If the version is important on the front end, the function could add the parameter only when it is not an administration page.

Child themes also could build similar stylesheets to override choices in the parent font stylesheet. If you want to extend the time limit for fonts to load and replace system fonts, you could change the font-display property to swap and refer to the parent theme’s font files within your theme’s stylesheet.

/* montserrat-latin-400-normal */
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-display: swap;
	font-weight: 400;
	/* Go up two levels if this stylesheet is at '/fonts/montserrat-all.css' in the child theme. */
	src:
		url('../../twentysixteen/fonts/montserrat/montserrat-latin-400-normal.woff2?ver=25') format('woff2'),
		url('../../twentysixteen/fonts/montserrat/montserrat-all-400-normal.woff?ver=25') format('woff');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

Adjusting the query string

If you amended parameters in the Google Fonts URL with add_query_arg or remove_query_arg, those adjustments would not have the desired effect anymore.

Without a child theme, the default stylesheet can be replaced within a plugin:

function wpdocs_replace_twentyseventeen_font_stylesheet( $src, $handle ) {
	if ( 'twentyseventeen-fonts' === $handle ) {
		$src = plugins_url( '/css/new-font.css', __FILE__ );
	}
	return $src;
}
add_filter( 'style_loader_src', 'wpdocs_replace_twentyseventeen_font_stylesheet', 10, 2 );

// Adjust for Classic Editor, too.
function wpdocs_replace_twentyseventeen_font_for_classic_editor( $mce_css ) {
	if ( ! empty( twentyseventeen_fonts_url() ) ) {
		$mce_css = str_replace(
			twentyseventeen_fonts_url(),
			plugins_url( '/css/new-font.css', __FILE__ ),
			$mce_css
		);
	}
	return $mce_css;
}
add_filter( 'mce_css', 'wpdocs_replace_twentyseventeen_font_for_classic_editor', 11 );

Continuing to use Google Fonts

If you created a custom Google Fonts URL and you do not need to change it to meet privacy laws, you may want to restore the preconnect resource hint filter. A PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher comment disables it, but either a child theme or a plugin can add the filter again. Each theme has its own filter callback name:

add_filter( 'wp_resource_hints', 'twentytwelve_resource_hints', 10, 2 );

For more information, please see ticketticket Created for both bug reports and feature development on the bug tracker. #55985.

Props to @audrasjb for help with the title, @milana_cap for formatting help, @bph for review.

#6-2, #bundled-theme, #core-privacy, #core-themes, #dev-notes, #dev-notes-6-2

Twenty Twenty-Two Chat Summary — 11 Oct 2021

In #core-themes, full transcript starts here. I (@jffng) facilitated the meeting. It was the first one!

Building TT2 for Full Site Editing

We discussed the approach to the theme’s development, which is developing this as a blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. theme and fixing as much in GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ as possible. One of the goals is for the theme to have as little CSSCSS Cascading Style Sheets. and PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher as possible.

Our current development focuses are two-fold:

  1. Identifying the gaps / blockers in Gutenberg. There is an overview issue tracking what’s needed on the Gutenberg side: https://github.com/WordPress/twentytwentytwo/issues/75 We could use help testing various blocks and filing issues whenever they’re not looking or working as expected.
  2. Block patterns coming soon, @kjellr is leading that effort. We could use help with PR reviews and testing as those become available, follow along using this tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.).

Meeting Cadence

We plan to do meetings once a week at this time (Mondays, 15 UTC), aiming to keep them around 30 minutes as to be respectful of folks time and focus on async for inclusivity.

Open Floor Q&A

  • How do we decide what needs to be worked on?
    • Ideally everything that’s being worked on has an issue — so if you find something that needs fixing, please open an issue for it, and then work on a PR.
    • Keep an eye on the github milestones
  • Is there a mechanism for collaborating on an issue?
    • Comment on the issue, so it’s clear you’re working on it and if folks want to collaborate, they can communicate in the issue and slackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ if needed
  • Is the way fonts are enqueued going to change?
  • Are you looking for triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. help?
    • You can pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” @kjellr or me (@jffng) if you would like to help this way.
  • Will TT2 align with the accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) level AA like TT1 did? How do we make sure this gets addressed?
    • Short answer is yes, let’s use this issue to track
    • A lot of this lands on Gutenberg, and for what we can do on the theme side, we hope to make this as accessible as possible. For example, the color palettes have been designed to pass WCAGWCAG WCAG is an acronym for Web Content Accessibility Guidelines. These guidelines are helping make sure the internet is accessible to all people no matter how they would need to access the internet (screen-reader, keyboard only, etc) https://www.w3.org/TR/WCAG21/. AAA contrast.
    • Button states will be important too.
#bundled-theme, #summary, #twenty-twenty-two