This repository has been archived by the owner on Apr 17, 2020. It is now read-only.
forked from nfacha/multisite-json-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multisite-json-api.php
62 lines (55 loc) · 2.18 KB
/
multisite-json-api.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
<?php
/**
* The WordPress Plugin Boilerplate.
*
* A foundation off of which to build well-documented WordPress plugins that
* also follow WordPress Coding Standards and PHP best practices.
*
* @package Multisite_JSON_API
* @author Kyle Leaders <[email protected]>
* @license GPL-2.0+
* @link http://technicasites.com
* @copyright 2014 Technica Sites LLC
*
* @wordpress-plugin
* Plugin Name: Multisite JSON API
* Plugin URI: http://github.com/remkade/multisite-json-api
* Description: A JSON API for managing multisite sites
* Version: 1.1.0
* Author: Kyle Leaders
* Author URI: http://github.com/remkade
* Text Domain: en_US
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/remkade/multisite-json-api
* WordPress-Plugin-Boilerplate: v2.6.1
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/*----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
require_once( plugin_dir_path( __FILE__ ) . 'public/class-multisite-json-api.php' );
register_activation_hook( __FILE__, array( 'Multisite_JSON_API', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Multisite_JSON_API', 'deactivate' ) );
add_action( 'plugins_loaded', array( 'Multisite_JSON_API', 'get_instance' ) );
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/*
* 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 ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-multisite-json-api-admin.php' );
add_action( 'plugins_loaded', array( 'Multisite_JSON_API_Admin', 'get_instance' ) );
}