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/twentyfourteen/functions.php

    r57069 r57601  
    8282            array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
    8383            '',
    84             twentyfourteen_font_url()
     84            (string) twentyfourteen_font_url()
    8585        );
    8686        add_editor_style( array( 'css/editor-style.css', $font_stylesheet, 'genericons/genericons.css' ) );
Note: See TracChangeset for help on using the changeset viewer.