WPS Hide Login - Version 1.1.1

Version Description

  • Check for Rename wp-login.php activation before activating WPS Hide Login to prevent conflict
Download this release

Release Info

Developer tabrisrp
Plugin Icon 128x128 WPS Hide Login
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1 to 1.1.1

languages/wps-hide-login-fr_FR.mo CHANGED
Binary file
languages/wps-hide-login-fr_FR.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WPS Hide Login 1.0\n"
4
- "POT-Creation-Date: 2015-04-26 15:05+0100\n"
5
- "PO-Revision-Date: 2015-04-26 15:05+0100\n"
6
  "Last-Translator: Rémy Perona <remperona@gmail.com>\n"
7
  "Language-Team: Rémy Perona <remperona@gmail.com>\n"
8
  "Language: fr\n"
@@ -17,16 +17,24 @@ msgstr ""
17
  "X-Poedit-SearchPath-0: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-"
18
  "login\n"
19
 
20
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:167
21
  msgid "Please upgrade to the latest version of WordPress to activate"
22
  msgstr "Veuillez mettre à jour WordPress dans sa dernière version pour activer"
23
 
24
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:167
25
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:183
26
  msgid "WPS Hide Login"
27
  msgstr "WPS Hide Login"
28
 
29
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:184
 
 
 
 
 
 
 
 
30
  msgid ""
31
  "This option allows you to set a networkwide default, which can be overridden by "
32
  "individual sites. Simply go to to the site’s permalink settings to change the url."
@@ -35,29 +43,29 @@ msgstr ""
35
  "ensuite être remplacé pour chaque site individuellement. Allez simplement dans les "
36
  "réglages des permaliens du site pour changer l'url."
37
 
38
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:185
39
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:261
40
  #, php-format
41
  msgid "Need help? Try the <a href=\"%s\" target=\"_blank\">support forum</a>."
42
  msgstr ""
43
  "Besoin d'aide ? Essayez le <a href=\"%s\" target=\"_blank\">forum d'assistance</a>."
44
 
45
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:188
46
  msgid "Networkwide default"
47
  msgstr "Réglage par défaut du réseau"
48
 
49
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:222
50
  msgid "Login url"
51
  msgstr "URL de connexion"
52
 
53
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:269
54
  #, php-format
55
  msgid "To set a networkwide default, go to <a href=\"%s\">Network Settings</a>."
56
  msgstr ""
57
  "Pour définir un réglage par défaut pour le réseau, allez aux <a href=\"%s"
58
  "\">réglages du réseaux</a>."
59
 
60
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:301
61
  #, php-format
62
  msgid ""
63
  "Your login page is now here: <strong><a href=\"%1$s\">%2$s</a></strong>. Bookmark "
@@ -66,12 +74,12 @@ msgstr ""
66
  "Votre page de connexion est maintenant ici : <strong><a href=\"%1$s\">%2$s</a></"
67
  "strong>. Mettez-la en favori !"
68
 
69
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:312
70
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:316
71
  msgid "Settings"
72
  msgstr "Réglages"
73
 
74
- #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:332
75
  msgid "This feature is not enabled."
76
  msgstr "Cette fonctionnalité n'est pas activée."
77
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WPS Hide Login 1.0\n"
4
+ "POT-Creation-Date: 2015-04-27 10:27+0100\n"
5
+ "PO-Revision-Date: 2015-04-27 10:28+0100\n"
6
  "Last-Translator: Rémy Perona <remperona@gmail.com>\n"
7
  "Language-Team: Rémy Perona <remperona@gmail.com>\n"
8
  "Language: fr\n"
17
  "X-Poedit-SearchPath-0: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-"
18
  "login\n"
19
 
20
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:186
21
  msgid "Please upgrade to the latest version of WordPress to activate"
22
  msgstr "Veuillez mettre à jour WordPress dans sa dernière version pour activer"
23
 
24
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:186
25
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:208
26
  msgid "WPS Hide Login"
27
  msgstr "WPS Hide Login"
28
 
29
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:192
30
+ msgid ""
31
+ "WPS Hide Login could not be activated because you already have Rename wp-login.php "
32
+ "active. Please uninstall rename wp-login.php to use WPS Hide Login"
33
+ msgstr ""
34
+ "WPS Hide Login n'a pas pu être activé car vous avez déjà Rename wp-login.php actif. "
35
+ "Veuillez désinstaller Rename wp-login.php pour utiliser WPS Hide Login"
36
+
37
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:209
38
  msgid ""
39
  "This option allows you to set a networkwide default, which can be overridden by "
40
  "individual sites. Simply go to to the site’s permalink settings to change the url."
43
  "ensuite être remplacé pour chaque site individuellement. Allez simplement dans les "
44
  "réglages des permaliens du site pour changer l'url."
45
 
46
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:210
47
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:286
48
  #, php-format
49
  msgid "Need help? Try the <a href=\"%s\" target=\"_blank\">support forum</a>."
50
  msgstr ""
51
  "Besoin d'aide ? Essayez le <a href=\"%s\" target=\"_blank\">forum d'assistance</a>."
52
 
53
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:213
54
  msgid "Networkwide default"
55
  msgstr "Réglage par défaut du réseau"
56
 
57
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:247
58
  msgid "Login url"
59
  msgstr "URL de connexion"
60
 
61
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:294
62
  #, php-format
63
  msgid "To set a networkwide default, go to <a href=\"%s\">Network Settings</a>."
64
  msgstr ""
65
  "Pour définir un réglage par défaut pour le réseau, allez aux <a href=\"%s"
66
  "\">réglages du réseaux</a>."
67
 
68
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:326
69
  #, php-format
70
  msgid ""
71
  "Your login page is now here: <strong><a href=\"%1$s\">%2$s</a></strong>. Bookmark "
74
  "Votre page de connexion est maintenant ici : <strong><a href=\"%1$s\">%2$s</a></"
75
  "strong>. Mettez-la en favori !"
76
 
77
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:337
78
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:341
79
  msgid "Settings"
80
  msgstr "Réglages"
81
 
82
+ #: /Users/Yui/Sites/wordpress/wp-content/plugins/wps-hide-login/wps-hide-login.php:357
83
  msgid "This feature is not enabled."
84
  msgstr "Cette fonctionnalité n'est pas activée."
85
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: tabrisrp, WPServeur
4
  Tags: rename, login, wp-login, wp-login.php, custom login url
5
  Requires at least: 4.1
6
  Tested up to: 4.2
7
- Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -69,6 +69,9 @@ On a multisite install the `whl_page` option will be in the sitemeta table, if t
69
 
70
  == Changelog ==
71
 
 
 
 
72
  = 1.1 =
73
  * Fix : CSRF security issue when saving option value in single site and multisite mode. Thanks to @Secupress
74
  * Improvement : changed option location from permalinks to general, because register_setting doesn't work on permalinks page.
4
  Tags: rename, login, wp-login, wp-login.php, custom login url
5
  Requires at least: 4.1
6
  Tested up to: 4.2
7
+ Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
69
 
70
  == Changelog ==
71
 
72
+ = 1.1.1 =
73
+ * Check for Rename wp-login.php activation before activating WPS Hide Login to prevent conflict
74
+
75
  = 1.1 =
76
  * Fix : CSRF security issue when saving option value in single site and multisite mode. Thanks to @Secupress
77
  * Improvement : changed option location from permalinks to general, because register_setting doesn't work on permalinks page.
wps-hide-login.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://github.com/Tabrisrp/wps-hide-login
5
  Description: Change your login url and remove access to wp-login.php page | Change votre url de connexion et supprime l'accès à la page wp-login.php (sécurité augmentée)
6
  Author: WPServeur
7
  Author URI: http://profiles.wordpress.org/tabrisrp/
8
- Version: 1.1
9
  Text Domain: wps-hide-login
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -106,6 +106,7 @@ if ( defined( 'ABSPATH' )
106
  }
107
 
108
  public function __construct() {
 
109
 
110
  global $wp_version;
111
 
@@ -115,12 +116,32 @@ if ( defined( 'ABSPATH' )
115
  return;
116
  }
117
 
118
- register_activation_hook( $this->basename(), array( $this, 'activate' ) );
119
 
120
- if ( is_multisite() && ! function_exists( 'is_plugin_active_for_network' ) ) {
121
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
 
122
  }
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  if ( is_multisite() && is_plugin_active_for_network( $this->basename() ) ) {
125
  add_action( 'wpmu_options', array( $this, 'wpmu_options' ) );
126
  add_action( 'update_wpmu_options', array( $this, 'update_wpmu_options' ) );
@@ -130,7 +151,6 @@ if ( defined( 'ABSPATH' )
130
 
131
  add_action( 'admin_init', array( $this, 'admin_init' ) );
132
  add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ), 1 );
133
- add_action( 'plugins_loaded', array( $this, 'whl_load_textdomain' ), 9 );
134
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
135
  add_action( 'network_admin_notices', array( $this, 'admin_notices' ) );
136
  add_action( 'wp_loaded', array( $this, 'wp_loaded' ) );
@@ -164,12 +184,18 @@ if ( defined( 'ABSPATH' )
164
 
165
  public function admin_notices_incompatible() {
166
 
167
- echo '<div class="error"><p>' . __( 'Please upgrade to the latest version of WordPress to activate', 'wps-hide-login') . ' <strong>' . __( 'WPS Hide Login', 'wps-hide-login') . '</strong>.</p></div>';
168
 
169
  }
170
 
171
- public function activate() {
172
 
 
 
 
 
 
 
173
  add_option( 'whl_redirect', '1' );
174
 
175
  delete_option( 'whl_admin' );
5
  Description: Change your login url and remove access to wp-login.php page | Change votre url de connexion et supprime l'accès à la page wp-login.php (sécurité augmentée)
6
  Author: WPServeur
7
  Author URI: http://profiles.wordpress.org/tabrisrp/
8
+ Version: 1.1.1
9
  Text Domain: wps-hide-login
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
106
  }
107
 
108
  public function __construct() {
109
+ add_action( 'plugins_loaded', array( $this, 'whl_load_textdomain' ), 9 );
110
 
111
  global $wp_version;
112
 
116
  return;
117
  }
118
 
 
119
 
120
+ if ( is_multisite() && ! function_exists( 'is_plugin_active_for_network' ) || !function_exists( 'is_plugin_active' ) ) {
121
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
122
+
123
  }
124
 
125
+ if ( is_plugin_active_for_network( 'rename-wp-login/rename-wp-login.php' ) ) {
126
+ deactivate_plugins( plugin_basename( __FILE__ ) );
127
+ add_action( 'network_admin_notices', array( $this, 'admin_notices_plugin_conflict' ) );
128
+ if ( isset( $_GET['activate'] ) ) {
129
+ unset( $_GET['activate'] );
130
+ }
131
+ return;
132
+ }
133
+
134
+ if ( is_plugin_active( 'rename-wp-login/rename-wp-login.php' ) ) {
135
+ deactivate_plugins( plugin_basename( __FILE__ ) );
136
+ add_action( 'admin_notices', array( $this, 'admin_notices_plugin_conflict' ) );
137
+ if ( isset( $_GET['activate'] ) ) {
138
+ unset( $_GET['activate'] );
139
+ }
140
+ return;
141
+ }
142
+
143
+ register_activation_hook( $this->basename(), array( $this, 'activate' ) );
144
+
145
  if ( is_multisite() && is_plugin_active_for_network( $this->basename() ) ) {
146
  add_action( 'wpmu_options', array( $this, 'wpmu_options' ) );
147
  add_action( 'update_wpmu_options', array( $this, 'update_wpmu_options' ) );
151
 
152
  add_action( 'admin_init', array( $this, 'admin_init' ) );
153
  add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ), 1 );
 
154
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
155
  add_action( 'network_admin_notices', array( $this, 'admin_notices' ) );
156
  add_action( 'wp_loaded', array( $this, 'wp_loaded' ) );
184
 
185
  public function admin_notices_incompatible() {
186
 
187
+ echo '<div class="error notice is-dismissible"><p>' . __( 'Please upgrade to the latest version of WordPress to activate', 'wps-hide-login') . ' <strong>' . __( 'WPS Hide Login', 'wps-hide-login') . '</strong>.</p></div>';
188
 
189
  }
190
 
191
+ public function admin_notices_plugin_conflict() {
192
 
193
+ echo '<div class="error notice is-dismissible"><p>' . __( 'WPS Hide Login could not be activated because you already have Rename wp-login.php active. Please uninstall rename wp-login.php to use WPS Hide Login', 'wps-hide-login') . '</p></div>';
194
+
195
+ }
196
+
197
+ public function activate() {
198
+
199
  add_option( 'whl_redirect', '1' );
200
 
201
  delete_option( 'whl_admin' );