-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-mcs.php
executable file
·70 lines (61 loc) · 2.19 KB
/
wp-mcs.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
<?php
/**
*
* @package Wp_Mcs
* @author Aaron Lee <[email protected]>
* @license GPL-2.0+
* @link http://buooy.com
* @copyright 2013 Buooy
*
* @wordpress-plugin
* Plugin Name: WP Maintenance and Coming Soon
* Plugin URI: http://buooy.com
* Description: WP Maintenance and Coming Soon is a custom plugin by Buooy
* Version: 1.0.0
* Author: Aaron Lee
* Author URI: http://buooy.com
* Text Domain: wp-mcs-locale
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/Buooy/wp-mcs
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/*----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
require_once( plugin_dir_path( __FILE__ ) . 'public/class-wp-mcs.php' );
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*/
register_activation_hook( __FILE__, array( 'Wp_Mcs', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Wp_Mcs', 'deactivate' ) );
add_action( 'plugins_loaded', array( 'Wp_Mcs', 'get_instance' ) );
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/*
* @TODO:
*
* - replace `class-plugin-admin.php` with the name of the plugin's admin file
* - replace Wp_Mcs_Admin with the name of the class defined in
* `class-wp-mcs-admin.php`
*
* If you want to include Ajax within the dashboard, change the following
* conditional to:
*
* if ( is_admin() ) {
* ...
* }
*
* The code below is intended to to give the lightest footprint possible.
*/
//if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
if( is_admin() ){
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-wp-mcs-admin.php' );
add_action( 'plugins_loaded', array( 'Wp_Mcs_Admin', 'get_instance' ) );
}