Protect Your Admin - Version 1.9

Version Description

  • Fixed htaccess writable notice popup related issues on localhost
    • Add an new confirmation alert before enable plugin
Download this release

Release Info

Developer india-web-developer
Plugin Icon 128x128 Protect Your Admin
Version 1.9
Comparing to
See all releases

Code changes from version 1.8 to 1.9

Files changed (3) hide show
  1. css/pwa-admin-min.css +1 -1
  2. protect-wp-admin.php +18 -7
  3. readme.txt +12 -4
css/pwa-admin-min.css CHANGED
@@ -2,4 +2,4 @@
2
  * Protect WP-Admin (C)
3
  * @Raghunath Gurjar
4
  * */
5
- #pwa-tab-menu {width:80%; padding:1%;background: none repeat scroll 0 0 #ccc;}#pwa-tab-menu a {background: none repeat scroll 0 0 #DCA808; border: 0 none;color: #FFFFFF;display: inline-block;font-size: 16px;font-weight: bold;padding: 12px 35px;opacity:0.5;}#pwa-tab-menu a:hover{cursor:pointer;background: none repeat scroll 0 0 #DCA808;opacity:1;}#pwa-tab-menu a.active{ background: none repeat scroll 0 0 #DCA808;opacity:1;}#pwa-settings-form-admin .submit-btn {width: 100%; display: inline-block; padding-top: 10px; margin-top: 10px; border-top: 1px dashed #DCA808;}#pwa-settings-form-admin .submit-btn .button-primary{cursor:pointer;height:35px;}#pwa-settings-form-admin .csbwfs-setting p label {min-width:75px;display:inline-block;}#div-pwa-support img {width:auto; height:auto;}#pwa-settings-form-admin ul {list-style:inside}#pwa-settings-form-admin #div-pwa-support .contact-author{ background: none repeat scroll 0 0 #DC22FF;border: 0 none;color: #FFFFFF;display: inline-block;font-size: 12px; font-weight: bold;padding: 2px 5px;text-decoration: none;}
2
  * Protect WP-Admin (C)
3
  * @Raghunath Gurjar
4
  * */
5
+ #pwa-tab-menu {width:80%; padding:1%;background: none repeat scroll 0 0 #ccc;}#pwa-tab-menu a {background: none repeat scroll 0 0 #DCA808; border: 0 none;color: #FFFFFF;display: inline-block;font-size: 16px;font-weight: bold;padding: 12px 35px;opacity:0.5;}#pwa-tab-menu a:hover{cursor:pointer;background: none repeat scroll 0 0 #DCA808;opacity:1;}#pwa-tab-menu a.active{ background: none repeat scroll 0 0 #DCA808;opacity:1;}#pwa-settings-form-admin .submit-btn {width: 100%; display: inline-block; padding-top: 10px; margin-top: 10px; border-top: 1px dashed #DCA808;}#pwa-settings-form-admin .submit-btn .button-primary{cursor:pointer;height:35px;}#pwa-settings-form-admin .csbwfs-setting p label {min-width:75px;display:inline-block;}#div-pwa-support img {width:50%px; height:auto;}#pwa-settings-form-admin ul {list-style:inside}#pwa-settings-form-admin #div-pwa-support .contact-author{ background: none repeat scroll 0 0 #DC22FF;border: 0 none;color: #FFFFFF;display: inline-block;font-size: 12px; font-weight: bold;padding: 2px 5px;text-decoration: none;}
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: 1.8
9
  */
10
 
11
  /*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
@@ -130,7 +130,10 @@ function init_pwa_admin_option_page(){
130
  <li><a href="https://wordpress.org/plugins/wp-social-buttons/" target="_blank">WP Social Buttons</a></li>
131
  <li><a href="https://wordpress.org/plugins/wp-youtube-gallery/" target="_blank">WP Youtube Gallery</a></li>
132
  <li><a href="https://wordpress.org/plugins/cf7-advance-security/" target="_blank">CF7 Advance Security</a></li>
 
133
  <li><a href="https://wordpress.org/plugins/wc-sales-count-manager/" target="_blank">WooCommerce Sales Count Manager</a></li>
 
 
134
  </ol></p></td>
135
  </tr>
136
  </table>
@@ -142,7 +145,6 @@ function init_pwa_admin_option_page(){
142
  <div style="color:red;"><strong>Important!:</strong> Please update permalinks before activate the plugin. Permalinks option should not be default.</div>
143
 
144
  <?php settings_fields('pwa_setting_options'); ?>
145
-
146
  </form>
147
 
148
  <!-- End Options Form -->
@@ -175,7 +177,7 @@ if(file_exists($csbwfsHtaccessfilePath)){
175
  {
176
  $htaccessWriteable="0";
177
  }
178
-
179
  echo $script='<script type="text/javascript">
180
  /* Protect WP-Admin js for admin */
181
  jQuery(document).ready(function(){
@@ -192,14 +194,15 @@ echo $script='<script type="text/javascript">
192
  jQuery("#pwa-settings-form-admin .button-primary").click(function(){
193
  var seoUrlVal=jQuery("#check_permalink").val();
194
  var htaccessWriteable ="'.$htaccessWriteable.'";
 
195
  if(seoUrlVal==0)
196
  {
197
  alert("Please update permalinks before activate the plugin. Permalinks option should not be default");
198
  document.location.href="'.admin_url('options-permalink.php').'";
199
  return false;
200
  }
201
- else if(htaccessWriteable=="0"){
202
- alert("Error : .htaccess file is not exist OR may be htaccess file is not writeable, So please double check it before enable the plugin");
203
  return false;
204
  }
205
  else
@@ -218,8 +221,15 @@ echo $script='<script type="text/javascript">
218
  jQuery("#adminurl").append(" <strong style=\'color:red;\'>Please enter admin url slug</strong>");
219
  return false;
220
  }
221
- return true;
222
-
 
 
 
 
 
 
 
223
  })
224
 
225
  })
@@ -283,6 +293,7 @@ if(!function_exists('init_deactivation_pwa_plugins')):
283
  function init_deactivation_pwa_plugins(){
284
  delete_option('pwa_active');
285
  delete_option('pwa_logout');
 
286
  flush_rewrite_rules();
287
  }
288
  endif;
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: 1.9
9
  */
10
 
11
  /*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
130
  <li><a href="https://wordpress.org/plugins/wp-social-buttons/" target="_blank">WP Social Buttons</a></li>
131
  <li><a href="https://wordpress.org/plugins/wp-youtube-gallery/" target="_blank">WP Youtube Gallery</a></li>
132
  <li><a href="https://wordpress.org/plugins/cf7-advance-security/" target="_blank">CF7 Advance Security</a></li>
133
+ <li><a href="https://wordpress.org/plugins/tweets-slider/" target="_blank">Tweets Slider</a></li>
134
  <li><a href="https://wordpress.org/plugins/wc-sales-count-manager/" target="_blank">WooCommerce Sales Count Manager</a></li>
135
+ <li><a href="https://wordpress.org/plugins/rg-responsive-gallery/" target="_blank">RG Responsive Gallery/</a></li>
136
+ <li><a href="https://wordpress.org/plugins/protect-wp-admin/" target="_blank">Protect WP Admin</a></li>
137
  </ol></p></td>
138
  </tr>
139
  </table>
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>
149
 
150
  <!-- End Options Form -->
177
  {
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(){
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
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
  })
293
  function init_deactivation_pwa_plugins(){
294
  delete_option('pwa_active');
295
  delete_option('pwa_logout');
296
+ remove_action('init', 'init_pwa_admin_rewrite_rules' );
297
  flush_rewrite_rules();
298
  }
299
  endif;
readme.txt CHANGED
@@ -3,10 +3,11 @@ 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.4.1
7
- Stable tag: 1.8
8
 
9
- Protect Your Website Admin Against Hackers and Modify Login Page Style
 
10
 
11
  == Description ==
12
 
@@ -71,7 +72,11 @@ However, if you install this manually, follow these steps:
71
 
72
  Don't worry, Just update the site permalink ("Settings" >> "Permalinks") and re-check,Now this time it will be work fine
73
 
74
- * 2.Am i not able to login after installation
 
 
 
 
75
 
76
  Basicaly issues can come only in case when you will use default permalink settings.
77
  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.
@@ -106,6 +111,9 @@ Don not forgot to update the "newadmin" slug with your new admin slug (that you
106
 
107
 
108
  == Changelog ==
 
 
 
109
 
110
  = 1.8 =
111
  * Fixed Login Failure issue
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.4.2
7
+ Stable tag: 1.9
8
 
9
+ 1.) Protect Your Website Admin Against Hackers
10
+ 2.) Modify Login Page Design
11
 
12
  == Description ==
13
 
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 throuhgt 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.
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
117
 
118
  = 1.8 =
119
  * Fixed Login Failure issue