| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: WPS Limit Login |
| 4 |
Description: Limit connection attempts by IP address |
| 5 |
Donate link: https://www.paypal.me/donateWPServeur |
| 6 |
Author: WPServeur, NicolasKulka, wpformation |
| 7 |
Author URI: https://wpserveur.net |
| 8 |
Version: 1.5.9.3 |
| 9 |
Requires at least: 4.2 |
| 10 |
Tested up to: 7.1 |
| 11 |
Domain Path: languages |
| 12 |
Text Domain: wps-limit-login |
| 13 |
License: GPLv2 or later |
| 14 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 15 |
*/ |
| 16 |
|
| 17 |
// don't load directly |
| 18 |
if ( ! defined( 'ABSPATH' ) ) { |
| 19 |
die( '-1' ); |
| 20 |
} |
| 21 |
|
| 22 |
// Plugin constants |
| 23 |
define( 'WPS_LIMIT_LOGIN_VERSION', '1.5.9.3' ); |
| 24 |
define( 'WPS_LIMIT_LOGIN_FOLDER', 'wps-limit-login' ); |
| 25 |
define( 'WPS_LIMIT_LOGIN_BASENAME', plugin_basename( __FILE__ ) ); |
| 26 |
if ( ! defined( 'WPS_PUB_API_URL' ) ) { |
| 27 |
define( 'WPS_PUB_API_URL', 'https://www.wpserveur.net/wp-json/' ); |
| 28 |
} |
| 29 |
|
| 30 |
define( 'WPS_LIMIT_LOGIN_URL', plugin_dir_url( __FILE__ ) ); |
| 31 |
define( 'WPS_LIMIT_LOGIN_DIR', plugin_dir_path( __FILE__ ) ); |
| 32 |
|
| 33 |
define( 'WPS_LIMIT_LOGIN_REMOTE_ADDR', 'REMOTE_ADDR' ); |
| 34 |
|
| 35 |
$wps_limit_login_my_error_shown = false; |
| 36 |
$wps_limit_login_just_lockedout = false; |
| 37 |
$wps_limit_login_notempty_credentials = false; |
| 38 |
|
| 39 |
require_once WPS_LIMIT_LOGIN_DIR . 'autoload.php'; |
| 40 |
|
| 41 |
// register_activation_hook( __FILE__, array( '\WPS\WPS_Limit_Login\Plugin', 'activate' ) ); |
| 42 |
|
| 43 |
if ( ! function_exists( 'plugins_loaded_wps_limit_login_plugin' ) ) { |
| 44 |
add_action( 'plugins_loaded', 'plugins_loaded_wps_limit_login_plugin' ); |
| 45 |
function plugins_loaded_wps_limit_login_plugin() { |
| 46 |
\WPS\WPS_Limit_Login\Plugin::get_instance(); |
| 47 |
|
| 48 |
load_plugin_textdomain( 'wps-limit-login', false, basename( rtrim( dirname( __FILE__ ), '/' ) ) . '/languages' ); |
| 49 |
} |
| 50 |
} |