Make WordPress Core


Ignore:
Timestamp:
10/15/2013 02:34:33 PM (13 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class.wp-styles.php

    r25202 r25786  
    8888        if ( $this->do_concat ) {
    8989            $this->print_html .= $tag;
    90             $this->print_html .= $this->print_inline_style( $handle, false );
     90            if ( $inline_style = $this->print_inline_style( $handle, false ) )
     91                $this->print_html .= sprintf( "<style type='text/css'>\n%s\n</style>\n", $inline_style );
    9192        } else {
    9293            echo $tag;
    93             echo $this->print_inline_style( $handle, false );
     94            $this->print_inline_style( $handle );
    9495        }
    9596
Note: See TracChangeset for help on using the changeset viewer.