mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57601 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ef53283061
commit
e1f0ce5f4b
@ -184,7 +184,7 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) :
|
||||
$font_stylesheet = str_replace(
|
||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
||||
'',
|
||||
twentyfifteen_fonts_url()
|
||||
(string) twentyfifteen_fonts_url()
|
||||
);
|
||||
add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', $font_stylesheet ) );
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ if ( ! function_exists( 'twentyfourteen_setup' ) ) :
|
||||
$font_stylesheet = str_replace(
|
||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
||||
'',
|
||||
twentyfourteen_font_url()
|
||||
(string) twentyfourteen_font_url()
|
||||
);
|
||||
add_editor_style( array( 'css/editor-style.css', $font_stylesheet, 'genericons/genericons.css' ) );
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ function twentyseventeen_setup() {
|
||||
$font_stylesheet = str_replace(
|
||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
||||
'',
|
||||
twentyseventeen_fonts_url()
|
||||
(string) twentyseventeen_fonts_url()
|
||||
);
|
||||
add_editor_style( array( 'assets/css/editor-style.css', $font_stylesheet ) );
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) :
|
||||
$font_stylesheet = str_replace(
|
||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
||||
'',
|
||||
twentysixteen_fonts_url()
|
||||
(string) twentysixteen_fonts_url()
|
||||
);
|
||||
add_editor_style( array( 'css/editor-style.css', $font_stylesheet ) );
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ function twentythirteen_setup() {
|
||||
$font_stylesheet = str_replace(
|
||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
||||
'',
|
||||
twentythirteen_fonts_url()
|
||||
(string) twentythirteen_fonts_url()
|
||||
);
|
||||
add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', $font_stylesheet ) );
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user