Bundled Themes: Update Twenty Twenty.

This brings Twenty Twenty in sync with GitHub. For a full list of changes since 5.3 RC3, see dea9290...c267289.

Props williampatton, poena, andersnoren.
See #48110, #48386, #48450, #48293.
Fixes #48505.
Built from https://develop.svn.wordpress.org/branches/5.3@46669


git-svn-id: http://core.svn.wordpress.org/branches/5.3@46469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-11-05 22:30:04 +00:00
parent 30ea8d0dd9
commit f252700dec
5 changed files with 38 additions and 4 deletions

View File

@ -523,6 +523,37 @@ twentytwenty.primaryMenu = {
self = self.parentElement;
}
}
/**
* Toggles `focus` class to allow submenu access on tablets.
*/
( function( menuObj ) {
var touchStartFn, j,
parentLink = menuObj.querySelectorAll( '.primary-menu .menu-item-has-children > a' );
if ( 'ontouchstart' in window ) {
touchStartFn = function( e ) {
var menuItem = this.parentNode;
if ( ! menuItem.classList.contains( 'focus' ) ) {
e.preventDefault();
for ( j = 0; j < menuItem.parentNode.children.length; ++j ) {
if ( menuItem === menuItem.parentNode.children[j] ) {
continue;
}
menuItem.parentNode.children[i].classList.remove( 'focus' );
}
menuItem.classList.add( 'focus' );
} else {
menuItem.classList.remove( 'focus' );
}
};
for ( j = 0; j < parentLink.length; ++j ) {
parentLink[j].addEventListener( 'touchstart', touchStartFn, false );
}
}
}( menu ) );
}
}; // twentytwenty.primaryMenu

View File

@ -566,7 +566,7 @@ add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' );
* @return string $html
*/
function twentytwenty_read_more_tag( $html ) {
return preg_replace( '/<a.*>(.*)<\/a>/iU', sprintf( '<span class="faux-button">$1</span> <span class="screen-reader-text">"%1$s"</span>', get_the_title( get_the_ID() ) ), $html );
return preg_replace( '/<a(.*)>(.*)<\/a>/iU', sprintf( '<a$1><span class="faux-button">$2</span> <span class="screen-reader-text">"%1$s"</span></a>', get_the_title( get_the_ID() ) ), $html );
}
add_filter( 'the_content_more_link', 'twentytwenty_read_more_tag' );

View File

@ -84,4 +84,7 @@ Copyright (c) 2016 WordPress.org
License: GPLv2
Source: https://wordpress.org/themes/twentyseventeen/
Included as part of the following classes and functions:
- twentytwenty_unique_id()
- twentytwenty_unique_id()
Underscores
https://underscores.me/, (C) 2012-2019 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)

View File

@ -3,7 +3,7 @@ Theme Name: Twenty Twenty
Text Domain: twentytwenty
Version: 1.0
Description: Our default theme for 2020 is designed to take full advantage of the flexibility of the block editor. Organizations and businesses have the ability to create dynamic landing pages with endless layouts using the group and column blocks. The centered content column and fine-tuned typography also makes it perfect for traditional blogs. Complete editor styles give you a good idea of what your content will look like, even before you publish. You can give your site a personal touch by changing the background colors and the accent color in the Customizer. The colors of all elements on your site are automatically calculated based on the colors you pick, ensuring a high, accessible color contrast for your visitors.
Tags: blog, one-column, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks
Tags: blog, one-column, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
Author: the WordPress team
Author URI: https://wordpress.org/
Theme URI: https://wordpress.org/themes/twentytwenty/

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-RC3-46667';
$wp_version = '5.3-RC3-46669';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.