diff --git a/wp-content/themes/twentytwenty/assets/js/index.js b/wp-content/themes/twentytwenty/assets/js/index.js index 1fac06fe83..f0597e2c79 100644 --- a/wp-content/themes/twentytwenty/assets/js/index.js +++ b/wp-content/themes/twentytwenty/assets/js/index.js @@ -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 diff --git a/wp-content/themes/twentytwenty/functions.php b/wp-content/themes/twentytwenty/functions.php index a4f50dc420..ad1a3f614c 100644 --- a/wp-content/themes/twentytwenty/functions.php +++ b/wp-content/themes/twentytwenty/functions.php @@ -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>/iU', sprintf( '$1 "%1$s"', get_the_title( get_the_ID() ) ), $html ); + return preg_replace( '/(.*)<\/a>/iU', sprintf( '$2 "%1$s"', get_the_title( get_the_ID() ) ), $html ); } add_filter( 'the_content_more_link', 'twentytwenty_read_more_tag' ); diff --git a/wp-content/themes/twentytwenty/readme.txt b/wp-content/themes/twentytwenty/readme.txt index 1d9bed7321..5944560bea 100644 --- a/wp-content/themes/twentytwenty/readme.txt +++ b/wp-content/themes/twentytwenty/readme.txt @@ -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() \ No newline at end of file +- twentytwenty_unique_id() + +Underscores +https://underscores.me/, (C) 2012-2019 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html) diff --git a/wp-content/themes/twentytwenty/style-rtl.css b/wp-content/themes/twentytwenty/style-rtl.css index a36d632f2a..bf7c0c6538 100644 --- a/wp-content/themes/twentytwenty/style-rtl.css +++ b/wp-content/themes/twentytwenty/style-rtl.css @@ -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/ diff --git a/wp-includes/version.php b/wp-includes/version.php index 209e4347d1..cc4357fed7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-46665'; +$wp_version = '5.4-alpha-46668'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.