/** * Create the helper object * * @return object The plugins helper object */ private function getHelper() { // Already initialized, so return if ($this->_init) { return $this->_helper; } $this->_init = true; // only in html or raw (for ajax save order stuff) if (!in_array(JFactory::getDocument()->getType(), array('html', 'raw'))) { return false; } if (!$this->isFrameworkEnabled()) { return false; } require_once JPATH_LIBRARIES . '/regularlabs/helpers/protect.php'; if (RLProtect::isProtectedPage($this->_alias)) { return false; } require_once JPATH_LIBRARIES . '/regularlabs/helpers/helper.php'; $this->_helper = RLHelper::getPluginHelper($this); return $this->_helper; }
/** * replace any protected tags to original */ public static function unprotectForm(&$string, $tags = array()) { // Protect entire form if (empty($tags)) { RLProtect::unprotect($string); return; } RLProtect::unprotectTags($string, $tags); }
private static function unprotectSpecialCode($string) { require_once __DIR__ . '/protect.php'; RLProtect::unprotectHtmlSafe($string); return $string; }