Wordpress 3.7
[autoinstalls/wordpress.git] / wp-includes / class.wp-styles.php
index 48e8f7ef1d8f4f452f32aa51fa48b14b7b98b049..927a7e73073a961c4bdc78b68bdf7d70303ca0a8 100644 (file)
@@ -50,7 +50,7 @@ class WP_Styles extends WP_Dependencies {
                                $this->concat .= "$handle,";
                                $this->concat_version .= "$handle$ver";
 
-                               $this->print_code .= $this->get_data( $handle, 'after' );
+                               $this->print_code .= $this->print_inline_style( $handle, false );
 
                                return true;
                        }
@@ -87,7 +87,8 @@ 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;
                        $this->print_inline_style( $handle );
@@ -135,7 +136,7 @@ class WP_Styles extends WP_Dependencies {
        }
 
        function _css_href( $src, $ver, $handle ) {
-               if ( !is_bool($src) && !preg_match('|^https?://|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) {
+               if ( !is_bool($src) && !preg_match('|^(https?:)?//|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) {
                        $src = $this->base_url . $src;
                }