From beca5ad5a3ce94030b24a1d23ae982449c7049d0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 18 Oct 2014 19:04:20 +0000 Subject: [PATCH] wp_add_inline_style(): * Change the `wp-inline-style-$handle` class added in [29956] to `$handle-inline-css` for consistency with existing patterns. * Add the ID attribute when concatenation is enabled as well. props georgestephanis. see #30032. Built from https://develop.svn.wordpress.org/trunk@29958 git-svn-id: http://core.svn.wordpress.org/trunk@29705 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class.wp-styles.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/class.wp-styles.php b/wp-includes/class.wp-styles.php index 23cb95a968..5147926c10 100644 --- a/wp-includes/class.wp-styles.php +++ b/wp-includes/class.wp-styles.php @@ -110,7 +110,7 @@ class WP_Styles extends WP_Dependencies { if ( $this->do_concat ) { $this->print_html .= $tag; if ( $inline_style = $this->print_inline_style( $handle, false ) ) - $this->print_html .= sprintf( "\n", $inline_style ); + $this->print_html .= sprintf( "\n", esc_attr( $handle ), $inline_style ); } else { echo $tag; $this->print_inline_style( $handle ); @@ -147,9 +147,7 @@ class WP_Styles extends WP_Dependencies { return $output; } - echo "\n"; + printf( "\n", esc_attr( $handle ), $output ); return true; }