Make WordPress Core

Changeset 57842


Ignore:
Timestamp:
03/15/2024 01:38:36 PM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Use the $theme_version variable for font stylesheet.

This aims to bring more consistency with the other wp_enqueue_style() calls in the theme's functions.

Follow-up to [57311].

Props sabernhardt.
Fixes #60779.

File:
1 edited

Legend:

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

    r57589 r57842  
    193193
    194194    // Enqueue the CSS file for the variable font, Inter.
    195     wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' );
     195    wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), $theme_version, 'all' );
    196196
    197197    // Add output of Customizer settings as inline style.
     
    426426function twentytwenty_block_editor_styles() {
    427427
     428    $theme_version = wp_get_theme()->get( 'Version' );
     429
    428430    // Enqueue the editor styles.
    429     wp_enqueue_style( 'twentytwenty-block-editor-styles', get_theme_file_uri( '/assets/css/editor-style-block.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' );
     431    wp_enqueue_style( 'twentytwenty-block-editor-styles', get_theme_file_uri( '/assets/css/editor-style-block.css' ), array(), $theme_version, 'all' );
    430432    wp_style_add_data( 'twentytwenty-block-editor-styles', 'rtl', 'replace' );
    431433
     
    437439
    438440    // Enqueue the CSS file for the variable font, Inter.
    439     wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), wp_get_theme()->get( 'Version' ), 'all' );
     441    wp_enqueue_style( 'twentytwenty-fonts', get_theme_file_uri( '/assets/css/font-inter.css' ), array(), $theme_version, 'all' );
    440442
    441443    // Add inline style for non-latin fonts.
Note: See TracChangeset for help on using the changeset viewer.