public function init() { parent::init(); \JPluginHelper::importPlugin('gantry5'); // Trigger the onGantryThemeInit event. $dispatcher = \JEventDispatcher::getInstance(); $dispatcher->trigger('onGantry5ThemeInit', ['theme' => $this]); }
public function init() { parent::init(); $this->preset_styles_init(); // Load theme text domains $domain = $this->details()->get('configuration.theme.textdomain', $this->name); load_theme_textdomain($domain, $this->path . '/languages'); }
public function init() { parent::init(); $gantry = Gantry::instance(); /** @var UniformResourceLocator $locator */ $locator = $gantry['locator']; \JPluginHelper::importPlugin('gantry5'); // Trigger the onGantryThemeInit event. $dispatcher = \JEventDispatcher::getInstance(); $dispatcher->trigger('onGantry5ThemeInit', ['theme' => $this]); $lang = \JFactory::getLanguage(); // FIXME: Do not hardcode this file. $lang->load('files_gantry5_nucleus', JPATH_SITE); if (\JFactory::getApplication()->isSite()) { // Load our custom positions file as frontend requires the strings to be there. $filename = $locator("gantry-theme://language/en-GB/en-GB.tpl_{$this->name}_positions.ini"); if ($filename) { $lang->load("tpl_{$this->name}_positions", dirname(dirname(dirname($filename))), 'en-GB'); } } }