-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtemplatiq.php
More file actions
62 lines (46 loc) · 1.19 KB
/
templatiq.php
File metadata and controls
62 lines (46 loc) · 1.19 KB
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
<?php
defined( 'ABSPATH' ) || exit;
/**
* Plugin Name: Templatiq
* Description: The Ultimate Templates | Craft beautiful website in no time
* Author: wpWax
* Author URI: https://wpwax.com
* Version: 0.2.5
* License: GPLv2 or later
* Requires PHP: 7.4
* Text Domain: templatiq
* Domain Path: /languages
*/
include __DIR__ . '/vendor/autoload.php';
final class Templatiq {
private static Templatiq $instance;
public static function instance(): Templatiq {
if ( empty( self::$instance ) ) {
self::$instance = new self;
}
return self::$instance;
}
public function load() {
define( 'TEMPLATIQ_VERSION', '0.2.5' );
register_activation_hook(
__FILE__, function () {
( new \Templatiq\Setup\Activation() )->boot( __FILE__ );
}
);
register_deactivation_hook(
__FILE__, function () {
( new \Templatiq\Setup\Deactivation() )->execute();
}
);
$application = \Templatiq\Boot\App::instance();
$application->boot( __FILE__, __DIR__ );
add_action(
'plugins_loaded', function () use ( $application ): void {
do_action( 'templatiq_before_load' );
$application->load();
do_action( 'templatiq_after_load' );
}
);
}
}
Templatiq::instance()->load();