Protect Your Admin - Version 3.0.1

Version Description

  • Fixed admin access issues
Download this release

Release Info

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

Code changes from version 3.0 to 3.0.1

Files changed (4) hide show
  1. lib/pwa-deactivate.php +19 -0
  2. protect-wp-admin.php +1 -1
  3. pwa-class.php +3 -3
  4. readme.txt +3 -1
lib/pwa-deactivate.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Protect WP-Admin (C)
4
+ * Deactivate plugin using URL
5
+ * */
6
+ ?>
7
+ <?php
8
+ if ( ! defined( 'ABSPATH' ) && !isset($_GET['disable_pwa']) ) exit; // Exit if accessed directly
9
+ if(isset($_GET['disable_pwa']))
10
+ {
11
+ require_once('../../../../wp-load.php' );
12
+ $array = get_option('active_plugins');
13
+ $array_without_strawberries = array_diff($array, array('protect-wp-admin/protect-wp-admin.php'));
14
+ update_option( 'active_plugins', $array_without_strawberries );
15
+ echo "<strong>protect-wp-admin</strong> plugin has been disabled";
16
+ flush_rewrite_rules();
17
+ wp_die();
18
+ }
19
+ ?>
protect-wp-admin.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.mrwebsolution.in/
5
  Description: The "protect-wp-admin" is a very help full plugin to make wordpress admin more secure. Protect WP-Admin plugin is provide an options to change 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: 3.0
9
  */
10
 
11
  /*** Protect WP-Admin Copyright 2017 (email : raghunath.0087@gmail.com)
5
  Description: The "protect-wp-admin" is a very help full plugin to make wordpress admin more secure. Protect WP-Admin plugin is provide an options to change 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: 3.0.1
9
  */
10
 
11
  /*** Protect WP-Admin Copyright 2017 (email : raghunath.0087@gmail.com)
pwa-class.php CHANGED
@@ -296,14 +296,14 @@ endif;
296
  Hooks to overide option value before save it into database
297
  * ************************************************************/
298
  function pwa_update_field_rewrite_text( $new_value, $old_value ) {
299
- $new_value = str_replace('/','-',trim(stripslashes(strip_tags($old_value))));
300
  return $new_value;
301
  }
302
  add_filter( 'pre_update_option_pwa_rewrite_text', 'pwa_update_field_rewrite_text', 10, 2 );
303
  /*************************************************************
304
  Hooks to overide login page url
305
  *************************************************************/
306
- add_filter( 'login_url', 'pwa_hooks_login_page', 10, 2 );
307
  function pwa_hooks_login_page( $login_url, $redirect ) {
308
  $enable = get_option('pwa_active');
309
  $newurl = get_option('pwa_rewrite_text');
@@ -314,7 +314,7 @@ function pwa_hooks_login_page( $login_url, $redirect ) {
314
  return $login_url;
315
  }
316
 
317
- add_action( 'login_form', 'pwa_hooks_replace_login_submit_form',1);
318
  function pwa_hooks_replace_login_submit_form() {
319
  $enable = get_option('pwa_active');
320
  $newurl = get_option('pwa_rewrite_text');
296
  Hooks to overide option value before save it into database
297
  * ************************************************************/
298
  function pwa_update_field_rewrite_text( $new_value, $old_value ) {
299
+ $new_value = str_replace('/','-',trim(stripslashes(strip_tags($new_value))));
300
  return $new_value;
301
  }
302
  add_filter( 'pre_update_option_pwa_rewrite_text', 'pwa_update_field_rewrite_text', 10, 2 );
303
  /*************************************************************
304
  Hooks to overide login page url
305
  *************************************************************/
306
+ remove_filter( 'login_url', 'pwa_hooks_login_page', 10, 2 );
307
  function pwa_hooks_login_page( $login_url, $redirect ) {
308
  $enable = get_option('pwa_active');
309
  $newurl = get_option('pwa_rewrite_text');
314
  return $login_url;
315
  }
316
 
317
+ remove_action( 'login_form', 'pwa_hooks_replace_login_submit_form',1);
318
  function pwa_hooks_replace_login_submit_form() {
319
  $enable = get_option('pwa_active');
320
  $newurl = get_option('pwa_rewrite_text');
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: 4.0
6
  Tested up to: 4.9.7
7
- Stable tag: 3.0
8
 
9
  Protect Your Website Admin Against Hackers & Modify Login Page Design
10
 
@@ -122,6 +122,8 @@ Don not forgot to update the "newadmin" slug with your new admin slug (that you
122
 
123
 
124
  == Changelog ==
 
 
125
 
126
  = 3.0 =
127
  * Tested with new wordpress version 4.9.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: 4.0
6
  Tested up to: 4.9.7
7
+ Stable tag: 3.0.1
8
 
9
  Protect Your Website Admin Against Hackers & Modify Login Page Design
10
 
122
 
123
 
124
  == Changelog ==
125
+ = 3.0.1 =
126
+ * Fixed admin access issues
127
 
128
  = 3.0 =
129
  * Tested with new wordpress version 4.9.7