-
Notifications
You must be signed in to change notification settings - Fork 0
/
zk-rest-api.php
65 lines (55 loc) · 1.84 KB
/
zk-rest-api.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
<?php
/*
Plugin Name: ZK REST API
Author: Robin Ferrari
Version: 0.0.1
Author URI: https://robinferrari.ch
*/
define('ZKAPI_PATH', __FILE__);
require_once 'configuration.php';
require_once 'requirements.php';
if(zkapi_requirements()) {
require_once 'vendor/autoload.php';
require_once 'admin/edit-post-type.php';
require_once 'acf/field-options.php';
require_once 'users/user-roles.php';
require_once 'users/user-fields.php';
require_once 'class/class-helpers.php';
require_once 'class/class-acf-helpers.php';
require_once 'class/class-mail.php';
require_once 'class/class-api-mail-sender.php';
require_once 'class/class-api-post-type.php';
require_once 'class/class-api-post-type-item.php';
require_once 'class/class-api-post-type-factory.php';
require_once 'class/class-api-options.php';
require_once 'class/class-api-user.php';
require_once 'class/class-api-user-item.php';
require_once 'class/class-api-user-registration.php';
require_once 'class/class-api-comments.php';
require_once 'class/class-api-comment-item.php';
require_once 'class/class-google-auth.php';
require_once 'class/page-on-the-fly.php';
// require_once 'acf/on-save-relation.php';
add_action('acf/init', function(){
$p_factory = ZKAPI_PostTypeFactory::getInstance();
$p_factory->render();
}, 5);
add_action('acf/init', function () {
ZKAPI_Users::getInstance();
ZKAPI_Comments::getInstance();
new ZKAPI_ApiOptions();
new ZKAPI_UsersRegistration();
}, 10);
/**
* Undocumented function
*
* @return ZKAPI_Helpers $helpers
*/
function ZKAPI() {
return ZKAPI_Helpers::getInstance();
}
if (function_exists('acf_add_options_page')) {
acf_add_options_page();
}
// require_once 'example-use.php';
}