-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathwp-approve-user.php
46 lines (40 loc) · 1.31 KB
/
wp-approve-user.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
<?php
/**
* Plugin Name: WP Approve User
* Plugin URI: http://en.wp.obenland.it/wp-approve-user/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wp-approve-user
* Description: Adds action links to user table to approve or unapprove user registrations.
* Version: 12
* Author: Konstantin Obenland
* Author URI: http://en.wp.obenland.it/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wp-approve-user
* Text Domain: wp-approve-user
* Domain Path: /lang
* License: GPLv2
*
* @package WP Approve User
*/
if ( ! get_option( 'users_can_register' ) ) {
require_once __DIR__ . '/noop.php';
return;
}
// Define the current version for upgrades.
$wpau_db_version = 12;
if ( ! class_exists( 'Obenland_Wp_Plugins_V5' ) ) {
require_once __DIR__ . '/class-obenland-wp-plugins-v5.php';
}
require_once __DIR__ . '/class-obenland-wp-approve-user.php';
require_once __DIR__ . '/cron-events.php';
require_once __DIR__ . '/upgrade.php';
/**
* Instantiates Obenland_Wp_Approve_User.
*/
function wp_approve_user_instantiate() {
Obenland_Wp_Approve_User::get_instance();
}
add_action( 'plugins_loaded', 'wp_approve_user_instantiate', 0 );
/**
* Actions to take on plugin activation.
*/
function wp_approve_user_activate() {
wpau_allowlist_users();
}
register_activation_hook( __FILE__, 'wp_approve_user_activate' );