Protect Your Admin - Version 2.9

Version Description

  • Tested with new wordpress version 4.9.4
    • Fixed getimagesize() function issue for HTTPS urls
Download this release

Release Info

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

Code changes from version 2.8 to 2.9

Files changed (3) hide show
  1. protect-wp-admin.php +1 -1
  2. pwa-class.php +13 -6
  3. readme.txt +6 -3
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: 2.8
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: 2.9
9
  */
10
 
11
  /*** Protect WP-Admin Copyright 2017 (email : raghunath.0087@gmail.com)
pwa-class.php CHANGED
@@ -267,15 +267,22 @@ if(!function_exists('pwa_update_login_page_logo')):
267
  $getPwaOptions=get_pwa_setting_options();
268
  // get logo height and width
269
  $imagelogo = $getPwaOptions['pwa_logo_path'];
270
- if($imagelogo!=''){
271
- $logoimagesize = getimagesize($imagelogo);
272
- $logwigdth =$logoimagesize[0];
273
- $logheight = $logoimagesize[1];
274
- }
 
 
 
 
 
 
 
275
  echo '<style type="text/css"> /* Protect WP-Admin Style*/';
276
 
277
  if(isset($getPwaOptions['pwa_logo_path']) && $getPwaOptions['pwa_logo_path']!=''){
278
- echo ' h1 a { background-image:url('.$getPwaOptions['pwa_logo_path'].') !important; width:'.$logwigdth.'px !important; height:'.$logheight.'px !important;background-size: inherit !important;}';
279
  }
280
 
281
  if(isset($getPwaOptions['pwa_login_page_bg_color']) && $getPwaOptions['pwa_login_page_bg_color']!='')
267
  $getPwaOptions=get_pwa_setting_options();
268
  // get logo height and width
269
  $imagelogo = $getPwaOptions['pwa_logo_path'];
270
+ ob_start();
271
+ $data = getimagesize($imagelogo);
272
+ $resize_warning = ob_get_clean();
273
+ if(!empty($resize_warning)) {
274
+ $logwigdth = '100px !important;';
275
+ $logheight = '100px !important;';
276
+ $logbgsize = '100px !important';
277
+ } else {
278
+ $logwigdth =$data[0].'px !important;';
279
+ $logheight = $data[1].'px !important;';
280
+ $logbgsize ='inherit !important;';
281
+ }
282
  echo '<style type="text/css"> /* Protect WP-Admin Style*/';
283
 
284
  if(isset($getPwaOptions['pwa_logo_path']) && $getPwaOptions['pwa_logo_path']!=''){
285
+ echo ' h1 a { background-image:url('.$getPwaOptions['pwa_logo_path'].') !important; width:'.$logwigdth.'height:'.$logheight.'background-size:'.$logbgsize.'}';
286
  }
287
 
288
  if(isset($getPwaOptions['pwa_login_page_bg_color']) && $getPwaOptions['pwa_login_page_bg_color']!='')
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: 4.0
6
- Tested up to: 4.9.1
7
- Stable tag: 2.8
8
 
9
  Protect Your Website Admin Against Hackers & Modify Login Page Design
10
 
@@ -122,7 +122,10 @@ Don not forgot to update the "newadmin" slug with your new admin slug (that you
122
 
123
 
124
  == Changelog ==
125
-
 
 
 
126
  = 2.8 =
127
  * Tested with new wordpress version 4.8.1
128
  * Added upload image lighbox and color picker
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: 4.0
6
+ Tested up to: 4.9.4
7
+ Stable tag: 2.9
8
 
9
  Protect Your Website Admin Against Hackers & Modify Login Page Design
10
 
122
 
123
 
124
  == Changelog ==
125
+ = 2.9 =
126
+ * Tested with new wordpress version 4.9.4
127
+ * Fixed getimagesize() function issue for HTTPS urls
128
+
129
  = 2.8 =
130
  * Tested with new wordpress version 4.8.1
131
  * Added upload image lighbox and color picker