File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1953,11 +1953,13 @@ function _custom_background_cb() {
19531953
19541954 $ style .= $ image . $ position . $ size . $ repeat . $ attachment ;
19551955 }
1956- ?>
1957- <style<?php echo $ type_attr ; ?> id="custom-background-css">
1958- body.custom-background { <?php echo trim ( $ style ); ?> }
1959- </style>
1960- <?php
1956+
1957+ $ processor = new WP_HTML_Tag_Processor ( "<style {$ type_attr } id= \"custom-background-css \"></style> " );
1958+ $ processor ->next_tag ();
1959+
1960+ $ style_tag_content = 'body.custom-background { ' . trim ( $ style ) . ' } ' ;
1961+ $ processor ->set_modifiable_text ( "\n{$ style_tag_content }\n" );
1962+ echo $ processor ->get_updated_html ();
19611963}
19621964
19631965/**
@@ -1967,7 +1969,7 @@ function _custom_background_cb() {
19671969 */
19681970function wp_custom_css_cb () {
19691971 $ styles = wp_get_custom_css ();
1970- if ( ! $ styles || ! is_customize_preview () ) {
1972+ if ( ! $ styles && ! is_customize_preview () ) {
19711973 return ;
19721974 }
19731975
You can’t perform that action at this time.
0 commit comments