-
Notifications
You must be signed in to change notification settings - Fork 5
/
htmxpress.php
40 lines (32 loc) · 906 Bytes
/
htmxpress.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
<?php
/*
Plugin Name: HTMXpress
Plugin URI: https://vandragt.com
Description: HTMX for WordPress
Version: 0.1
Author: Sander van Dragt <[email protected]>
Author URI: https://vandragt.com
License: GPL3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: htmxpress
Domain Path: /languages
*/
namespace HtmxPress;
require_once( __DIR__ . '/inc/assets.php' );
require_once( __DIR__ . '/inc/endpoint.php' );
require_once( __DIR__ . '/inc/template.php' );
function activate() {
Endpoint\register();
flush_rewrite_rules();
}
register_activation_hook( __FILE__, __NAMESPACE__ . '\\activate' );
function deactivate() {
flush_rewrite_rules();
}
register_deactivation_hook( __FILE__, __NAMESPACE__ . '\\deactivate' );
function bootstrap() {
Endpoint\register();
Template\bootstrap();
Assets\bootstrap();
}
add_action( 'init', __NAMESPACE__ . '\\bootstrap' );