Revert [25202] and enforce that wp_add_inline_style() does not want <style> tags.

Prior to 3.7, these tags were not printed (and thus needed to be provided), but only in the admin and when concatenation was enabled. They should never be required. Strip them when we find them and issue a notice for incorrect usage.

props atimmer, georgestephanis.
fixes #24813.


git-svn-id: https://develop.svn.wordpress.org/trunk@25786 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-10-15 14:34:33 +00:00
parent 5ceab9b1e3
commit 5e119ca3b4
3 changed files with 129 additions and 3 deletions
+3 -2
View File
@@ -87,10 +87,11 @@ class WP_Styles extends WP_Dependencies {
if ( $this->do_concat ) {
$this->print_html .= $tag;
$this->print_html .= $this->print_inline_style( $handle, false );
if ( $inline_style = $this->print_inline_style( $handle, false ) )
$this->print_html .= sprintf( "<style type='text/css'>\n%s\n</style>\n", $inline_style );
} else {
echo $tag;
echo $this->print_inline_style( $handle, false );
$this->print_inline_style( $handle );
}
return true;