WPS Hide Login - Version 1.5.2

Version Description

  • Fix : Action URL wp_send_user_request()
Download this release

Release Info

Developer NicolasKulka
Plugin Icon 128x128 WPS Hide Login
Version 1.5.2
Comparing to
See all releases

Code changes from version 1.5.1 to 1.5.2

Files changed (3) hide show
  1. classes/plugin.php +15 -3
  2. readme.txt +4 -1
  3. wps-hide-login.php +2 -2
classes/plugin.php CHANGED
@@ -76,6 +76,14 @@ class Plugin {
76
 
77
  add_action( 'template_redirect', array( $this, 'wps_hide_login_redirect_page_email_notif_woocommerce' ) );
78
  add_filter( 'login_url', array( $this, 'login_url' ), 10, 3 );
 
 
 
 
 
 
 
 
79
  }
80
 
81
  private function use_trailing_slashes() {
@@ -416,9 +424,13 @@ class Plugin {
416
 
417
  $request = parse_url( $_SERVER['REQUEST_URI'] );
418
 
419
- if ( ( strpos( rawurldecode( $_SERVER['REQUEST_URI'] ), 'wp-login.php' ) !== false
420
- || untrailingslashit( $request['path'] ) === site_url( 'wp-login', 'relative' ) )
421
- && ! is_admin() ) {
 
 
 
 
422
 
423
  $this->wp_login_php = true;
424
 
76
 
77
  add_action( 'template_redirect', array( $this, 'wps_hide_login_redirect_page_email_notif_woocommerce' ) );
78
  add_filter( 'login_url', array( $this, 'login_url' ), 10, 3 );
79
+
80
+ add_filter( 'user_request_action_email_content', array( $this, 'user_request_action_email_content' ), 999, 2 );
81
+ }
82
+
83
+ public function user_request_action_email_content( $email_text, $email_data ) {
84
+ $email_text = str_replace( '###CONFIRM_URL###', esc_url_raw( str_replace( $this->new_login_slug() . '/', 'wp-login.php', $email_data['confirm_url'] ) ), $email_text );
85
+
86
+ return $email_text;
87
  }
88
 
89
  private function use_trailing_slashes() {
424
 
425
  $request = parse_url( $_SERVER['REQUEST_URI'] );
426
 
427
+ if ( strpos( $request['query'], 'action=confirmaction' ) !== false ) {
428
+ @require_once ABSPATH . 'wp-login.php';
429
+
430
+ $pagenow = 'index.php';
431
+ } elseif ( ( strpos( rawurldecode( $_SERVER['REQUEST_URI'] ), 'wp-login.php' ) !== false
432
+ || untrailingslashit( $request['path'] ) === site_url( 'wp-login', 'relative' ) )
433
+ && ! is_admin() ) {
434
 
435
  $this->wp_login_php = true;
436
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: rename, login, wp-login, wp-login.php, custom login url, jetpack
6
  Requires at least: 4.1
7
  Tested up to: 5.0
8
  Requires PHP: 7.0
9
- Stable tag: 1.5.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -146,6 +146,9 @@ First step is to check your .htaccess file and compare it to a regular one, to s
146
 
147
  == Changelog ==
148
 
 
 
 
149
  = 1.5.1 =
150
  * Fix : Action URL get_the_password_form()
151
 
6
  Requires at least: 4.1
7
  Tested up to: 5.0
8
  Requires PHP: 7.0
9
+ Stable tag: 1.5.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
146
 
147
  == Changelog ==
148
 
149
+ = 1.5.2 =
150
+ * Fix : Action URL wp_send_user_request()
151
+
152
  = 1.5.1 =
153
  * Fix : Action URL get_the_password_form()
154
 
wps-hide-login.php CHANGED
@@ -5,7 +5,7 @@ Description: Protect your website by changing the login URL and preventing acces
5
  Donate link: https://www.paypal.me/donateWPServeur
6
  Author: WPServeur, NicolasKulka, tabrisrp
7
  Author URI: https://wpserveur.net
8
- Version: 1.5.1
9
  Requires at least: 4.1
10
  Tested up to: 5.0
11
  Requires PHP: 7.0
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
21
  }
22
 
23
  // Plugin constants
24
- define( 'WPS_HIDE_LOGIN_VERSION', '1.5.1' );
25
  define( 'WPS_HIDE_LOGIN_FOLDER', 'wps-hide-login' );
26
 
27
  define( 'WPS_HIDE_LOGIN_URL', plugin_dir_url( __FILE__ ) );
5
  Donate link: https://www.paypal.me/donateWPServeur
6
  Author: WPServeur, NicolasKulka, tabrisrp
7
  Author URI: https://wpserveur.net
8
+ Version: 1.5.2
9
  Requires at least: 4.1
10
  Tested up to: 5.0
11
  Requires PHP: 7.0
21
  }
22
 
23
  // Plugin constants
24
+ define( 'WPS_HIDE_LOGIN_VERSION', '1.5.2' );
25
  define( 'WPS_HIDE_LOGIN_FOLDER', 'wps-hide-login' );
26
 
27
  define( 'WPS_HIDE_LOGIN_URL', plugin_dir_url( __FILE__ ) );