WordPress.org

Make WordPress Core

Changeset 46669


Ignore:
Timestamp:
11/05/2019 10:28:25 PM (13 days ago)
Author:
desrosj
Message:

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.

Location:
branches/5.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-content/themes/twentytwenty/assets/js/index.js

    r46614 r46669  
    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
  • branches/5.3/src/wp-content/themes/twentytwenty/functions.php

    r46614 r46669  
    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
  • branches/5.3/src/wp-content/themes/twentytwenty/readme.txt

    r46614 r46669  
    8686Included as part of the following classes and functions:
    8787- 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)
  • branches/5.3/src/wp-content/themes/twentytwenty/style-rtl.css

    r46614 r46669  
    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/
Note: See TracChangeset for help on using the changeset viewer.