From f252700dec7f4b46010645317cd4a184fbe27d6c Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 5 Nov 2019 22:30:04 +0000 Subject: [PATCH] Bundled Themes: Update Twenty Twenty. This brings Twenty Twenty in sync with GitHub. For a full list of changes since 5.3 RC3, see https://github.com/WordPress/twentytwenty/compare/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 --- .../themes/twentytwenty/assets/js/index.js | 31 +++++++++++++++++++ wp-content/themes/twentytwenty/functions.php | 2 +- wp-content/themes/twentytwenty/readme.txt | 5 ++- wp-content/themes/twentytwenty/style-rtl.css | 2 +- wp-includes/version.php | 2 +- 5 files changed, 38 insertions(+), 4 deletions(-) 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 4da746d049..95fc0a94ca 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.