WordPress.org

Make WordPress Core

Ticket #48505: 48505.diff

File 48505.diff, 5.5 KB (added by williampatton, 12 months ago)
  • src/wp-content/themes/twentytwenty/assets/js/index.js

    diff --git a/src/wp-content/themes/twentytwenty/assets/js/index.js b/src/wp-content/themes/twentytwenty/assets/js/index.js
    index 1fac06fe83..f0597e2c79 100644
    a b twentytwenty.primaryMenu = { 
    523523                                self = self.parentElement;
    524524                        }
    525525                }
     526
     527                /**
     528                 * Toggles `focus` class to allow submenu access on tablets.
     529                 */
     530                ( function( menuObj ) {
     531                        var touchStartFn, j,
     532                                parentLink = menuObj.querySelectorAll( '.primary-menu .menu-item-has-children > a' );
     533
     534                        if ( 'ontouchstart' in window ) {
     535                                touchStartFn = function( e ) {
     536                                        var menuItem = this.parentNode;
     537
     538                                        if ( ! menuItem.classList.contains( 'focus' ) ) {
     539                                                e.preventDefault();
     540                                                for ( j = 0; j < menuItem.parentNode.children.length; ++j ) {
     541                                                        if ( menuItem === menuItem.parentNode.children[j] ) {
     542                                                                continue;
     543                                                        }
     544                                                        menuItem.parentNode.children[i].classList.remove( 'focus' );
     545                                                }
     546                                                menuItem.classList.add( 'focus' );
     547                                        } else {
     548                                                menuItem.classList.remove( 'focus' );
     549                                        }
     550                                };
     551
     552                                for ( j = 0; j < parentLink.length; ++j ) {
     553                                        parentLink[j].addEventListener( 'touchstart', touchStartFn, false );
     554                                }
     555                        }
     556                }( menu ) );
    526557        }
    527558}; // twentytwenty.primaryMenu
    528559
  • src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php

    diff --git a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php
    index 406a60511a..b178bcb454 100644
    a b if ( ! class_exists( 'TwentyTwenty_Non_Latin_Languages' ) ) { 
    1919                 * Get custom CSS.
    2020                 *
    2121                 * Return CSS for non-latin language, if available, or null
    22                  *
     22                 * 
    2323                 * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
    2424                 *
    2525                 * @return void
  • src/wp-content/themes/twentytwenty/functions.php

    diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php
    index a4f50dc420..cfe5f69092 100644
    a b add_action( 'wp_print_footer_scripts', 'twentytwenty_skip_link_focus_fix' ); 
    234234 */
    235235function twentytwenty_non_latin_languages() {
    236236        $custom_css = TwentyTwenty_Non_Latin_Languages::get_non_latin_css( 'front-end' );
    237 
     237       
    238238        if ( $custom_css ) {
    239239                wp_add_inline_style( 'twentytwenty-style', $custom_css );
    240240        }
    add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' ); 
    566566 * @return string $html
    567567 */
    568568function twentytwenty_read_more_tag( $html ) {
    569         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 );
     569        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 );
    570570}
    571571
    572572add_filter( 'the_content_more_link', 'twentytwenty_read_more_tag' );
  • src/wp-content/themes/twentytwenty/readme.txt

    diff --git a/src/wp-content/themes/twentytwenty/readme.txt b/src/wp-content/themes/twentytwenty/readme.txt
    index 1d9bed7321..5944560bea 100644
    a b Copyright (c) 2016 WordPress.org 
    8484License: GPLv2
    8585Source: https://wordpress.org/themes/twentyseventeen/
    8686Included as part of the following classes and functions:
    87 - twentytwenty_unique_id()
    88  No newline at end of file
     87- twentytwenty_unique_id()
     88
     89Underscores
     90https://underscores.me/, (C) 2012-2019 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)
  • src/wp-content/themes/twentytwenty/style-rtl.css

    diff --git a/src/wp-content/themes/twentytwenty/style-rtl.css b/src/wp-content/themes/twentytwenty/style-rtl.css
    index a36d632f2a..bf7c0c6538 100644
    a b Theme Name: Twenty Twenty 
    33Text Domain: twentytwenty
    44Version: 1.0
    55Description: 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.
    6 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
     6Tags: 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
    77Author: the WordPress team
    88Author URI: https://wordpress.org/
    99Theme URI: https://wordpress.org/themes/twentytwenty/