| 1 |
<?php |
| 2 |
/** |
| 3 |
* Main plugin header. |
| 4 |
* |
| 5 |
* @package LoggedIn |
| 6 |
* |
| 7 |
* Plugin Name: Loggedin - Limit Concurrent Sessions |
| 8 |
* Plugin URI: https://duckdev.com/products/loggedin-limit-active-logins/ |
| 9 |
* Description: Limit an account to a specific number of simultaneous logins across all devices. |
| 10 |
* Version: 2.0.2 |
| 11 |
* Author: Joel James |
| 12 |
* Author URI: https://duckdev.com/ |
| 13 |
* Donate link: https://paypal.me/JoelCJ |
| 14 |
* License: GPL-2.0+ |
| 15 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 16 |
* Text Domain: loggedin |
| 17 |
* Domain Path: /languages |
| 18 |
* Requires PHP: 7.4 |
| 19 |
* Requires at least: 5.0 |
| 20 |
* |
| 21 |
* Loggedin is free software: you can redistribute it and/or modify |
| 22 |
* it under the terms of the GNU General Public License as published by |
| 23 |
* the Free Software Foundation, either version 2 of the License, or |
| 24 |
* any later version. |
| 25 |
* |
| 26 |
* Loggedin is distributed in the hope that it will be useful, |
| 27 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 28 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 29 |
* GNU General Public License for more details. |
| 30 |
* |
| 31 |
* You should have received a copy of the GNU General Public License |
| 32 |
* along with Loggedin. If not, see <http://www.gnu.org/licenses/>. |
| 33 |
*/ |
| 34 |
|
| 35 |
namespace DuckDev\Loggedin; |
| 36 |
|
| 37 |
// If this file is called directly, abort. |
| 38 |
defined( 'WPINC' ) || die; |
| 39 |
|
| 40 |
// Plugin directory path. |
| 41 |
define( 'LOGGEDIN_DIR', plugin_dir_path( __FILE__ ) ); |
| 42 |
define( 'LOGGEDIN_FILE', __FILE__ ); |
| 43 |
|
| 44 |
// Make sure loggedin is not already defined. |
| 45 |
if ( ! function_exists( __NAMESPACE__ . '\\init' ) ) { |
| 46 |
/** |
| 47 |
* Main instance of plugin. |
| 48 |
* |
| 49 |
* @since 2.0.0 |
| 50 |
* |
| 51 |
* @return void |
| 52 |
*/ |
| 53 |
function init() { |
| 54 |
// Load text domain. |
| 55 |
load_plugin_textdomain( |
| 56 |
'loggedin', |
| 57 |
false, |
| 58 |
dirname( plugin_basename( __FILE__ ) ) . '/languages/' |
| 59 |
); |
| 60 |
|
| 61 |
// Load autoloader. |
| 62 |
require __DIR__ . '/vendor/autoload.php'; |
| 63 |
|
| 64 |
// Load classes. |
| 65 |
new Core(); |
| 66 |
new Admin(); |
| 67 |
new Addons(); |
| 68 |
|
| 69 |
/** |
| 70 |
* Action hook to execute after our plugin init. |
| 71 |
* |
| 72 |
* Use this hook to init addons. |
| 73 |
* |
| 74 |
* @since 1.3.1 |
| 75 |
*/ |
| 76 |
do_action( 'loggedin_init' ); |
| 77 |
} |
| 78 |
} |
| 79 |
|
| 80 |
// Init the plugin. |
| 81 |
add_action( 'plugins_loaded', __NAMESPACE__ . '\\init' ); |
| 82 |
|