-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwp-force-logout.php
72 lines (62 loc) · 2.19 KB
/
wp-force-logout.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
<?php
/**
* Plugin Name: WPForce Logout
* Description: Forcefully logout WordPress user(s), see who's online, last login activity & more.
* Version: 2.2.0
* Author: Mini Plugins
* Author URI: https://miniplugins.com/
* Text Domain: wp-force-logout
* Domain Path: /languages/
*
* @package WP Force Logout
* @author Mini Plugins
* @since 1.0.0
* @license GPL-3.0+
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
// Exit if accessed directly.
}
if ( function_exists( 'wpfl_fs' ) ) {
wpfl_fs()->set_basename( true, __FILE__ );
} else {
if ( ! function_exists( 'wpfl_fs' ) ) {
// Create a helper function for easy SDK access.
function wpfl_fs() {
global $wpfl_fs;
if ( ! isset( $wpfl_fs ) ) {
// Include Freemius SDK.
require_once dirname(__FILE__) . '/freemius/start.php';
$wpfl_fs = fs_dynamic_init( array(
'id' => '15307',
'slug' => 'wp-force-logout',
'type' => 'plugin',
'public_key' => 'pk_0f5e34fac8223c01f054f8692b748',
'is_premium' => false,
'has_addons' => false,
'has_paid_plans' => false,
'menu' => array(
'first-path' => 'users.php',
'contact' => false,
'support' => false
),
) );
}
return $wpfl_fs;
}
// Init Freemius.
wpfl_fs();
// Signal that SDK was initiated.
do_action( 'wpfl_fs_loaded' );
}
// Define WP_FORCE_LOGOUT_PLUGIN_FILE.
if ( ! defined( 'WP_FORCE_LOGOUT_PLUGIN_FILE' ) ) {
define( 'WP_FORCE_LOGOUT_PLUGIN_FILE', __FILE__ );
}
// Include the main WP_Force_Logout class.
if ( ! class_exists( 'WP_Force_Logout' ) ) {
include_once dirname( __FILE__ ) . '/includes/class-wp-force-logout.php';
}
// Initialize the plugin.
add_action( 'plugins_loaded', array( 'WP_Force_Logout', 'get_instance' ) );
}