From d363d85cceb33df160542a52cbfe9b18a75eb62d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 23 Sep 2019 20:09:57 +0000 Subject: [PATCH] Themes: After [46164], make sure `$type_attr` is always defined in `_custom_background_cb()`. Props davidbaumwald. Fixes #48112. Built from https://develop.svn.wordpress.org/trunk@46270 git-svn-id: http://core.svn.wordpress.org/trunk@46082 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 5 ++--- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index e4cc8802f5..e0539b2681 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1646,9 +1646,10 @@ function _custom_background_cb() { $color = false; } + $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; + if ( ! $background && ! $color ) { if ( is_customize_preview() ) { - $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; printf( '', $type_attr ); } return; @@ -1701,8 +1702,6 @@ function _custom_background_cb() { $attachment = " background-attachment: $attachment;"; $style .= $image . $position . $size . $repeat . $attachment; - - $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; } ?> id="custom-background-css"> diff --git a/wp-includes/version.php b/wp-includes/version.php index d34e6e8e9f..7046e3e77d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-46269'; +$wp_version = '5.3-alpha-46270'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.