-
Notifications
You must be signed in to change notification settings - Fork 1
/
um-multisite.php
43 lines (36 loc) · 1.07 KB
/
um-multisite.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
<?php
/**
* Plugin Name: Ultimate Member - Multisite
* Description: Sync members between sites on multisite installation.
* Version: 1.0.1
* Author: Ultimate Member support
* Author URI: https://ultimatemember.com/support/
* Text Domain: um-multisite
* UM version: 2.5.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Works on multisite installetion only.
if ( ! is_multisite() ) {
return;
}
// The Ultimate Member plugin is required.
if ( ! function_exists( 'UM' ) ) {
return;
}
// When users register on the main site they will be added to all subsites.
include_once __DIR__ . '/includes/hooks-register.php';
// Changed the directory for users uploads.
include_once __DIR__ . '/includes/hooks-uploader.php';
// Add dashboard widget.
if ( is_admin() ) {
require_once wp_normalize_path( __DIR__ . '/includes/class-widget.php' );
new umms\includes\Widget();
}
// Handle actions.
if ( is_admin() && isset( $_POST['action'] ) ) {
require_once wp_normalize_path( __DIR__ . '/includes/class-actions.php' );
new umms\includes\Actions();
}