From e2513d51609c77c5ab1a1d0b0b33151458d6ff7c Mon Sep 17 00:00:00 2001 From: Josh Betz Date: Wed, 28 Mar 2018 11:15:50 -0500 Subject: [PATCH] Allow CONCAT_FILES_ROOT to be set outside the plugin If CONCAT_FILES_ROOT is already set, use that instead of forcing it to be defined here. In some instances, we may want to customize the location of core files. --- ngx-http-concat.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ngx-http-concat.php b/ngx-http-concat.php index 541b7ed..f55fe74 100644 --- a/ngx-http-concat.php +++ b/ngx-http-concat.php @@ -25,7 +25,7 @@ /* Constants */ // By default determine the document root from this scripts path in the plugins dir (you can hardcode this define) -define( 'CONCAT_FILES_ROOT', substr( dirname( __DIR__ ), 0, strpos( dirname( __DIR__ ), '/wp-content' ) ) ); +defined( 'CONCAT_FILES_ROOT' ) || define( 'CONCAT_FILES_ROOT', substr( dirname( __DIR__ ), 0, strpos( dirname( __DIR__ ), '/wp-content' ) ) ); function concat_http_status_exit( $status ) { switch ( $status ) {