Make WordPress Core


Ignore:
Timestamp:
10/03/2023 03:12:30 PM (12 months ago)
Author:
hellofromTonya
Message:

Bundled Themes: Update TT4 for 6.4 Beta 2.

Twenty Twenty-Four (TT4) updates for 6.4 Beta 2.

Changes include bugfixes from the theme's development repo since Beta 1 such as:

  • Renamed patterns and images
  • Improved image descriptions
  • Polished a few of the templates to fit better the design
  • Addressed some a11y concerns.
  • Changed the required version to 6.4, aligning it with the last few default themes since we are making use of some of the features that will make it to 6.4, such as aspect ratio.

Follow-up to [56726], [56721], [56716].

Props onemaggie, desrosj, mukesh27.
Fixes #59524.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyfour/functions.php

    r56716 r56764  
    11<?php
    22/**
    3  * Twenty Twenty Four functions and definitions
     3 * Twenty Twenty-Four functions and definitions
    44 *
    55 * @link https://developer.wordpress.org/themes/basics/theme-functions/
     
    3434            array(
    3535                'handle' => 'twentytwentyfour-button-style-outline',
    36                 'src'    => get_template_directory_uri() . '/assets/css/button-outline.css',
     36                'src'    => get_theme_file_uri( 'assets/css/button-outline.css' ),
    3737                'ver'    => wp_get_theme()->get( 'Version' ),
     38                'path'   => get_theme_file_path( 'assets/css/button-outline.css' ),
    3839            )
    3940        );
    40 
    41         /**
    42          * Add the `path` data to our stylesheet.
    43          *
    44          * This will let WordPress determine the best loading strategy for the stylesheet:
    45          * Small stylesheets will get inlined, while larger stylesheets will be loaded separately.
    46          *
    47          * See https://make.wordpress.org/core/2021/07/01/block-styles-loading-enhancements-in-wordpress-5-8/#inlining-small-assets for more info.
    48          */
    49         wp_style_add_data( 'twentytwentyfour-button-style-outline', 'path', get_theme_file_path( 'assets/css/button-outline.css' ) );
    5041
    5142        register_block_style(
     
    6455                    border-bottom: 1px solid rgba(255, 255, 255, 0.20);
    6556                }
    66                
     57
    6758                .is-style-arrow-icon-details summary {
    6859                    list-style-type: "\2193\00a0\00a0\00a0";
    6960                }
    70                
     61
    7162                .is-style-arrow-icon-details[open]>summary {
    7263                    list-style-type: "\2192\00a0\00a0\00a0";
     
    9182                    border-radius: var(--wp--preset--spacing--20);
    9283                }
    93                
     84
    9485                .is-style-pill a:hover {
    9586                    background-color: var(--wp--preset--color--contrast-3);
     
    110101                    list-style-type: "\2713";
    111102                }
    112                
     103
    113104                ul.is-style-checkmark-list li {
    114105                    padding-inline-start: 1ch;
     106                }',
     107            )
     108        );
     109        register_block_style(
     110            'core/navigation-link',
     111            array(
     112                'name'         => 'arrow-link',
     113                'label'        => __( 'With arrow', 'twentytwentyfour' ),
     114                /*
     115                 * Styles for the custom arrow nav link block style
     116                 */
     117                'inline_style' => '
     118                .is-style-arrow-link .wp-block-navigation-item__label:after {
     119                    content: "\2197";
     120                    padding-inline-start: 0.25rem;
     121                    vertical-align: middle;
     122                    text-decoration: none;
     123                    display: inline-block;
    115124                }',
    116125            )
     
    130139                    display: block;
    131140                }
    132                
     141
     142                /* Hide the asterisk if the heading has no content, to avoid using empty headings to display the asterisk only, which is an A11Y issue */
     143                .is-style-asterisk:empty:before {
     144                    content: none;
     145                }
     146
     147                .is-style-asterisk:-moz-only-whitespace:before {
     148                    content: none;
     149                }
     150
    133151                .is-style-asterisk.has-text-align-center:before {
    134152                    margin: 0 auto;
    135153                }
    136                
     154
    137155                .is-style-asterisk.has-text-align-right:before {
    138156                    margin-left: auto;
    139157                }
    140                
     158
    141159                .rtl .is-style-asterisk.has-text-align-left:before {
    142160                    margin-right: auto;
Note: See TracChangeset for help on using the changeset viewer.