Version Description
- Fixed links issues on login, forget and register page for all language
- Fixed access the wp login page using new admin slug even admin is already logged in
Download this release
Release Info
Developer | india-web-developer |
Plugin | Protect Your Admin |
Version | 2.5 |
Comparing to | |
See all releases |
Code changes from version 2.4 to 2.5
- css/pwa-admin-min.css +0 -0
- images/mrweb.jpg +0 -0
- lib/pwa-deactivate.php +4 -4
- protect-wp-admin.php +1 -1
- pwa-class.php +23 -7
- readme.txt +8 -3
css/pwa-admin-min.css
CHANGED
File without changes
|
images/mrweb.jpg
CHANGED
File without changes
|
lib/pwa-deactivate.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Protect WP-Admin (C)
|
4 |
-
*
|
5 |
-
* @register_uninstall_hook()
|
6 |
* */
|
7 |
?>
|
8 |
<?php
|
@@ -11,8 +10,9 @@ if ( ! defined( 'ABSPATH' ) && !isset($_GET['disable_pwa']) ) exit; // Exit if a
|
|
11 |
if(isset($_GET['disable_pwa']))
|
12 |
{
|
13 |
require_once('../../../../wp-load.php' );
|
14 |
-
|
15 |
-
|
|
|
16 |
}
|
17 |
|
18 |
|
1 |
<?php
|
2 |
/*
|
3 |
* Protect WP-Admin (C)
|
4 |
+
* Deactivate plugin using URL
|
|
|
5 |
* */
|
6 |
?>
|
7 |
<?php
|
10 |
if(isset($_GET['disable_pwa']))
|
11 |
{
|
12 |
require_once('../../../../wp-load.php' );
|
13 |
+
$array = get_option('active_plugins');
|
14 |
+
$array_without_strawberries = array_diff($array, array('protect-wp-admin/protect-wp-admin.php'));
|
15 |
+
update_option( 'active_plugins', $array_without_strawberries );
|
16 |
}
|
17 |
|
18 |
|
protect-wp-admin.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.mrwebsolution.in/
|
|
5 |
Description: "protect-wp-admin" is a very help full plugin to make wordpress admin more secure. Protect WP-Admin plugin is provide the options for change the wp-admin url and make the login page private(directly user can't access the login page).
|
6 |
Author: MR Web Solution
|
7 |
Author URI: http://www.mrwebsolution.in/
|
8 |
-
Version: 2.
|
9 |
*/
|
10 |
|
11 |
/*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
|
5 |
Description: "protect-wp-admin" is a very help full plugin to make wordpress admin more secure. Protect WP-Admin plugin is provide the options for change the wp-admin url and make the login page private(directly user can't access the login page).
|
6 |
Author: MR Web Solution
|
7 |
Author URI: http://www.mrwebsolution.in/
|
8 |
+
Version: 2.5
|
9 |
*/
|
10 |
|
11 |
/*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
|
pwa-class.php
CHANGED
@@ -20,6 +20,7 @@ function get_pwa_setting_options() {
|
|
20 |
return $pwaOptions;
|
21 |
}
|
22 |
endif;
|
|
|
23 |
GLOBAL $getPwaOptions;
|
24 |
$getPwaOptions = get_pwa_setting_options();
|
25 |
if(isset($getPwaOptions['pwa_active']) && '1'==$getPwaOptions['pwa_active'])
|
@@ -41,13 +42,13 @@ if(!function_exists('check_login_status')):
|
|
41 |
function check_login_status()
|
42 |
{
|
43 |
$getPwaOptions = get_pwa_setting_options();
|
44 |
-
$current_uri =
|
45 |
$newadminurl = home_url($getPwaOptions['pwa_rewrite_text']);
|
46 |
if ( is_user_logged_in() && $current_uri==$newadminurl)
|
47 |
{
|
48 |
wp_redirect(admin_url()); die();
|
49 |
} else {
|
50 |
-
//slient';
|
51 |
}
|
52 |
|
53 |
|
@@ -105,7 +106,7 @@ function pwa_custom_script()
|
|
105 |
$getPwaOptions=get_pwa_setting_options();
|
106 |
if(isset($getPwaOptions['pwa_active']) && ''!=$getPwaOptions['pwa_rewrite_text']){
|
107 |
|
108 |
-
echo '<script>jQuery(
|
109 |
jQuery("#login #login_error a").attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/lostpassword').'");
|
110 |
jQuery("body.login-action-resetpass p.reset-pass a").attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/').'");
|
111 |
var formId= jQuery("#login form").attr("id");
|
@@ -121,10 +122,25 @@ if(formId=="loginform"){
|
|
121 |
{
|
122 |
//silent
|
123 |
}
|
124 |
-
jQuery("#nav a").
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
//silent
|
129 |
}
|
130 |
});});</script>';
|
20 |
return $pwaOptions;
|
21 |
}
|
22 |
endif;
|
23 |
+
|
24 |
GLOBAL $getPwaOptions;
|
25 |
$getPwaOptions = get_pwa_setting_options();
|
26 |
if(isset($getPwaOptions['pwa_active']) && '1'==$getPwaOptions['pwa_active'])
|
42 |
function check_login_status()
|
43 |
{
|
44 |
$getPwaOptions = get_pwa_setting_options();
|
45 |
+
$current_uri = pwa_get_current_page_url($_SERVER);
|
46 |
$newadminurl = home_url($getPwaOptions['pwa_rewrite_text']);
|
47 |
if ( is_user_logged_in() && $current_uri==$newadminurl)
|
48 |
{
|
49 |
wp_redirect(admin_url()); die();
|
50 |
} else {
|
51 |
+
//echo 'slient';
|
52 |
}
|
53 |
|
54 |
|
106 |
$getPwaOptions=get_pwa_setting_options();
|
107 |
if(isset($getPwaOptions['pwa_active']) && ''!=$getPwaOptions['pwa_rewrite_text']){
|
108 |
|
109 |
+
echo '<script>jQuery(document).ready(function(){
|
110 |
jQuery("#login #login_error a").attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/lostpassword').'");
|
111 |
jQuery("body.login-action-resetpass p.reset-pass a").attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/').'");
|
112 |
var formId= jQuery("#login form").attr("id");
|
122 |
{
|
123 |
//silent
|
124 |
}
|
125 |
+
//alert(jQuery("#nav a").slice(0).attr("href"));
|
126 |
+
';
|
127 |
+
$currentUrl = pwa_get_current_page_url($_SERVER);
|
128 |
+
echo 'jQuery("#nav a").each(function(){
|
129 |
+
/* var linkText=jQuery(this).attr("href");
|
130 |
+
|
131 |
+
if(linkText.indexOf("?action=register") >= 0)
|
132 |
+
{
|
133 |
+
//jQuery(this).attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/register').'");
|
134 |
+
}
|
135 |
+
|
136 |
+
if(linkText.indexOf("?action=lostpassword") >= 0)
|
137 |
+
{
|
138 |
+
// jQuery(this).attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/lostpassword').'");
|
139 |
+
}
|
140 |
+
*/
|
141 |
+
var linkText = jQuery(this).attr("href").match(/[^/]*(?=(\/)?$)/)[0];
|
142 |
+
if(linkText=="wp-login.php"){jQuery(this).attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"]).'");}
|
143 |
+
else if(linkText=="wp-login.php?action=register"){jQuery(this).attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/register').'");}else if(linkText=="wp-login.php?action=lostpassword"){jQuery(this).attr("href","'.home_url($getPwaOptions["pwa_rewrite_text"].'/lostpassword').'");}else {
|
144 |
//silent
|
145 |
}
|
146 |
});});</script>';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: Protect WP-Admin,wp-admin,Protect wordpress admin,Secure Admin,Admin,Scure Wordpress Admin,Rename Admin URL, Rename Wordpress Admin URL,Change wp-admin url,Change Admin URL,Change Admin Path,Restrict wp-admin
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
Protect Your Website Admin Against Hackers & Modify Login Page Design
|
10 |
|
@@ -45,7 +45,8 @@ It is extremely important to back up your database before beginning the activate
|
|
45 |
|
46 |
We have also released an add-on for Protect-WP-Admin which not only demonstrates the flexibility of Protect-WP-Admin, but also adds some important features
|
47 |
|
48 |
-
* Login Attempt Counter
|
|
|
49 |
* An option for manage login page CSS from admin
|
50 |
* An option for change to username of any user from admin
|
51 |
* An option for define custom redirect url for defalut wp-admin url
|
@@ -115,7 +116,11 @@ Don not forgot to update the "newadmin" slug with your new admin slug (that you
|
|
115 |
|
116 |
|
117 |
|
118 |
-
== Changelog ==
|
|
|
|
|
|
|
|
|
119 |
|
120 |
= 2.4 =
|
121 |
* Tested with new wordpress version 4.7
|
4 |
Tags: Protect WP-Admin,wp-admin,Protect wordpress admin,Secure Admin,Admin,Scure Wordpress Admin,Rename Admin URL, Rename Wordpress Admin URL,Change wp-admin url,Change Admin URL,Change Admin Path,Restrict wp-admin
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 2.5
|
8 |
|
9 |
Protect Your Website Admin Against Hackers & Modify Login Page Design
|
10 |
|
45 |
|
46 |
We have also released an add-on for Protect-WP-Admin which not only demonstrates the flexibility of Protect-WP-Admin, but also adds some important features
|
47 |
|
48 |
+
* Login Attempt Counter
|
49 |
+
* An option for define to login page logo URL
|
50 |
* An option for manage login page CSS from admin
|
51 |
* An option for change to username of any user from admin
|
52 |
* An option for define custom redirect url for defalut wp-admin url
|
116 |
|
117 |
|
118 |
|
119 |
+
== Changelog ==
|
120 |
+
|
121 |
+
= 2.5 =
|
122 |
+
* Fixed links issues on login, forget and register page for all language
|
123 |
+
* Fixed access the wp login page using new admin slug even admin is already logged in
|
124 |
|
125 |
= 2.4 =
|
126 |
* Tested with new wordpress version 4.7
|