PluginProbe
Loginizer / 2.1.0
Loginizer v2.1.0
2.1.0 2.0.9 2.0.8 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 All 74 releases
loginizer / loginizer.php

loginizer.php in Loginizer 2.1.0, at loginizer.php

78 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Loginizer
4 Plugin URI: https://wordpress.org/extend/plugins/loginizer/
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.
6 Version: 2.1.0
7 Text Domain: loginizer
8 Author: Softaculous
9 Author URI: https://www.loginizer.com
10 License: LGPLv2.1
11 */
12
13 /*
14 Copyright (C) 2013 Loginizer (email : support@loginizer.com)
15 This program is free software: you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with this program. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29 if(!function_exists('add_action')){
30 echo 'You are not allowed to access this page directly.';
31 exit;
32 }
33
34 $_tmp_plugins = get_option('active_plugins', []);
35
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 }
57 }
58
59
60 function loginizer_load_plugin_textdomain(){
61 if(defined('LOGINIZER_PREMIUM')){
62 return;
63 }
64 load_plugin_textdomain('loginizer', FALSE, basename( dirname( __FILE__ ) ) . '/languages/');
65 }
66
67 add_action('init', 'loginizer_load_plugin_textdomain', 0);
68
69 // Is the premium plugin active ?
70 if(defined('LOGINIZER_VERSION')){
71 return;
72 }
73
74 define('LOGINIZER_FILE', __FILE__);
75
76 include_once(dirname(__FILE__).'/init.php');
77
78