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

    r57069 r57601  
    9494        array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
    9595        '',
    96         twentythirteen_fonts_url()
     96        (string) twentythirteen_fonts_url()
    9797    );
    9898    add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', $font_stylesheet ) );
Note: See TracChangeset for help on using the changeset viewer.