Astra_Enqueue_Scripts::trim_css( string $css = '' )
Trim CSS
Description
Parameters
- $css
-
(string) (Optional) CSS content to trim.
Default value: ''
Return
(string)
Source
File: inc/core/class-astra-enqueue-scripts.php
public static function trim_css( $css = '' ) { // Trim white space for faster page loading. if ( ! empty( $css ) ) { $css = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css ); $css = str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), '', $css ); $css = str_replace( ', ', ',', $css ); } return $css; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |