| @@ -1,21 +1,18 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package loginizer | |
| 4 | - * @version 1.3.2 | |
| 5 | - */ | |
| 6 | 2 | /* |
| 7 | 3 | Plugin Name: Loginizer |
| 8 | -Plugin URI: http://wordpress.org/extend/plugins/loginizer/ | |
| 4 | +Plugin URI: https://wordpress.org/extend/plugins/loginizer/ | |
| 9 | 5 | Description: Loginizer is a WordPress plugin which helps you fight against bruteforce attack by blocking login for the IP after it reaches maximum retries allowed. You can blacklist or whitelist IPs for login using Loginizer. |
| 10 | -Version: 1.3.2 | |
| 11 | -Author: Raj Kothari | |
| 12 | -Author URI: http://www.loginizer.com | |
| 13 | -License: GPLv3 or later | |
| 6 | +Version: 2.0.6 | |
| 7 | +Text Domain: loginizer | |
| 8 | +Author: Softaculous | |
| 9 | +Author URI: https://www.loginizer.com | |
| 10 | +License: LGPLv2.1 | |
| 14 | 11 | */ |
| 15 | 12 | |
| 16 | 13 | /* |
| 17 | -Copyright (C) 2013 Raj Kothari (email : support@loginizer.com) | |
| 14 | +Copyright (C) 2013 Loginizer (email : support@loginizer.com) | |
| 18 | 15 | This program is free software: you can redistribute it and/or modify |
| 19 | 16 | it under the terms of the GNU General Public License as published by |
| 20 | 17 | the Free Software Foundation, either version 3 of the License, or |
| 21 | 18 | (at your option) any later version. |
| @@ -33,22 +30,45 @@ | ||
| 33 | 30 | echo 'You are not allowed to access this page directly.'; |
| 34 | 31 | exit; |
| 35 | 32 | } |
| 36 | 33 | |
| 37 | -$_ltmp_plugins = get_option('active_plugins'); | |
| 34 | +$_tmp_plugins = get_option('active_plugins', []); | |
| 38 | 35 | |
| 39 | -// Is the premium plugin loaded ? | |
| 40 | -if(in_array('loginizer-security/loginizer-security.php', $_ltmp_plugins)){ | |
| 41 | - return; | |
| 36 | +if(!defined('SITEPAD') && in_array('loginizer-security/loginizer-security.php', $_tmp_plugins)){ | |
| 37 | + | |
| 38 | + // Was introduced in 1.9.0 | |
| 39 | + $loginizer_pro_info = get_option('loginizer_pro_version'); | |
| 40 | + | |
| 41 | + if(!empty($loginizer_pro_info) && version_compare($loginizer_pro_info, '1.9.0', '>=')){ | |
| 42 | + // Let Loginizer load | |
| 43 | + | |
| 44 | + // Lets check for older versions | |
| 45 | + }else{ | |
| 46 | + | |
| 47 | + if(!function_exists('get_plugin_data')){ | |
| 48 | + include_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 49 | + } | |
| 50 | + | |
| 51 | + $loginizer_pro_info = get_plugin_data(WP_PLUGIN_DIR . '/loginizer-security/loginizer-security.php'); | |
| 52 | + | |
| 53 | + if(!empty($loginizer_pro_info) && version_compare($loginizer_pro_info['Version'], '1.8.9', '<')){ | |
| 54 | + return; | |
| 55 | + } | |
| 56 | + } | |
| 42 | 57 | } |
| 43 | 58 | |
| 59 | + | |
| 60 | +function loginizer_load_plugin_textdomain(){ | |
| 61 | + load_plugin_textdomain('loginizer', FALSE, basename( dirname( __FILE__ ) ) . '/languages/'); | |
| 62 | +} | |
| 63 | + | |
| 64 | +add_action('init', 'loginizer_load_plugin_textdomain', 0); | |
| 65 | + | |
| 44 | 66 | // Is the premium plugin active ? |
| 45 | 67 | if(defined('LOGINIZER_VERSION')){ |
| 46 | 68 | return; |
| 47 | 69 | } |
| 48 | 70 | |
| 49 | -$plugin_loginizer = plugin_basename(__FILE__); | |
| 50 | 71 | define('LOGINIZER_FILE', __FILE__); |
| 51 | -define('LOGINIZER_API', 'http://api.loginizer.com/'); | |
| 52 | 72 | |
| 53 | 73 | include_once(dirname(__FILE__).'/init.php'); |
| 54 | 74 | |