forked from ddean4040/Networks-for-WordPress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
89 lines (73 loc) · 2.4 KB
/
index.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
<?php
/**
* Plugin Name: Networks for WordPress
* Plugin URI: http://wordpress.org/plugins/networks-for-wordpress/
* Description: Adds a Networks panel for site admins to create and manipulate multiple networks.
* Version: 1.1.5
* Revision Date: 7/23/2013
* Requires at least: WP 3.0
* Tested up to: WP 3.6-RC1
* License: GNU General Public License 2.0 (GPL) or later
* Author: David Dean
* Author URI: http://www.generalthreat.com/
* Site Wide Only: True
* Network: True
*/
require_once (dirname(__FILE__) . '/networks-admin-ajax.php');
require_once (dirname(__FILE__) . '/networks-functions.php');
@include_once (dirname(__FILE__) . '/networks-mufunctions.php');
require_once (dirname(__FILE__) . '/networks-admin.php');
if( ! defined( 'RESTRICT_MANAGEMENT_TO' ) ) {
/** Enter an ID here (or in your wp-config.php file) to restrict the Networks panel to only the specified network (site ID)
* FALSE (or 0) will disable the feature
*/
define( 'RESTRICT_MANAGEMENT_TO', FALSE );
}
if(!defined('ENABLE_HOLDING_SITE')) {
/**
* true = enable the holding site; must be true to save orphaned blogs, below
* false = no site 0, no ability to "unassign" blogs without reassigning them
*/
define('ENABLE_HOLDING_SITE',TRUE);
}
if (!defined('RESCUE_ORPHANED_BLOGS')) {
/**
true = redirect blogs from deleted site to holding site instead of deleting them. Requires holding site above.
false = allow blogs belonging to deleted sites to be deleted.
*/
define('RESCUE_ORPHANED_BLOGS',FALSE);
}
/**
* blog options affected by URL
*/
$url_dependent_blog_options = array('siteurl','home','fileupload_url','upload_url_path');
/**
* site / network options affected by URL
*/
$url_dependent_site_options = array('siteurl');
/**
* Sitemeta options to be copied on clone
*/
$options_to_copy = array(
'admin_email',
'admin_user_id',
'allowed_themes',
'allowedthemes',
'banned_email_domains',
'first_post',
'limited_email_domains',
'ms_files_rewriting',
'site_admins',
'upload_filetypes',
'welcome_email'
);
function njsl_networks_init() {
global $current_site;
if( RESTRICT_MANAGEMENT_TO && RESTRICT_MANAGEMENT_TO != $current_site->id ) {
return;
}
$njslNetworks = new wp_Networks_Admin();
add_action( 'wp_ajax_check_domain', 'networks_check_domain' );
}
add_action( 'init', 'njsl_networks_init' );
?>