-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Carl Alberto
committed
Sep 17, 2020
1 parent
ba0c89a
commit 787de47
Showing
10 changed files
with
1,469 additions
and
619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Easy IP Blocker | ||
* Version: 1.0.0 | ||
* Plugin URI: https://carlalberto.code.blog/ | ||
* Description: Easily blocks IPs | ||
* Author: Carl Alberto | ||
* Author URI: https://carlalberto.code.blog/ | ||
* Requires at least: 5.0 | ||
* Tested up to: 5.5.1 | ||
* | ||
* Text Domain: easy-ip-blocker | ||
* Domain Path: /lang/ | ||
* | ||
* @package WordPress | ||
* @author Carl Alberto | ||
* @since 1.0.0 | ||
*/ | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} | ||
|
||
// Load plugin class files. | ||
require_once 'includes/class-easy-ip-blocker.php'; | ||
require_once 'includes/class-easy-ip-blocker-settings.php'; | ||
|
||
// Load plugin libraries. | ||
require_once 'includes/lib/class-easy-ip-blocker-admin-api.php'; | ||
|
||
/** | ||
* Returns the main instance of Easy_IP_Blocker to prevent the need to use globals. | ||
* | ||
* @since 1.0.0 | ||
* @return object Easy_IP_Blocker | ||
*/ | ||
function easy_ip_blocker() { | ||
$instance = Easy_IP_Blocker::instance( __FILE__, '1.0.0' ); | ||
|
||
if ( is_null( $instance->settings ) ) { | ||
$instance->settings = Easy_IP_Blocker_Settings::instance( $instance ); | ||
} | ||
|
||
return $instance; | ||
} | ||
|
||
easy_ip_blocker(); |
Oops, something went wrong.