Protect Your Admin - Version 2.4

Version Description

  • Tested with new wordpress version 4.7
    • Fixed images logo image notice error issue.
Download this release

Release Info

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

Code changes from version 2.3 to 2.4

Files changed (3) hide show
  1. lib/pwa-deactivate.php +19 -0
  2. protect-wp-admin.php +18 -4
  3. readme.txt +9 -5
lib/pwa-deactivate.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Protect WP-Admin (C)
4
+ * @register_install_hook()
5
+ * @register_uninstall_hook()
6
+ * */
7
+ ?>
8
+ <?php
9
+ if ( ! defined( 'ABSPATH' ) && !isset($_GET['disable_pwa']) ) exit; // Exit if accessed directly
10
+
11
+ if(isset($_GET['disable_pwa']))
12
+ {
13
+ require_once('../../../../wp-load.php' );
14
+ print_r(get_option('active_plugins'));
15
+ deactivate_plugins(__FILE__, true );
16
+ }
17
+
18
+
19
+ ?>
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.3
9
  */
10
 
11
  /*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
@@ -82,7 +82,7 @@ function init_pwa_admin_option_page(){
82
  <?php
83
  $getPwaOptions=get_pwa_setting_options();
84
  if((isset($getPwaOptions['pwa_active']) && '1'==$getPwaOptions['pwa_active']) && (isset($getPwaOptions['pwa_rewrite_text']) && $getPwaOptions['pwa_rewrite_text']!='')){
85
- echo "<p><strong>Your New Admin URL : </strong><a href='".home_url($getPwaOptions['pwa_rewrite_text'])."' target='_blank'>".home_url($getPwaOptions['pwa_rewrite_text'])."</a></p><p><strong><blink><a href='".home_url($getPwaOptions['pwa_rewrite_text'].'?preview=1')."' target='_blank'>CLICK HERE</a></blink></strong> for preview new admin URL.</p>";
86
 
87
  }
88
  ?>
@@ -122,6 +122,8 @@ function init_pwa_admin_option_page(){
122
  <li><a href="https://wordpress.org/plugins/custom-share-buttons-with-floating-sidebar" target="_blank">Custom Share Buttons With Floating Sidebar</a></li>
123
  <li><a href="https://wordpress.org/plugins/protect-wp-admin/" target="_blank">Protect WP-Admin</a></li>
124
  <li><a href="https://wordpress.org/plugins/wp-categories-widget/" target="_blank">WP Categories Widget</a></li>
 
 
125
  <li><a href="https://wordpress.org/plugins/wp-posts-widget/" target="_blank">WP Post Widget</a></li>
126
  <li><a href="https://wordpress.org/plugins/wp-importer" target="_blank">WP Importer</a></li>
127
  <li><a href="https://wordpress.org/plugins/wp-csv-importer/" target="_blank">WP CSV Importer</a></li>
@@ -199,11 +201,11 @@ echo $script='<script type="text/javascript">
199
  var $el = jQuery("#pwa_active");
200
  var $vlue = jQuery("#pwa_rewrite_text").val();
201
  var pwaActive ="'.$pwaActive.'";
202
- if((!$el[0].checked) && $vlue=="")
203
  {
204
  alert("Please enable plugin");
205
  return false;
206
- }
207
 
208
  if(($el[0].checked) && $vlue=="")
209
  {
@@ -319,4 +321,16 @@ function init_activation_pwa_plugins(){
319
  flush_rewrite_rules();
320
  }
321
  endif;
 
 
 
 
 
 
 
 
 
 
 
 
322
  ?>
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.4
9
  */
10
 
11
  /*** Protect WP-Admin Copyright 2014 Raghunath (email : raghunath.0087@gmail.com)
82
  <?php
83
  $getPwaOptions=get_pwa_setting_options();
84
  if((isset($getPwaOptions['pwa_active']) && '1'==$getPwaOptions['pwa_active']) && (isset($getPwaOptions['pwa_rewrite_text']) && $getPwaOptions['pwa_rewrite_text']!='')){
85
+ echo "<p><strong>Your New Admin URL : </strong>".home_url($getPwaOptions['pwa_rewrite_text'])." | <strong><blink><a href='".home_url($getPwaOptions['pwa_rewrite_text'].'?preview=1')."' target='_blank'>CLICK HERE</a></blink></strong> for preview new admin URL.</p>";
86
 
87
  }
88
  ?>
122
  <li><a href="https://wordpress.org/plugins/custom-share-buttons-with-floating-sidebar" target="_blank">Custom Share Buttons With Floating Sidebar</a></li>
123
  <li><a href="https://wordpress.org/plugins/protect-wp-admin/" target="_blank">Protect WP-Admin</a></li>
124
  <li><a href="https://wordpress.org/plugins/wp-categories-widget/" target="_blank">WP Categories Widget</a></li>
125
+ <li><a href="https://wordpress.org/plugins/wp-protect-content/" target="_blank">WP Protect Content</a></li>
126
+ <li><a href="https://wordpress.org/plugins/wp-version-remover/" target="_blank">WP Version Remover</a></li>
127
  <li><a href="https://wordpress.org/plugins/wp-posts-widget/" target="_blank">WP Post Widget</a></li>
128
  <li><a href="https://wordpress.org/plugins/wp-importer" target="_blank">WP Importer</a></li>
129
  <li><a href="https://wordpress.org/plugins/wp-csv-importer/" target="_blank">WP CSV Importer</a></li>
201
  var $el = jQuery("#pwa_active");
202
  var $vlue = jQuery("#pwa_rewrite_text").val();
203
  var pwaActive ="'.$pwaActive.'";
204
+ /*if((!$el[0].checked) && $vlue=="")
205
  {
206
  alert("Please enable plugin");
207
  return false;
208
+ }*/
209
 
210
  if(($el[0].checked) && $vlue=="")
211
  {
321
  flush_rewrite_rules();
322
  }
323
  endif;
324
+
325
+ add_action('admin_init','pwa_flush_rewrite_rules');
326
+ //flush_rewrite_rules after update value
327
+ if(!function_exists('pwa_flush_rewrite_rules')):
328
+ function pwa_flush_rewrite_rules(){
329
+ if(isset($_POST['option_page']) && $_POST['option_page']=='pwa_setting_options' && $_POST['pwa_active']==''){
330
+ flush_rewrite_rules();flush_rewrite_rules();
331
+ }
332
+
333
+ }
334
+ endif;
335
+
336
  ?>
readme.txt CHANGED
@@ -3,11 +3,10 @@ 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.8
6
- Tested up to: 4.6.1
7
- Stable tag: 2.3
8
 
9
- 1.) Protect Your Website Admin Against Hackers
10
- 2.) Modify Login Page Design
11
 
12
  == Description ==
13
 
@@ -116,7 +115,12 @@ Don not forgot to update the "newadmin" slug with your new admin slug (that you
116
 
117
 
118
 
119
- == Changelog ==
 
 
 
 
 
120
  = 2.3 =
121
  * Tested with new wordpress version 4.6.1
122
  * Fixed images size logo 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.8
6
+ Tested up to: 4.7
7
+ Stable tag: 2.4
8
 
9
+ Protect Your Website Admin Against Hackers & Modify Login Page Design
 
10
 
11
  == Description ==
12
 
115
 
116
 
117
 
118
+ == Changelog ==
119
+
120
+ = 2.4 =
121
+ * Tested with new wordpress version 4.7
122
+ * Fixed images logo image notice error issue.
123
+
124
  = 2.3 =
125
  * Tested with new wordpress version 4.6.1
126
  * Fixed images size logo issue