-
Notifications
You must be signed in to change notification settings - Fork 9
/
modularity.php
94 lines (84 loc) · 4.07 KB
/
modularity.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
<?php
/*
* Plugin Name: Modularity
* Plugin URI: -
* Description: Modular component system for WordPress
* Version: 6.42.2
* Author: Kristoffer Svanmark, Sebastian Thulin
* Author URI: -
* Text domain: modularity
*
* Copyright (C) 2016
*/
define('MODULARITY_PATH', plugin_dir_path(__FILE__));
define('MODULARITY_URL', plugins_url('', __FILE__));
define('MODULARITY_TEMPLATE_PATH', MODULARITY_PATH . 'templates/');
define('MODULARITY_MODULE_PATH', MODULARITY_PATH . 'source/php/Module/');
define('MODULARITY_MODULE_URL', MODULARITY_URL . '/source/php/Module/');
add_action('plugins_loaded', function () {
load_plugin_textdomain('modularity', false, plugin_basename(dirname(__FILE__)) . '/languages');
});
// Autoload from plugin
if (file_exists(MODULARITY_PATH . 'vendor/autoload.php')) {
require_once MODULARITY_PATH . 'vendor/autoload.php';
}
require_once MODULARITY_PATH . 'Public.php';
// Acf auto import and export
add_action('plugins_loaded', function () {
$acfExportManager = new \AcfExportManager\AcfExportManager();
$acfExportManager->setTextdomain('modularity');
$acfExportManager->setExportFolder(MODULARITY_PATH . 'source/php/AcfFields/');
$acfExportManager->autoExport(array(
'mod-booking' => 'group_56a89f42b432b',
'mod-contact-info' => 'group_56a0a3928c017',
'mod-contact-contacts' => 'group_5757b93da8d5c',
'mod-contacts' => 'group_5805e5dc0a3be',
'mod-files' => 'group_5756ce3e48782',
'mod-fileslist' => 'group_5756ce3e48783',
'mod-gallery' => 'group_5666af6d26b7c',
'mod-iframe' => 'group_56c47016ea9d5',
'mod-image' => 'group_570770ab8f064',
'mod-inheritpost' => 'group_56a8b4fd3567b',
'mod-inlaylist' => 'group_569e054a7f9c2',
'mod-latest' => 'group_56a8c4581d906',
'mod-mainnews' => 'group_569e401dd4422',
'mod-notice' => 'group_575a842dd1283',
'mod-posts-displau' => 'group_571dfd3c07a77',
'mod-posts-filtering' => 'group_571e045dd555d',
'mod-posts-sorting' => 'group_571dffc63090c',
'mod-posts-source' => 'group_571dfaabc3fc5',
'mod-posts-taxonomydisplay' => 'group_630645d822841',
'mod-rss' => 'group_59535d940706c',
'mod-script' => 'group_56a8b9eddfced',
'mod-slider' => 'group_56a5e99108991',
'mod-table' => 'group_5666a2a71d806',
'mod-text' => 'group_5891b49127038',
'mod-video' => 'group_57454ae7b0e9a',
'mod-map' => 'group_602400d904b59',
'mod-curator' => 'group_609b788ad04bb',
'mod-spacer' => 'group_611cffa40276a',
'mod-table-block' => 'group_60b8bf5bbc4d7',
'mod-text-block' => 'group_60ab6d6ba3621',
'mod-hero' => 'group_614b3f1a751bf',
'mod-hero-display-as' => 'group_63ca5ed0cb7f4',
'mod-logogrid' => 'group_61bc951d73494',
'mod-divider' => 'group_62816d604ae46',
'mod-all' => 'group_636e424039120',
'mod-subscribe' => 'group_641c51b765f4b',
'mod-modal' => 'group_64a29154aa972',
'mod-manual-input' => 'group_64ff22b117e2c',
'mod-menu' => 'group_66c34c64b8d10',
'mod-audio' => 'group_66d0837591221',
'mod-search' => 'group_66dffe0be28c1',
# Deactivated
'mod-social' => 'group_56dedc26e5327',
'mod-wpwidget' => 'group_5729f4d3e7c7a',
'mod-sites' => 'group_58ecb6b6330f4',
'mod-index' => 'group_569ceab2c16ee',
));
$acfExportManager->import();
});
// Start application
add_action('plugins_loaded', function () {
new Modularity\App();
}, 20);