Version Description
Download this release
Release Info
Developer | india-web-developer |
Plugin | Protect Your Admin |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 2.0
- protect-wp-admin.php +33 -25
- readme.txt +34 -26
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: Raghunath
|
7 |
Author URI: http://www.mrwebsolution.in/
|
8 |
-
Version:
|
9 |
*/
|
10 |
|
11 |
/*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
|
@@ -142,7 +142,7 @@ function init_pwa_admin_option_page(){
|
|
142 |
|
143 |
</div>
|
144 |
<span class="submit-btn"><?php echo get_submit_button('Save Settings','button-primary','submit','','');?></span>
|
145 |
-
<div style="color:red;"><strong>Important!:</strong> Please update permalinks before activate the plugin. Permalinks option should not be default.</div>
|
146 |
|
147 |
<?php settings_fields('pwa_setting_options'); ?>
|
148 |
</form>
|
@@ -178,6 +178,9 @@ if(file_exists($csbwfsHtaccessfilePath)){
|
|
178 |
$htaccessWriteable="0";
|
179 |
}
|
180 |
$localHostIP=$_SERVER['REMOTE_ADDR'];
|
|
|
|
|
|
|
181 |
echo $script='<script type="text/javascript">
|
182 |
/* Protect WP-Admin js for admin */
|
183 |
jQuery(document).ready(function(){
|
@@ -192,45 +195,50 @@ echo $script='<script type="text/javascript">
|
|
192 |
});
|
193 |
|
194 |
jQuery("#pwa-settings-form-admin .button-primary").click(function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
var seoUrlVal=jQuery("#check_permalink").val();
|
196 |
var htaccessWriteable ="'.$htaccessWriteable.'";
|
197 |
var hostIP ="'.$localHostIP.'";
|
|
|
198 |
if(seoUrlVal==0)
|
199 |
{
|
200 |
alert("Please update permalinks before activate the plugin. Permalinks option should not be default");
|
201 |
document.location.href="'.admin_url('options-permalink.php').'";
|
202 |
return false;
|
203 |
}
|
204 |
-
else if(htaccessWriteable=="0" && hostIP!="127.0.0.1"){
|
205 |
alert("Error : .htaccess file is not exist OR may be htaccess file is not writable, So please double check it before enable the plugin");
|
206 |
return false;
|
207 |
-
}
|
208 |
else
|
209 |
{
|
210 |
return true;
|
211 |
}
|
212 |
});
|
213 |
-
|
214 |
-
jQuery("#submit").click(function(){
|
215 |
-
var $el = jQuery("#pwa_active");
|
216 |
-
var $vlue = jQuery("#pwa_rewrite_text").val();
|
217 |
-
|
218 |
-
if(($el[0].checked) && $vlue=="")
|
219 |
-
{
|
220 |
-
jQuery("#pwa_rewrite_text").css("border","1px solid red");
|
221 |
-
jQuery("#adminurl").append(" <strong style=\'color:red;\'>Please enter admin url slug</strong>");
|
222 |
-
return false;
|
223 |
-
}
|
224 |
-
|
225 |
-
if($el[0].checked){
|
226 |
-
if (confirm("1. Have you updated your permalink settings?\n\n2. Have you checked writable permission on htaccess file?\n\nIf your answer is YES then Click OK to continue")){
|
227 |
-
return true;
|
228 |
-
}else
|
229 |
-
{
|
230 |
-
return false;
|
231 |
-
}
|
232 |
-
}
|
233 |
-
})
|
234 |
|
235 |
})
|
236 |
</script>';
|
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: Raghunath
|
7 |
Author URI: http://www.mrwebsolution.in/
|
8 |
+
Version: 2.0
|
9 |
*/
|
10 |
|
11 |
/*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
|
142 |
|
143 |
</div>
|
144 |
<span class="submit-btn"><?php echo get_submit_button('Save Settings','button-primary','submit','','');?></span>
|
145 |
+
<div style="color:red;"><strong>Important!:</strong> Please update permalinks before activate the plugin. Permalinks option should not be set to default.</div>
|
146 |
|
147 |
<?php settings_fields('pwa_setting_options'); ?>
|
148 |
</form>
|
178 |
$htaccessWriteable="0";
|
179 |
}
|
180 |
$localHostIP=$_SERVER['REMOTE_ADDR'];
|
181 |
+
$pwaActive=get_option('pwa_active');
|
182 |
+
//$pwaNewSlug=get_option('pwa_rewrite_text');
|
183 |
+
//print_r($_SERVER); exit;
|
184 |
echo $script='<script type="text/javascript">
|
185 |
/* Protect WP-Admin js for admin */
|
186 |
jQuery(document).ready(function(){
|
195 |
});
|
196 |
|
197 |
jQuery("#pwa-settings-form-admin .button-primary").click(function(){
|
198 |
+
var $el = jQuery("#pwa_active");
|
199 |
+
var $vlue = jQuery("#pwa_rewrite_text").val();
|
200 |
+
var pwaActive ="'.$pwaActive.'";
|
201 |
+
if((!$el[0].checked) && $vlue=="")
|
202 |
+
{
|
203 |
+
alert("Please enable plugin");
|
204 |
+
return false;
|
205 |
+
}
|
206 |
+
|
207 |
+
if(($el[0].checked) && $vlue=="")
|
208 |
+
{
|
209 |
+
jQuery("#pwa_rewrite_text").css("border","1px solid red");
|
210 |
+
jQuery("#adminurl").append(" <strong style=\'color:red;\'>Please enter admin url slug</strong>");
|
211 |
+
return false;
|
212 |
+
}
|
213 |
+
|
214 |
+
if(($el[0].checked) && pwaActive==""){
|
215 |
+
//alert(pwaActive);
|
216 |
+
if (confirm("1. Have you updated your permalink settings?\n\n2. Have you checked writable permission on htaccess file?\n\nIf your answer is YES then Click OK to continue")){
|
217 |
+
return true;
|
218 |
+
}else
|
219 |
+
{
|
220 |
+
return false;
|
221 |
+
}
|
222 |
+
}
|
223 |
var seoUrlVal=jQuery("#check_permalink").val();
|
224 |
var htaccessWriteable ="'.$htaccessWriteable.'";
|
225 |
var hostIP ="'.$localHostIP.'";
|
226 |
+
// alert(hostIP);
|
227 |
if(seoUrlVal==0)
|
228 |
{
|
229 |
alert("Please update permalinks before activate the plugin. Permalinks option should not be default");
|
230 |
document.location.href="'.admin_url('options-permalink.php').'";
|
231 |
return false;
|
232 |
}
|
233 |
+
/*else if(htaccessWriteable=="0" && hostIP!="127.0.0.1"){
|
234 |
alert("Error : .htaccess file is not exist OR may be htaccess file is not writable, So please double check it before enable the plugin");
|
235 |
return false;
|
236 |
+
}*/
|
237 |
else
|
238 |
{
|
239 |
return true;
|
240 |
}
|
241 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
|
243 |
})
|
244 |
</script>';
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors:india-web-developer
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZEMSYQUZRUK6A
|
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.3
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag:
|
8 |
|
9 |
1.) Protect Your Website Admin Against Hackers
|
10 |
2.) Modify Login Page Design
|
@@ -46,15 +46,15 @@ It is extremely important to back up your database before beginning the activate
|
|
46 |
|
47 |
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
|
48 |
|
49 |
-
* Login Attempt Counter
|
50 |
-
* An option for manage login page CSS from admin
|
51 |
-
* An option
|
52 |
-
* An option for define custom redirect url for defalut wp-admin url
|
53 |
* Faster support
|
54 |
|
55 |
|
56 |
|
57 |
-
**[ Upgrade to Pro Version](https://
|
58 |
|
59 |
|
60 |
== Installation ==
|
@@ -68,33 +68,37 @@ However, if you install this manually, follow these steps:
|
|
68 |
|
69 |
== Frequently Asked Questions ==
|
70 |
|
71 |
-
* 1.Nothing happen after enable and add the new wordpress admin url?
|
72 |
|
73 |
Don't worry, Just update the site permalink ("Settings" >> "Permalinks") and re-check,Now this time it will be work fine
|
74 |
|
75 |
-
* 2.Not able to login into admin after enable plugin?
|
76 |
|
77 |
-
May be issue can come when you not give proper writable permission on htaccess file OR you have not update permalink settings to SEO friendly url from admin. You can access login page url with default wp-admin slug after disable my plugin, you can disable plugin
|
78 |
|
79 |
-
* 3.Am i not able to login after installation
|
80 |
|
81 |
Basicaly issues can come only in case when you will use default permalink settings.
|
82 |
If your permalink will be update to any other option except default then it will be work fine. Anyway Dont' worry, manualy you can add code into your site .htaccess file.
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
RewriteRule ^
|
90 |
-
RewriteRule ^newadmin/?$ /wp-login.php [QSA,L]
|
91 |
-
|
92 |
-
RewriteCond %{REQUEST_FILENAME} !-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
|
99 |
== Screenshots ==
|
100 |
|
@@ -110,7 +114,11 @@ Don not forgot to update the "newadmin" slug with your new admin slug (that you
|
|
110 |
|
111 |
|
112 |
|
113 |
-
== Changelog ==
|
|
|
|
|
|
|
|
|
114 |
= 1.9 =
|
115 |
* Fixed htaccess writable notice popup related issues on localhost
|
116 |
* Add an new confirmation alert before enable plugin
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZEMSYQUZRUK6A
|
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.3
|
6 |
+
Tested up to: 4.5
|
7 |
+
Stable tag: 2.0
|
8 |
|
9 |
1.) Protect Your Website Admin Against Hackers
|
10 |
2.) Modify Login Page Design
|
46 |
|
47 |
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
|
48 |
|
49 |
+
* Login Attempt Counter
|
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
|
53 |
* Faster support
|
54 |
|
55 |
|
56 |
|
57 |
+
**[ Upgrade to Pro Version](https://rgaddons.wordpress.com/protect-wp-admin-pro/)**
|
58 |
|
59 |
|
60 |
== Installation ==
|
68 |
|
69 |
== Frequently Asked Questions ==
|
70 |
|
71 |
+
* 1.) Nothing happen after enable and add the new wordpress admin url?
|
72 |
|
73 |
Don't worry, Just update the site permalink ("Settings" >> "Permalinks") and re-check,Now this time it will be work fine
|
74 |
|
75 |
+
* 2.) Not able to login into admin after enable plugin?
|
76 |
|
77 |
+
May be issue can come when you not give proper writable permission on htaccess file OR you have not update permalink settings to SEO friendly url from admin. You can access login page url with default wp-admin slug after disable my plugin, you can disable plugin through FTP by rename protect-wp-admin folder to any other one.
|
78 |
|
79 |
+
* 3.) Am i not able to login after installation
|
80 |
|
81 |
Basicaly issues can come only in case when you will use default permalink settings.
|
82 |
If your permalink will be update to any other option except default then it will be work fine. Anyway Dont' worry, manualy you can add code into your site .htaccess file.
|
83 |
|
84 |
+
# BEGIN WordPress
|
85 |
+
<IfModule mod_rewrite.c>
|
86 |
+
RewriteEngine On
|
87 |
+
RewriteBase /
|
88 |
+
RewriteRule ^index\.php$ - [L]
|
89 |
+
RewriteRule ^newadmin/?$ /wp-login.php [QSA,L]
|
90 |
+
RewriteRule ^newadmin/register/?$ /wp-login.php?action=register [QSA,L]
|
91 |
+
RewriteRule ^newadmin/lostpassword/?$ /wp-login.php?action=lostpassword [QSA,L]
|
92 |
+
RewriteCond %{REQUEST_FILENAME} !-f
|
93 |
+
RewriteCond %{REQUEST_FILENAME} !-d
|
94 |
+
RewriteRule . /index.php [L]
|
95 |
+
</IfModule>
|
96 |
+
# END WordPress
|
97 |
+
|
98 |
+
Don not forgot to update the "newadmin" slug with your new admin slug (that you were added during update the plugin settings) :-)
|
99 |
+
|
100 |
+
4.) Is there any option for set number of login attempt?
|
101 |
+
* Yes, this option is available in pro addon not in free version. please browse https://rgaddons.wordpress.com/protect-wp-admin-pro/ this url for purchase to pro addon.
|
102 |
|
103 |
== Screenshots ==
|
104 |
|
114 |
|
115 |
|
116 |
|
117 |
+
== Changelog ==
|
118 |
+
= 1.9 =
|
119 |
+
* Tested with new wordpress version 2.5
|
120 |
+
* Removed localhost permission related conditions.
|
121 |
+
|
122 |
= 1.9 =
|
123 |
* Fixed htaccess writable notice popup related issues on localhost
|
124 |
* Add an new confirmation alert before enable plugin
|