-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatakit.php
41 lines (36 loc) · 1.01 KB
/
datakit.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
<?php
/**
* Plugin Name: DataKit
* Description: Easily create your own DataViews components with just PHP.
* Plugin URI: https://www.datakit.org
* Version: 1.0.0
* Author: DataKit
* Author URI: https://www.datakit.org
* Text Domain: datakit
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
use DataKit\Plugin\DataView\WordPressDataViewRepository;
use DataKit\Plugin\DataKitPlugin;
/** If this file is called directly, abort. */
if ( ! defined( 'ABSPATH' ) ) {
die;
}
require_once plugin_dir_path( __FILE__ ) . 'freemius.php';
require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
const DATAKIT_PLUGIN_FILE = __FILE__;
const DATAKIT_VERSION = '1.0.0';
// Initialize the plugin.
add_action(
'init',
function () {
try {
DataKitPlugin::get_instance(
new WordPressDataViewRepository(),
);
} catch ( Throwable $e ) {
// Todo: log errors somewhere.
return;
}
},
);