-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpersonio-integration-light.php
55 lines (44 loc) · 1.48 KB
/
personio-integration-light.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
<?php
/**
* Plugin Name: Personio Integration Light
* Description: Provides recruiting handling for Personio.
* Requires at least: 4.9.24
* Requires PHP: 8.0
* Version: @@VersionNumber@@
* Author: laOlaWeb
* Author URI: https://laolaweb.com
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: personio-integration-light
*
* @package personio-integration-light
*/
// prevent direct access.
defined( 'ABSPATH' ) || exit;
use PersonioIntegrationLight\Plugin\Init;
use PersonioIntegrationLight\Plugin\Update;
// do nothing if PHP-version is not 8.0 or newer.
if ( version_compare( PHP_VERSION, '8.0', '<' ) ) {
return;
}
// set version number.
define( 'WP_PERSONIO_INTEGRATION_VERSION', '@@VersionNumber@@' );
// save plugin-path.
define( 'WP_PERSONIO_INTEGRATION_PLUGIN', __FILE__ );
// get autoloader generated by composer.
require_once __DIR__ . '/vendor/autoload.php';
// get constants.
require_once __DIR__ . '/inc/constants.php';
// add deprecated.
require_once __DIR__ . '/deprecated/deprecated.php';
// on activation.
register_activation_hook( WP_PERSONIO_INTEGRATION_PLUGIN, array( Init::get_instance(), 'activation' ) );
// on deactivation.
register_deactivation_hook( WP_PERSONIO_INTEGRATION_PLUGIN, array( Init::get_instance(), 'deactivation' ) );
add_action(
'plugins_loaded',
function () {
Update::get_instance()->init();
Init::get_instance()->init();
}
);