diff --git a/.gitignore b/.gitignore index 3a9875b..2659611 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/vendor/ composer.lock diff --git a/wp-autoless.php b/wp-autoless.php index a2b09d8..6ca2b2a 100644 --- a/wp-autoless.php +++ b/wp-autoless.php @@ -37,7 +37,7 @@ function compile () { foreach ( $lessfiles as $lessfile ) { $lessmtime = filemtime( $lessfile ); - $cssfile = str_replace( '.less', '.css', $lessfile ); + $cssfile = preg_replace( '/\.less$/i', '.css', $lessfile ); $cssmtime = file_exists ( $cssfile ) ? filemtime( $cssfile ) : '0'; if ( $cssmtime < $lessmtime ) {