-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
54 lines (42 loc) · 1.08 KB
/
index.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
<?php
/**
* Module Name: Enhanced Custom Fields
* Module URI: http://kenobisoft.com
* Description: This is the module entry-point.
* Version: 1.0.0
* Author: KenobiSoft, Neven Dyulgerov
* Author URI: http://kenobisoft.com
* License: GPL2
*/
namespace ECF;
// die, if directly accessed
defined('ABSPATH') or die('Access denied!');
/**
* Class EnhancedCustomFields
* Entry-point class for the module
* @package ECF
*/
class EnhancedCustomFields {
/**
* Construct
*/
public function __construct() {}
/**
* Init
* Entry-point initialization function
* @param $config
*/
public static function init($config) {
// get main module class
require_once('core/Initialzr.php');
// load fields config
$fieldsConfig = simplexml_load_file($config);
// load module config
$moduleConfig = simplexml_load_file(__DIR__ . '/config.xml');
// initialize ECF
Initialzr::getInstance(array(
'module_config' => $moduleConfig,
'fields_config' => $fieldsConfig
));
}
}