Make WordPress Core


Ignore:
Timestamp:
02/12/2024 09:46:14 PM (5 months ago)
Author:
audrasjb
Message:

Bundled Themes: Cast font URL functions to string for add_editor_style().

This changeset ensures the result of the font URL functions is a string before using it in add_editor_style(), to avoid PHP warnings on child themes. This similarily updates Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen, and Twenty Seventeen.

Props jordesign, SergeyBiryukov, sabernhardt, huzaifaalmesbah, shailu25.
Fixes #59704.

File:
1 edited

Legend:

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

    r57296 r57601  
    121121        array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
    122122        '',
    123         twentyseventeen_fonts_url()
     123        (string) twentyseventeen_fonts_url()
    124124    );
    125125    add_editor_style( array( 'assets/css/editor-style.css', $font_stylesheet ) );
Note: See TracChangeset for help on using the changeset viewer.