128 if ( $rtl && isset($style->extra['rtl']) && $style->extra['rtl'] ) { |
122 if ( $rtl && isset($style->extra['rtl']) && $style->extra['rtl'] ) { |
129 $rtl_path = is_bool($style->extra['rtl']) ? str_replace( '.css', '-rtl.css', $path ) : ABSPATH . $style->extra['rtl']; |
123 $rtl_path = is_bool($style->extra['rtl']) ? str_replace( '.css', '-rtl.css', $path ) : ABSPATH . $style->extra['rtl']; |
130 $content .= get_file($rtl_path) . "\n"; |
124 $content .= get_file($rtl_path) . "\n"; |
131 } |
125 } |
132 |
126 |
133 $out .= str_replace( '../images/', 'images/', $content ); |
127 if ( strpos( $style->src, '/wp-includes/css/' ) === 0 ) { |
|
128 $content = str_replace( '../images/', '../wp-includes/images/', $content ); |
|
129 $out .= str_replace( '../js/tinymce/', '../wp-includes/js/tinymce/', $content ); |
|
130 } else { |
|
131 $out .= str_replace( '../images/', 'images/', $content ); |
|
132 } |
134 } |
133 } |
135 |
134 |
136 header('Content-Type: text/css'); |
135 header('Content-Type: text/css'); |
137 header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
136 header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
138 header("Cache-Control: public, max-age=$expires_offset"); |
137 header("Cache-Control: public, max-age=$expires_offset"); |
139 |
138 |
140 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { |
139 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { |
141 header('Vary: Accept-Encoding'); // Handle proxies |
140 header('Vary: Accept-Encoding'); // Handle proxies |
142 if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { |
141 if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { |
143 header('Content-Encoding: deflate'); |
142 header('Content-Encoding: deflate'); |
144 $out = gzdeflate( $out, 3 ); |
143 $out = gzdeflate( $out, 3 ); |
145 } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) { |
144 } elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) { |
146 header('Content-Encoding: gzip'); |
145 header('Content-Encoding: gzip'); |
147 $out = gzencode( $out, 3 ); |
146 $out = gzencode( $out, 3 ); |
148 } |
147 } |
149 } |
148 } |
150 |
149 |