This repository has been archived by the owner on Nov 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.php
91 lines (80 loc) · 2.31 KB
/
plugin.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* Plugin Name: Arconix Plugins
* Plugin URI: http://arconixpc.com/
* Description: Plugin for displaying WP.org-hosted plugins on your website
*
* Version: 1.0.0
*
* Author: John Gardner
* Author URI: http://arconixpc.com
*
* License: GNU General Public License v2.0
* License URI: http://www.opensource.org/licenses/gpl-license.php
*/
require_once( plugin_dir_path(__FILE__) . 'includes/class-arconix-plugins-admin.php' );
require_once( plugin_dir_path(__FILE__) . 'includes/class-arconix-plugins-content-type.php' );
require_once( plugin_dir_path(__FILE__) . 'includes/class-arconix-plugins-metaboxes.php' );
require_once( plugin_dir_path(__FILE__) . 'includes/class-arconix-plugins-public.php' );
require_once( plugin_dir_path(__FILE__) . 'includes/class-arconix-plugins-widgets.php' );
require_once( plugin_dir_path(__FILE__) . 'includes/cmb2/init.php' );
if( ! class_exists('Gamajo_Dashboard_Glancer') )
require_once( plugin_dir_path(__FILE__) . 'includes/class-gamajo-dashboard-glancer.php' );
/**
* Base Class to initialize the plugin
*/
class Arconix_Plugins_Plugin {
/**
* Stores the current version of the plugin.
*
* @since 0.5
* @access private
* @var string $version Current plugin version
*/
const VERSION = '1.0.0';
/**
* Initialize the class and set its properties.
*
* @since 1.0.0
*/
public function __construct() {
register_activation_hook( __FILE__, array( $this, 'activate' ) );
register_deactivation_hook( __FILE__, array( $this, 'decativate' ) );
$this->load_classes();
}
/**
* Load the Administrative Backend
*
* @since 1.0.0
*/
public function load_classes() {
new Arconix_Plugins_Admin();
new Arconix_Plugins_Content_Type();
new Arconix_Plugins_Metaboxes();
}
/**
* Activate the plugin
*
* @since 1.0.0
* return void
*/
public function activate() {
flush_rewrite_rules();
}
/**
* Deactivate the plugin
*
* @since 1.0.0
* @return void
*/
public function deactivate() {
flush_rewrite_rules();
}
}
//
// Vroom vroom
//
add_action( 'plugins_loaded', 'arconix_plugins_run' );
function arconix_plugins_run() {
new Arconix_Plugins_Plugin();
}