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
This commit is contained in:
parent
f25962ac14
commit
beca5ad5a3
|
@ -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( "<style type='text/css'>\n%s\n</style>\n", $inline_style );
|
||||
$this->print_html .= sprintf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\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 "<style id='wp-inline-style-" . esc_attr( $handle ) . "' type='text/css'>\n";
|
||||
echo "$output\n";
|
||||
echo "</style>\n";
|
||||
printf( "<style id='%s-inline-css' type='text/css'>\n%s\n</style>\n", esc_attr( $handle ), $output );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue