| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: WPForce Logout |
| 4 |
* Description: Forcefully logout WordPress user(s), see who's online, last login activity & more. |
| 5 |
* Version: 2.3.0 |
| 6 |
* Author: Mini Plugins |
| 7 |
* Author URI: https://miniplugins.com/ |
| 8 |
* Text Domain: wp-force-logout |
| 9 |
* Domain Path: /languages/ |
| 10 |
* |
| 11 |
* @package WP Force Logout |
| 12 |
* @author Mini Plugins |
| 13 |
* @since 1.0.0 |
| 14 |
* @license GPL-3.0+ |
| 15 |
*/ |
| 16 |
|
| 17 |
if ( ! defined( 'ABSPATH' ) ) { |
| 18 |
exit; |
| 19 |
// Exit if accessed directly. |
| 20 |
} |
| 21 |
|
| 22 |
if ( function_exists( 'wpfl_fs' ) ) { |
| 23 |
wpfl_fs()->set_basename( true, __FILE__ ); |
| 24 |
} else { |
| 25 |
|
| 26 |
if ( ! function_exists( 'wpfl_fs' ) ) { |
| 27 |
// Create a helper function for easy SDK access. |
| 28 |
function wpfl_fs() { |
| 29 |
global $wpfl_fs; |
| 30 |
|
| 31 |
if ( ! isset( $wpfl_fs ) ) { |
| 32 |
// Include Freemius SDK. |
| 33 |
require_once dirname(__FILE__) . '/freemius/start.php'; |
| 34 |
|
| 35 |
$wpfl_fs = fs_dynamic_init( array( |
| 36 |
'id' => '15307', |
| 37 |
'slug' => 'wp-force-logout', |
| 38 |
'type' => 'plugin', |
| 39 |
'public_key' => 'pk_0f5e34fac8223c01f054f8692b748', |
| 40 |
'is_premium' => false, |
| 41 |
'has_addons' => false, |
| 42 |
'has_paid_plans' => false, |
| 43 |
'menu' => array( |
| 44 |
'first-path' => 'users.php', |
| 45 |
'contact' => false, |
| 46 |
'support' => false |
| 47 |
), |
| 48 |
) ); |
| 49 |
} |
| 50 |
|
| 51 |
return $wpfl_fs; |
| 52 |
} |
| 53 |
|
| 54 |
// Init Freemius. |
| 55 |
wpfl_fs(); |
| 56 |
// Signal that SDK was initiated. |
| 57 |
do_action( 'wpfl_fs_loaded' ); |
| 58 |
} |
| 59 |
|
| 60 |
// Define WP_FORCE_LOGOUT_PLUGIN_FILE. |
| 61 |
if ( ! defined( 'WP_FORCE_LOGOUT_PLUGIN_FILE' ) ) { |
| 62 |
define( 'WP_FORCE_LOGOUT_PLUGIN_FILE', __FILE__ ); |
| 63 |
} |
| 64 |
|
| 65 |
// Include the main WP_Force_Logout class. |
| 66 |
if ( ! class_exists( 'WP_Force_Logout' ) ) { |
| 67 |
include_once dirname( __FILE__ ) . '/includes/class-wp-force-logout.php'; |
| 68 |
} |
| 69 |
|
| 70 |
// Initialize the plugin. |
| 71 |
add_action( 'plugins_loaded', array( 'WP_Force_Logout', 'get_instance' ) ); |
| 72 |
} |
| 73 |
|