-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
45 lines (36 loc) · 1.04 KB
/
Copy pathbootstrap.php
File metadata and controls
45 lines (36 loc) · 1.04 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
<?php
/**
* Created by CODEJA.
* User: kirillrocks
* Date: 24-Jan-17
* Time: 21:29
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
// CLASSES
require_once CJSP_PLUGIN_DIR . '/includes/classes/class-cjsp.php';
require_once CJSP_PLUGIN_DIR . '/includes/classes/class-cjsp-helper.php';
// DEFAULT FUNCTIONS
require_once CJSP_PLUGIN_DIR . '/includes/functions.php';
// SHORTCODES
require_once CJSP_PLUGIN_DIR . '/includes/shortcodes.php';
if ( is_admin() ) {
require_once CJSP_PLUGIN_DIR . '/admin/admin.php';
} else {
require_once CJSP_PLUGIN_DIR . '/includes/load.php';
}
// ON PLUGIN ACTIVATE
register_activation_hook( CJSP_PLUGIN, 'cjsp_activation' );
function cjbl_activation() {
if ( $option = get_option( 'cjsp' ) ) {
return;
}
CJSP::update_option( 'default_option', 'default option' );
flush_rewrite_rules(); // RESET PERMALINKS
}
// ON PLUGIN DEACTIVATION
register_deactivation_hook( CJSP_PLUGIN, 'cjsp_deactivation' );
function cjsp_deactivation() {
flush_rewrite_rules(); // RESET PERMALINKS
}