Version Description
Download this release
Release Info
Developer | sean212 |
Plugin | Lockdown WP Admin |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.3 to 2.3.1
- lockdown-wp-admin.php +1 -1
- readme.txt +1 -1
- src/Lockdown/Manager.php +128 -0
lockdown-wp-admin.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Lockdown WP Admin
|
|
4 |
Plugin URI: http://seanfisher.co/lockdown-wp-admin/
|
5 |
Donate link: http://seanfisher.co/donate/
|
6 |
Description: Securing the WordPress Administration interface by concealing the administration dashboard and changing the login page URL.
|
7 |
-
Version: 2.3
|
8 |
Author: Sean Fisher
|
9 |
Author URI: http://seanfisher.co/
|
10 |
License: GPL
|
4 |
Plugin URI: http://seanfisher.co/lockdown-wp-admin/
|
5 |
Donate link: http://seanfisher.co/donate/
|
6 |
Description: Securing the WordPress Administration interface by concealing the administration dashboard and changing the login page URL.
|
7 |
+
Version: 2.3.1
|
8 |
Author: Sean Fisher
|
9 |
Author URI: http://seanfisher.co/
|
10 |
License: GPL
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Link: http://seanfisher.co/lockdown-wp-admin/
|
|
5 |
Tags: security, secure, lockdown, vulnerability, website security, wp-admin, login, hide login, rename login, http auth, 404, lockdown, srtfisher, secure
|
6 |
Requires at least: 3.6
|
7 |
Tested up to: 4.3.1
|
8 |
-
Stable tag: 2.3
|
9 |
|
10 |
Lockdown WP Admin conceals the administration and login screen from intruders. It can hide WordPress Admin (/wp-admin/) and and login (/wp-login.php) as well as add HTTP authentication to the login system. We can also change the login URL from wp-login.php to whatever you'd like: /login, /log-in-here, etc.
|
11 |
|
5 |
Tags: security, secure, lockdown, vulnerability, website security, wp-admin, login, hide login, rename login, http auth, 404, lockdown, srtfisher, secure
|
6 |
Requires at least: 3.6
|
7 |
Tested up to: 4.3.1
|
8 |
+
Stable tag: 2.3.1
|
9 |
|
10 |
Lockdown WP Admin conceals the administration and login screen from intruders. It can hide WordPress Admin (/wp-admin/) and and login (/wp-login.php) as well as add HTTP authentication to the login system. We can also change the login URL from wp-login.php to whatever you'd like: /login, /log-in-here, etc.
|
11 |
|
src/Lockdown/Manager.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Lockdown WP Admin Manager Class
|
4 |
+
*
|
5 |
+
* @author Sean Fisher <me@seanfisher.co>
|
6 |
+
* @version 2.3
|
7 |
+
* @license GPL
|
8 |
+
* @package lockdown
|
9 |
+
*/
|
10 |
+
class Lockdown_Manager
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* The version of lockdown WP Admin
|
14 |
+
*
|
15 |
+
* @global string
|
16 |
+
*/
|
17 |
+
public static $ld_admin_version = '2.3.1';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The HTTP Auth name for the protected area
|
21 |
+
* Change this via calling the object, not by editing the file.
|
22 |
+
*
|
23 |
+
* @access public
|
24 |
+
* @type string
|
25 |
+
*/
|
26 |
+
public $relm = 'Secure Area';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The current user ID from our internal array
|
30 |
+
*
|
31 |
+
* @access private
|
32 |
+
*/
|
33 |
+
protected $current_user = false;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Check if the Auth passed
|
37 |
+
* See {@link Lockdown_Manager::getAuthPassed()}
|
38 |
+
*
|
39 |
+
* @type boolean
|
40 |
+
*/
|
41 |
+
protected $passed = false;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Admin Instance
|
45 |
+
*
|
46 |
+
* @type Lockdown_Admin
|
47 |
+
*/
|
48 |
+
public $admin;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Application Instance
|
52 |
+
*
|
53 |
+
* @type Lockdown_Application
|
54 |
+
*/
|
55 |
+
public $application;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Static Instance of Manager
|
59 |
+
*
|
60 |
+
* @var Lockdown_Manager
|
61 |
+
*/
|
62 |
+
protected static $instance;
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Protected Constructor
|
66 |
+
*
|
67 |
+
* @see {Lockdown_Manager::instance()}
|
68 |
+
* @return void
|
69 |
+
*/
|
70 |
+
protected function __construct() {
|
71 |
+
|
72 |
+
// We don't like adding network wide WordPress plugins.
|
73 |
+
if ( ! class_exists( 'Disable_WPMS_Plugin_LD' ) ) {
|
74 |
+
require_once( LD_PLUGIN_DIR . '/no-wpmu.php' );
|
75 |
+
}
|
76 |
+
|
77 |
+
// Include dependant classes
|
78 |
+
require_once( LD_PLUGIN_DIR . '/src/Lockdown/Application.php' );
|
79 |
+
require_once( LD_PLUGIN_DIR . '/src/Lockdown/Admin.php' );
|
80 |
+
|
81 |
+
// Instantiate objects
|
82 |
+
$this->admin = new Lockdown_Admin( $this );
|
83 |
+
$this->application = new Lockdown_Application( $this );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Get Instance of Lockdown_Manager
|
88 |
+
*
|
89 |
+
* @return Lockdown_Manager
|
90 |
+
*/
|
91 |
+
public static function instance() {
|
92 |
+
if ( empty( self::$instance ) ) {
|
93 |
+
self::$instance = new self;
|
94 |
+
}
|
95 |
+
|
96 |
+
return self::$instance;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Retrieve the Login Base
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
public function getLoginBase() {
|
104 |
+
|
105 |
+
return $this->application->getLoginBase();
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* See if the auth passed
|
110 |
+
*
|
111 |
+
* @return boolean
|
112 |
+
*/
|
113 |
+
public function getAuthPassed() {
|
114 |
+
|
115 |
+
return (bool) $this->passed;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Update the Passed Auth Value
|
120 |
+
* See {@link Lockdown_Manager::getAuthPassed()}
|
121 |
+
*
|
122 |
+
* @access public
|
123 |
+
* @param boolean
|
124 |
+
*/
|
125 |
+
public function passed( $value ) {
|
126 |
+
$this->passed = (bool) $value;
|
127 |
+
}
|
128 |
+
}
|