From 8fa0f5b042458beea0505ffff859f663b2bf971f Mon Sep 17 00:00:00 2001 From: Izhar Aazmi Date: Thu, 7 Apr 2016 16:02:43 +0530 Subject: [PATCH] Load helix only in front-end application of Joomla. --- plugins/system/helix.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/plugins/system/helix.php b/plugins/system/helix.php index 7249482..5f6908e 100755 --- a/plugins/system/helix.php +++ b/plugins/system/helix.php @@ -15,6 +15,11 @@ class plgSystemHelix extends JPlugin { function onAfterInitialise() { + if (!JFactory::getApplication()->isSite()) + { + return; + } + $helix_path = JPATH_PLUGINS.'/system/helix/core/helix.php'; if (file_exists($helix_path)) { require_once($helix_path); @@ -28,6 +33,10 @@ function onAfterInitialise() //Added 2.1.6 function onContentPrepare($context, &$article) { + if (!JFactory::getApplication()->isSite()) + { + return; + } $userDef = ( $context == 'com_content.article' ) || ( $context == 'com_content.category' ) || @@ -37,12 +46,17 @@ function onContentPrepare($context, &$article) if( $userDef ) { $article->text = do_shortcode($article->text); } - + } function onAfterRender() { + if (!JFactory::getApplication()->isSite()) + { + return; + } + $shortcodes_scripts = Helix::getInstance()->_shortcodes_scripts; $shortcodes_styles = Helix::getInstance()->_shortcodes_styles; @@ -70,6 +84,10 @@ function onAfterRender() function onAfterDispatch() { + if (!JFactory::getApplication()->isSite()) + { + return; + } if( !JFactory::getApplication()->isAdmin() ){ @@ -91,6 +109,11 @@ function onAfterDispatch() // Updated 1.9.5 function onContentPrepareForm($form, $data) { + if (!JFactory::getApplication()->isSite()) + { + return; + } + if ($form->getName()=='com_menus.item') //Add Helix menu params to the menu item { JHtml::_('behavior.framework');