From a1b5440d4b4b59bc8d684222ac5c7d6b3a8e2d79 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 18 Oct 2014 19:03:11 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@29958 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class.wp-styles.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/class.wp-styles.php b/src/wp-includes/class.wp-styles.php index 23cb95a968..5147926c10 100644 --- a/src/wp-includes/class.wp-styles.php +++ b/src/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; }