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. Built from https://develop.svn.wordpress.org/trunk@57601 git-svn-id: http://core.svn.wordpress.org/trunk@57102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fb3ce8ed15
commit
bc39cfc822
|
@ -184,7 +184,7 @@ if ( ! function_exists( 'twentyfifteen_setup' ) ) :
|
||||||
$font_stylesheet = str_replace(
|
$font_stylesheet = str_replace(
|
||||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
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 ) );
|
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(
|
$font_stylesheet = str_replace(
|
||||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
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' ) );
|
add_editor_style( array( 'css/editor-style.css', $font_stylesheet, 'genericons/genericons.css' ) );
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ function twentyseventeen_setup() {
|
||||||
$font_stylesheet = str_replace(
|
$font_stylesheet = str_replace(
|
||||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
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 ) );
|
add_editor_style( array( 'assets/css/editor-style.css', $font_stylesheet ) );
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) :
|
||||||
$font_stylesheet = str_replace(
|
$font_stylesheet = str_replace(
|
||||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
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 ) );
|
add_editor_style( array( 'css/editor-style.css', $font_stylesheet ) );
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ function twentythirteen_setup() {
|
||||||
$font_stylesheet = str_replace(
|
$font_stylesheet = str_replace(
|
||||||
array( get_template_directory_uri() . '/', get_stylesheet_directory_uri() . '/' ),
|
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 ) );
|
add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', $font_stylesheet ) );
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5-alpha-57600';
|
$wp_version = '6.5-alpha-57601';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue