From 8e88baee1a651c064603970092b4f1e9eec99c99 Mon Sep 17 00:00:00 2001 From: Jay Wood Date: Fri, 30 Sep 2016 11:48:17 -0400 Subject: [PATCH] Pre-set minified extensions --- content-warning-v3.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content-warning-v3.php b/content-warning-v3.php index f45f45b..3cfb786 100644 --- a/content-warning-v3.php +++ b/content-warning-v3.php @@ -47,6 +47,12 @@ class ContentWarning_v2 { const VERSION = '3.7'; + /** + * Rather or not scripts should be minified + * @var string + */ + public $min = ''; + /** * @var CWV2_Admin */ @@ -57,6 +63,10 @@ class ContentWarning_v2 { */ public $settings; + private function __construct() { + $this->min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; + } + public static function init() { if ( null == self::$instance ) { self::$instance = new self();