Make WordPress Core

Changeset 57601


Ignore:
Timestamp:
02/12/2024 09:46:14 PM (3 years 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.

Location:
trunk/src/wp-content/themes
Files:
5 edited

Legend:

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

    r57069 r57601  
    185185                        array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
    186186                        '',
    187                         twentyfifteen_fonts_url()
     187                        (string) twentyfifteen_fonts_url()
    188188                );
    189189                add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', $font_stylesheet ) );
  • 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' ) );
  • 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 ) );
  • 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 ) );
  • 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.