| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: WP Approve User |
| 4 |
* Plugin URI: http://en.wp.obenland.it/wp-approve-user/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wp-approve-user |
| 5 |
* Description: Adds action links to user table to approve or unapprove user registrations. |
| 6 |
* Version: 12 |
| 7 |
* Author: Konstantin Obenland |
| 8 |
* Author URI: http://en.wp.obenland.it/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wp-approve-user |
| 9 |
* Text Domain: wp-approve-user |
| 10 |
* Domain Path: /lang |
| 11 |
* Requires at least: 4.7 |
| 12 |
* Requires PHP: 7.4 |
| 13 |
* License: GPLv2 |
| 14 |
* |
| 15 |
* @package WP Approve User |
| 16 |
*/ |
| 17 |
|
| 18 |
if ( ! get_option( 'users_can_register' ) ) { |
| 19 |
require_once __DIR__ . '/noop.php'; |
| 20 |
return; |
| 21 |
} |
| 22 |
|
| 23 |
// Define the current version for upgrades. |
| 24 |
$wpau_db_version = 12; |
| 25 |
|
| 26 |
if ( ! class_exists( 'Obenland_Wp_Plugins_V5' ) ) { |
| 27 |
require_once __DIR__ . '/class-obenland-wp-plugins-v5.php'; |
| 28 |
} |
| 29 |
|
| 30 |
require_once __DIR__ . '/class-obenland-wp-approve-user.php'; |
| 31 |
require_once __DIR__ . '/cron-events.php'; |
| 32 |
require_once __DIR__ . '/upgrade.php'; |
| 33 |
|
| 34 |
/** |
| 35 |
* Instantiates Obenland_Wp_Approve_User. |
| 36 |
*/ |
| 37 |
function wp_approve_user_instantiate() { |
| 38 |
Obenland_Wp_Approve_User::get_instance(); |
| 39 |
} |
| 40 |
add_action( 'plugins_loaded', 'wp_approve_user_instantiate', 0 ); |
| 41 |
|
| 42 |
/** |
| 43 |
* Actions to take on plugin activation. |
| 44 |
*/ |
| 45 |
function wp_approve_user_activate() { |
| 46 |
wpau_allowlist_users(); |
| 47 |
} |
| 48 |
register_activation_hook( __FILE__, 'wp_approve_user_activate' ); |
| 49 |
|