diff --git a/composer.json b/composer.json index d357af5..7e22162 100644 --- a/composer.json +++ b/composer.json @@ -54,8 +54,7 @@ "helsingborg-stad/acf-export-manager": ">=1.0.0", "symfony/polyfill-intl-idn": "1.31.0", "helsingborg-stad/wpservice": "^2.0", - "helsingborg-stad/acfservice": "^0.8.1", - "helsingborg-stad/component-library": "^4" + "helsingborg-stad/acfservice": "^0.8.1" }, "require-dev": { "codedungeon/phpunit-result-printer": "^0.32.0", @@ -72,6 +71,9 @@ "yoast/phpunit-polyfills": "^3.0", "wp-cli/wp-cli": "^2.11" }, + "suggest": { + "helsingborg-stad/component-library": "Required for modal feature." + }, "config": { "allow-plugins": { "composer/installers": true, diff --git a/source/php/App.php b/source/php/App.php index 2cda73c..434295a 100644 --- a/source/php/App.php +++ b/source/php/App.php @@ -221,7 +221,7 @@ public function __construct( $contextDetectionAsset->addHooks(); // Add modal, if enabled - if($config->getContextCheckIsModalActive()) { + if($config->getContextCheckIsModalActive() && class_exists('\ComponentLibrary\Init')) { $modal = new \BrokenLinkDetector\Modal( $wpService, $config,