Make WordPress Core


Ignore:
Timestamp:
02/12/2024 09:46:14 PM (10 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/twentysixteen/functions.php

    r57069 r57601  
    148148            array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
    149149            '',
    150             twentysixteen_fonts_url()
     150            (string) twentysixteen_fonts_url()
    151151        );
    152152        add_editor_style( array( 'css/editor-style.css', $font_stylesheet ) );
Note: See TracChangeset for help on using the changeset viewer.