1: <?php
2: /**
3: * Xlanguage extension module
4: * You may not change or alter any portion of this comment or credits
5: * of supporting developers from this source code or any supporting source code
6: * which is considered copyrighted (c) material of the original comment or credit authors.
7: * This program is distributed in the hope that it will be useful,
8: * but WITHOUT ANY WARRANTY; without even the implied warranty of
9: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: *
11: * @copyright 2010-2014 XOOPS Project (http://xoops.org)
12: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
13: * @package xlanguage
14: * @since 2.6.0
15: * @author Laurent JEN (Aka DuGris)
16: * @version $Id$
17: */
18:
19: use Xoops\Core\PreloadItem;
20:
21: /**
22: * Xlanguage core preloads
23: *
24: * @package Xlanguage
25: * @author trabis <lusopoemas@gmail.com>
26: * @copyright 2010-2014 XOOPS Project (http://xoops.org)
27: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
28: */
29: class XlanguagePreload extends PreloadItem
30: {
31: /**
32: * @param array $args
33: */
34: public static function eventCoreIncludeCommonEnd($args)
35: {
36: if (XoopsLoad::fileExists($hnd_file = dirname(__DIR__) . '/api.php')) {
37: include_once $hnd_file;
38: }
39: }
40:
41: /**
42: * @param array $args
43: */
44: public static function eventCoreHeaderCheckcache($args)
45: {
46: $xoops = Xoops::getInstance();
47: xlanguage_select_show(explode('|', $xoops->registry()->get('XLANGUAGE_THEME_OPTIONS')));
48: }
49: }
50: