-
Notifications
You must be signed in to change notification settings - Fork 12
/
functions.php
105 lines (89 loc) · 2.66 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
define('__ICARUS_ROOT__', dirname(__FILE__) . '/');
define('__ICARUS_VERSION__', '1.1.4');
define('__ICARUS_CFG_VERSION__', '3');
if (isset($this))
{
define('__ICARUS_WIDGET_CLASS__', get_class($this));
}
function themeInit($widget)
{
static $inited = FALSE;
if (!$inited)
{
$inited = TRUE;
require __ICARUS_ROOT__ . 'library/Util.php';
require __ICARUS_ROOT__ . 'library/I18n.php';
require __ICARUS_ROOT__ . 'library/Module.php';
require __ICARUS_ROOT__ . 'library/Aside.php';
require __ICARUS_ROOT__ . 'library/Plugin.php';
require __ICARUS_ROOT__ . 'library/Page.php';
require __ICARUS_ROOT__ . 'library/Assets.php';
require __ICARUS_ROOT__ . 'library/Config.php';
require __ICARUS_ROOT__ . 'library/Content.php';
Icarus_Util::init($widget);
Icarus_I18n::init();
Icarus_Assets::init();
Icarus_Aside::init();
Icarus_Page::init();
}
}
function themeConfig($form)
{
require __ICARUS_ROOT__ . 'library/Util.php';
require __ICARUS_ROOT__ . 'library/I18n.php';
require __ICARUS_ROOT__ . 'library/Module.php';
require __ICARUS_ROOT__ . 'library/Aside.php';
require __ICARUS_ROOT__ . 'library/Plugin.php';
require __ICARUS_ROOT__ . 'library/Page.php';
require __ICARUS_ROOT__ . 'library/Assets.php';
require __ICARUS_ROOT__ . 'library/Config.php';
require __ICARUS_ROOT__ . 'library/Content.php';
require __ICARUS_ROOT__ . 'library/Ajax.php';
require __ICARUS_ROOT__ . 'library/Backup.php';
Icarus_Util::init(NULL);
Icarus_I18n::init();
Icarus_Ajax::handle();
$iForm = new Icarus_Config($form);
Icarus_Config::config($iForm);
Icarus_Page::config($iForm);
Icarus_Content::config($iForm);
Icarus_Aside::config($iForm);
Icarus_Assets::config($iForm);
Icarus_Module::config($iForm);
Icarus_Plugin::config($iForm);
$iForm->toc();
}
/**
* fix duplicated themeFields() calls made by
* admin/custom-fields.php
*/
function themeFieldsInit()
{
static $inited = FALSE;
if (!$inited)
{
require __ICARUS_ROOT__ . 'library/Util.php';
require __ICARUS_ROOT__ . 'library/I18n.php';
require __ICARUS_ROOT__ . 'library/Content.php';
Icarus_Util::init(NULL);
Icarus_I18n::init();
$inited = TRUE;
}
}
function themeFields($form)
{
themeFieldsInit();
Icarus_Content::fieldsConfig($form);
}
// Icarus Translation
function _IcT($key)
{
return Icarus_I18n::get($key);
}
// Icarus Translation + Print
function _IcTp($key)
{
echo Icarus_I18n::get($key);
}