WPS Hide Login - Version 1.2.7

Version Description

  • Enhancement for Woocommerce email notification
Download this release

Release Info

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

Code changes from version 1.2.6.1 to 1.2.7

Files changed (3) hide show
  1. classes/plugin.php +21 -4
  2. readme.txt +4 -1
  3. wps-hide-login.php +2 -2
classes/plugin.php CHANGED
@@ -76,8 +76,10 @@ if ( ! class_exists( 'WPS_Hide_Login' ) ) {
76
  remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
77
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
78
 
79
- add_action('admin_menu', array( $this, 'wps_hide_login_menu_page' ) );
80
  add_action( 'admin_init', array( $this, 'whl_template_redirect' ) );
 
 
81
  }
82
 
83
  private function use_trailing_slashes() {
@@ -284,8 +286,8 @@ if ( ! class_exists( 'WPS_Hide_Login' ) ) {
284
  $out .= '<div id="whl_settings">';
285
  $out .= sprintf( __( 'Need help? Try the <a href="%1$s" target="_blank">support forum</a>. This plugin is kindly brought to you by <a href="%2$s" target="_blank">WPServeur</a>', 'wpserveur-hide-login' ), 'http://wordpress.org/support/plugin/wps-hide-login/', 'https://www.wpserveur.net/?refwps=14&campaign=wpshidelogin' ) . ' (' . __( 'WordPress specialized hosting', 'wpserveur-hide-login' ) . ')';
286
  $out .= '<br>' . __( 'Discover our other plugins:', 'wpserveur-hide-login' ) . ' ';
287
- $out .= __('the plugin', 'wpserveur-hide-login' ) . ' <a href="' . $details_url_wpsbidouille .'" class="thickbox open-plugin-details-modal">' . __( 'WPS Bidouille', 'wpserveur-hide-login' ) . '</a>';
288
- $out .= ' ' . __( 'and', 'wpserveur-hide-login' ) . ' <a href="' . $details_url_wpslimitlogin .'" class="thickbox open-plugin-details-modal">' . __( 'WPS Limit Login', 'wpserveur-hide-login' ) . '</a>';
289
  $out .= '</div>';
290
 
291
  }
@@ -539,7 +541,7 @@ if ( ! class_exists( 'WPS_Hide_Login' ) ) {
539
  public function wps_hide_login_menu_page() {
540
  $title = __( 'WPS Hide Login' );
541
 
542
- add_options_page($title, $title, 'manage_options', 'whl_settings', array(
543
  $this,
544
  'settings_page'
545
  ) );
@@ -556,5 +558,20 @@ if ( ! class_exists( 'WPS_Hide_Login' ) ) {
556
  }
557
  }
558
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  }
560
  }
76
  remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
77
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
78
 
79
+ add_action( 'admin_menu', array( $this, 'wps_hide_login_menu_page' ) );
80
  add_action( 'admin_init', array( $this, 'whl_template_redirect' ) );
81
+
82
+ add_action( 'template_redirect', array( $this, 'wps_hide_login_redirect_page_email_notif_woocommerce' ) );
83
  }
84
 
85
  private function use_trailing_slashes() {
286
  $out .= '<div id="whl_settings">';
287
  $out .= sprintf( __( 'Need help? Try the <a href="%1$s" target="_blank">support forum</a>. This plugin is kindly brought to you by <a href="%2$s" target="_blank">WPServeur</a>', 'wpserveur-hide-login' ), 'http://wordpress.org/support/plugin/wps-hide-login/', 'https://www.wpserveur.net/?refwps=14&campaign=wpshidelogin' ) . ' (' . __( 'WordPress specialized hosting', 'wpserveur-hide-login' ) . ')';
288
  $out .= '<br>' . __( 'Discover our other plugins:', 'wpserveur-hide-login' ) . ' ';
289
+ $out .= __( 'the plugin', 'wpserveur-hide-login' ) . ' <a href="' . $details_url_wpsbidouille . '" class="thickbox open-plugin-details-modal">' . __( 'WPS Bidouille', 'wpserveur-hide-login' ) . '</a>';
290
+ $out .= ' ' . __( 'and', 'wpserveur-hide-login' ) . ' <a href="' . $details_url_wpslimitlogin . '" class="thickbox open-plugin-details-modal">' . __( 'WPS Limit Login', 'wpserveur-hide-login' ) . '</a>';
291
  $out .= '</div>';
292
 
293
  }
541
  public function wps_hide_login_menu_page() {
542
  $title = __( 'WPS Hide Login' );
543
 
544
+ add_options_page( $title, $title, 'manage_options', 'whl_settings', array(
545
  $this,
546
  'settings_page'
547
  ) );
558
  }
559
  }
560
 
561
+ /**
562
+ * Update redirect for Woocommerce email notification
563
+ */
564
+ public function wps_hide_login_redirect_page_email_notif_woocommerce() {
565
+
566
+ if ( ! class_exists( 'WC_Form_Handler' ) ) {
567
+ return false;
568
+ }
569
+
570
+ if ( ! empty( $_GET ) && isset( $_GET['action'] ) && 'rp' === $_GET['action'] && isset( $_GET['key'] ) && isset( $_GET['login'] ) ) {
571
+ wp_redirect( $this->new_login_url() );
572
+ exit();
573
+ }
574
+ }
575
+
576
  }
577
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: tabrisrp, WPServeur, nicolaskulka
4
  Tags: rename, login, wp-login, wp-login.php, custom login url
5
  Requires at least: 4.1
6
  Tested up to: 4.9
7
- Stable tag: 1.2.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -140,6 +140,9 @@ First step is to check your .htaccess file and compare it to a regular one, to s
140
 
141
  == Changelog ==
142
 
 
 
 
143
  = 1.2.6.1 =
144
  * Revert redirect after login
145
 
4
  Tags: rename, login, wp-login, wp-login.php, custom login url
5
  Requires at least: 4.1
6
  Tested up to: 4.9
7
+ Stable tag: 1.2.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
140
 
141
  == Changelog ==
142
 
143
+ = 1.2.7 =
144
+ * Enhancement for Woocommerce email notification
145
+
146
  = 1.2.6.1 =
147
  * Revert redirect after login
148
 
wps-hide-login.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WPS Hide Login
4
  Description: Protect your website by changing the login URL and preventing access to wp-login.php page and wp-admin directory while not logged-in
5
  Author: WPServeur, NicolasKulka, tabrisrp
6
  Author URI: https://wpserveur.net
7
- Version: 1.2.6.1
8
  Requires at least: 4.1
9
  Tested up to: 4.9
10
  License: GPLv2 or later
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  }
18
 
19
  // Plugin constants
20
- define( 'WPS_HIDE_LOGIN_VERSION', '1.2.6.1' );
21
  define( 'WPS_HIDE_LOGIN_FOLDER', 'wps-hide-login' );
22
 
23
  define( 'WPS_HIDE_LOGIN_URL', plugin_dir_url( __FILE__ ) );
4
  Description: Protect your website by changing the login URL and preventing access to wp-login.php page and wp-admin directory while not logged-in
5
  Author: WPServeur, NicolasKulka, tabrisrp
6
  Author URI: https://wpserveur.net
7
+ Version: 1.2.7
8
  Requires at least: 4.1
9
  Tested up to: 4.9
10
  License: GPLv2 or later
17
  }
18
 
19
  // Plugin constants
20
+ define( 'WPS_HIDE_LOGIN_VERSION', '1.2.7' );
21
  define( 'WPS_HIDE_LOGIN_FOLDER', 'wps-hide-login' );
22
 
23
  define( 'WPS_HIDE_LOGIN_URL', plugin_dir_url( __FILE__ ) );