From 8c0e2c0392cbdb98053b5da3b52275bb22875a4e Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 17 Dec 2020 05:06:48 -0800 Subject: [PATCH] Only load hero CSS when active. --- e107_plugins/hero/e_header.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/e107_plugins/hero/e_header.php b/e107_plugins/hero/e_header.php index d88b7a3fd..2d879add6 100644 --- a/e107_plugins/hero/e_header.php +++ b/e107_plugins/hero/e_header.php @@ -13,15 +13,14 @@ if (!defined('e107_INIT')) { exit; } +$heroVisibility = e107::pref('hero', 'visibility', e_UC_NOBODY); -if(USER_AREA) // prevents inclusion of JS/CSS/meta in the admin area. +if(USER_AREA && check_class($heroVisibility)) { - // @todo add check for the hero_menu being active. - e107::library('load', 'animate.css'); e107::css('hero', 'css/hero.css'); - } +unset($heroVisibility);