Themes: After [46164], make sure $type_attr
is always defined in _custom_background_cb()
.
Props davidbaumwald. Fixes #48112. git-svn-id: https://develop.svn.wordpress.org/trunk@46270 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a9fb2f6a38
commit
d88473fa2f
@ -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( '<style%s id="custom-background-css"></style>', $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"';
|
||||
}
|
||||
?>
|
||||
<style<?php echo $type_attr; ?> id="custom-background-css">
|
||||
|
Loading…
Reference in New Issue
Block a user