Version Description
- Add missing
load_plugin_textdomain
.
Download this release
Release Info
Developer | iseulde |
Plugin | Rename wp-login.php |
Version | 2.5.5 |
Comparing to | |
See all releases |
Code changes from version 2.5.3 to 2.5.5
- readme.txt +17 -15
- rename-wp-login.php +20 -18
readme.txt
CHANGED
@@ -1,27 +1,23 @@
|
|
1 |
-
=== Rename wp-login.php
|
2 |
|
3 |
-
Contributors: iseulde
|
4 |
Tags: rename, login, wp-login, wp-login.php, custom login url
|
5 |
Requires at least: 4.4
|
6 |
-
Tested up to: 4.4
|
7 |
-
Stable tag: 2.5.
|
8 |
License: GPL-2.0+
|
9 |
|
10 |
Change wp-login.php to anything you want.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
I don't actively work on this plugin anymore, so use at your own risk.
|
17 |
-
|
18 |
-
***
|
19 |
|
20 |
*Rename wp-login.php* is a very light plugin that lets you easily and safely change wp-login.php to anything you want. It doesn’t literally rename or change files in core, nor does it add rewrite rules. It simply intercepts page requests and works on any WordPress website. The wp-admin directory and wp-login.php page become inaccessible, so you should bookmark or remember the url. Deactivating this plugin brings your site back exactly to the state it was before.
|
21 |
|
22 |
= Compatibility =
|
23 |
|
24 |
-
|
25 |
|
26 |
It’s also compatible with any plugin that hooks in the login form, including
|
27 |
|
@@ -34,11 +30,9 @@ Obviously it doesn’t work with plugins that *hardcoded* wp-login.php.
|
|
34 |
|
35 |
Works with multisite, but not tested with subdomains. Activating it for a network allows you to set a networkwide default. Individual sites can still rename their login page to something else.
|
36 |
|
37 |
-
If you’re using a **page caching plugin** you should add the slug of the new login url to the list of pages not to cache.
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
https://github.com/avryl/rename-wp-login
|
42 |
|
43 |
== Installation ==
|
44 |
|
@@ -58,6 +52,14 @@ On a multisite install the `rwl_page` option will be in the sitemeta table, if t
|
|
58 |
|
59 |
== Changelog ==
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
= 2.5 =
|
62 |
|
63 |
* Use wp-login.php instead of copying the file.
|
@@ -125,7 +127,7 @@ On a multisite install the `rwl_page` option will be in the sitemeta table, if t
|
|
125 |
= 1.6 =
|
126 |
|
127 |
* Fixed the login link when `site_url()` ≠ `home_url()`.
|
128 |
-
* Added a [mirror](https://github.com/
|
129 |
|
130 |
= 1.5 =
|
131 |
|
1 |
+
=== Rename wp-login.php ===
|
2 |
|
3 |
+
Contributors: iseulde, IvanRF
|
4 |
Tags: rename, login, wp-login, wp-login.php, custom login url
|
5 |
Requires at least: 4.4
|
6 |
+
Tested up to: 4.4.1
|
7 |
+
Stable tag: 2.5.5
|
8 |
License: GPL-2.0+
|
9 |
|
10 |
Change wp-login.php to anything you want.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
**I don't offer support through the support forum. Use [GitHub](https://github.com/iseulde/rename-wp-login) instead.**
|
|
|
|
|
|
|
|
|
15 |
|
16 |
*Rename wp-login.php* is a very light plugin that lets you easily and safely change wp-login.php to anything you want. It doesn’t literally rename or change files in core, nor does it add rewrite rules. It simply intercepts page requests and works on any WordPress website. The wp-admin directory and wp-login.php page become inaccessible, so you should bookmark or remember the url. Deactivating this plugin brings your site back exactly to the state it was before.
|
17 |
|
18 |
= Compatibility =
|
19 |
|
20 |
+
All login related things such as the registration form, lost password form, login widget and expired sessions just keep working.
|
21 |
|
22 |
It’s also compatible with any plugin that hooks in the login form, including
|
23 |
|
30 |
|
31 |
Works with multisite, but not tested with subdomains. Activating it for a network allows you to set a networkwide default. Individual sites can still rename their login page to something else.
|
32 |
|
33 |
+
If you’re using a **page caching plugin** you should add the slug of the new login url to the list of pages not to cache.
|
34 |
|
35 |
+
If you wish, you can block wp-login.php with `.htaccess` from now on.
|
|
|
|
|
36 |
|
37 |
== Installation ==
|
38 |
|
52 |
|
53 |
== Changelog ==
|
54 |
|
55 |
+
= 2.5.5 =
|
56 |
+
|
57 |
+
* Add missing `load_plugin_textdomain`.
|
58 |
+
|
59 |
+
= 2.5.4 =
|
60 |
+
|
61 |
+
* Added i18n support.
|
62 |
+
|
63 |
= 2.5 =
|
64 |
|
65 |
* Use wp-login.php instead of copying the file.
|
127 |
= 1.6 =
|
128 |
|
129 |
* Fixed the login link when `site_url()` ≠ `home_url()`.
|
130 |
+
* Added a [mirror](https://github.com/iseulde/rename-wp-login) on GitHub.
|
131 |
|
132 |
= 1.5 =
|
133 |
|
rename-wp-login.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
|
3 |
/*
|
4 |
-
* Plugin Name: Rename wp-login.php
|
5 |
-
* Plugin URI:
|
6 |
* Description: Change wp-login.php to whatever you want.
|
7 |
-
* Version: 2.5.
|
8 |
-
* Author:
|
9 |
-
* Author URI:
|
10 |
-
* Text Domain:
|
11 |
* Domain Path:
|
12 |
* Network:
|
13 |
* License: GPL-2.0+
|
@@ -118,7 +118,7 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Rename_WP_Login' ) ) {
|
|
118 |
}
|
119 |
|
120 |
public function admin_notices_incompatible() {
|
121 |
-
echo '<div class="error"><p>Please upgrade to the latest version of WordPress to activate <strong>Rename wp-login.php</strong
|
122 |
}
|
123 |
|
124 |
public function activate() {
|
@@ -150,11 +150,11 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Rename_WP_Login' ) ) {
|
|
150 |
public function wpmu_options() {
|
151 |
$out = '';
|
152 |
|
153 |
-
$out .= '<h3>Rename wp-login.php</h3>';
|
154 |
-
$out .= '<p>This option allows you to set a networkwide default, which can be overridden by individual sites. Simply go to to the site’s permalink settings to change the url
|
155 |
$out .= '<table class="form-table">';
|
156 |
$out .= '<tr valign="top">';
|
157 |
-
$out .= '<th scope="row">Networkwide default</th>';
|
158 |
$out .= '<td><input id="rwl-page-input" type="text" name="rwl_page" value="' . get_site_option( 'rwl_page', 'login' ) . '"></td>';
|
159 |
$out .= '</tr>';
|
160 |
$out .= '</table>';
|
@@ -177,14 +177,14 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Rename_WP_Login' ) ) {
|
|
177 |
|
178 |
add_settings_section(
|
179 |
'rename-wp-login-section',
|
180 |
-
'Rename wp-login.php',
|
181 |
array( $this, 'rwl_section_desc' ),
|
182 |
'permalink'
|
183 |
);
|
184 |
|
185 |
add_settings_field(
|
186 |
'rwl-page',
|
187 |
-
'<label for="rwl-page">Login url</label>',
|
188 |
array( $this, 'rwl_page_input' ),
|
189 |
'permalink',
|
190 |
'rename-wp-login-section'
|
@@ -223,7 +223,7 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Rename_WP_Login' ) ) {
|
|
223 |
$out = '';
|
224 |
|
225 |
if ( is_multisite() && is_super_admin() && is_plugin_active_for_network( $this->basename() ) ) {
|
226 |
-
$out .= '<p>To set a networkwide default, go to <a href="' . network_admin_url( 'settings.php#rwl-page-input' ) . '">Network Settings</a
|
227 |
}
|
228 |
|
229 |
echo $out;
|
@@ -241,15 +241,15 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Rename_WP_Login' ) ) {
|
|
241 |
global $pagenow;
|
242 |
|
243 |
if ( ! is_network_admin() && $pagenow === 'options-permalink.php' && isset( $_GET['settings-updated'] ) ) {
|
244 |
-
echo '<div class="updated"><p>Your login page is now here: <strong><a href="' . $this->new_login_url() . '">' . $this->new_login_url() . '</a></strong
|
245 |
}
|
246 |
}
|
247 |
|
248 |
public function plugin_action_links( $links ) {
|
249 |
if ( is_network_admin() && is_plugin_active_for_network( $this->basename() ) ) {
|
250 |
-
array_unshift( $links, '<a href="' . network_admin_url( 'settings.php#rwl-page-input' ) . '">Settings</a>' );
|
251 |
} elseif ( ! is_network_admin() ) {
|
252 |
-
array_unshift( $links, '<a href="' . admin_url( 'options-permalink.php#rwl-page-input' ) . '">Settings</a>' );
|
253 |
}
|
254 |
|
255 |
return $links;
|
@@ -258,13 +258,15 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Rename_WP_Login' ) ) {
|
|
258 |
public function plugins_loaded() {
|
259 |
global $pagenow;
|
260 |
|
|
|
|
|
261 |
if (
|
262 |
! is_multisite() && (
|
263 |
strpos( $_SERVER['REQUEST_URI'], 'wp-signup' ) !== false ||
|
264 |
strpos( $_SERVER['REQUEST_URI'], 'wp-activate' ) !== false
|
265 |
)
|
266 |
) {
|
267 |
-
wp_die( __( 'This feature is not enabled.' ) );
|
268 |
}
|
269 |
|
270 |
$request = parse_url( $_SERVER['REQUEST_URI'] );
|
@@ -292,7 +294,7 @@ if ( defined( 'ABSPATH' ) && ! class_exists( 'Rename_WP_Login' ) ) {
|
|
292 |
global $pagenow;
|
293 |
|
294 |
if ( is_admin() && ! is_user_logged_in() && ! defined( 'DOING_AJAX' ) ) {
|
295 |
-
wp_die( __( 'You must log in to access the admin area.' ) );
|
296 |
}
|
297 |
|
298 |
$request = parse_url( $_SERVER['REQUEST_URI'] );
|
1 |
<?php
|
2 |
|
3 |
/*
|
4 |
+
* Plugin Name: Rename wp-login.php
|
5 |
+
* Plugin URI: https://wordpress.org/plugins/rename-wp-login/
|
6 |
* Description: Change wp-login.php to whatever you want.
|
7 |
+
* Version: 2.5.5
|
8 |
+
* Author: Ella Iseulde Van Dorpe
|
9 |
+
* Author URI: https://iseulde.com
|
10 |
+
* Text Domain: rename-wp-login
|
11 |
* Domain Path:
|
12 |
* Network:
|
13 |
* License: GPL-2.0+
|
118 |
}
|
119 |
|
120 |
public function admin_notices_incompatible() {
|
121 |
+
echo '<div class="error"><p>' . sprintf( __( 'Please upgrade to the latest version of WordPress to activate %s.', 'rename-wp-login' ), '<strong>' . __( 'Rename wp-login.php', 'rename-wp-login' ) . '</strong>' ) . '</p></div>';
|
122 |
}
|
123 |
|
124 |
public function activate() {
|
150 |
public function wpmu_options() {
|
151 |
$out = '';
|
152 |
|
153 |
+
$out .= '<h3>' . __( 'Rename wp-login.php', 'rename-wp-login' ) . '</h3>';
|
154 |
+
$out .= '<p>' . __( 'This option allows you to set a networkwide default, which can be overridden by individual sites. Simply go to to the site’s permalink settings to change the url.', 'rename-wp-login' ) . '</p>';
|
155 |
$out .= '<table class="form-table">';
|
156 |
$out .= '<tr valign="top">';
|
157 |
+
$out .= '<th scope="row">' . __( 'Networkwide default', 'rename-wp-login' ) . '</th>';
|
158 |
$out .= '<td><input id="rwl-page-input" type="text" name="rwl_page" value="' . get_site_option( 'rwl_page', 'login' ) . '"></td>';
|
159 |
$out .= '</tr>';
|
160 |
$out .= '</table>';
|
177 |
|
178 |
add_settings_section(
|
179 |
'rename-wp-login-section',
|
180 |
+
__( 'Rename wp-login.php', 'rename-wp-login' ),
|
181 |
array( $this, 'rwl_section_desc' ),
|
182 |
'permalink'
|
183 |
);
|
184 |
|
185 |
add_settings_field(
|
186 |
'rwl-page',
|
187 |
+
'<label for="rwl-page">' . __( 'Login url', 'rename-wp-login' ) . '</label>',
|
188 |
array( $this, 'rwl_page_input' ),
|
189 |
'permalink',
|
190 |
'rename-wp-login-section'
|
223 |
$out = '';
|
224 |
|
225 |
if ( is_multisite() && is_super_admin() && is_plugin_active_for_network( $this->basename() ) ) {
|
226 |
+
$out .= '<p>' . sprintf( __( 'To set a networkwide default, go to %s.', 'rename-wp-login' ), '<a href="' . network_admin_url( 'settings.php#rwl-page-input' ) . '">' . __( 'Network Settings', 'rename-wp-login' ) . '</a>') . '</p>';
|
227 |
}
|
228 |
|
229 |
echo $out;
|
241 |
global $pagenow;
|
242 |
|
243 |
if ( ! is_network_admin() && $pagenow === 'options-permalink.php' && isset( $_GET['settings-updated'] ) ) {
|
244 |
+
echo '<div class="updated"><p>' . sprintf( __( 'Your login page is now here: %s. Bookmark this page!', 'rename-wp-login' ), '<strong><a href="' . $this->new_login_url() . '">' . $this->new_login_url() . '</a></strong>' ) . '</p></div>';
|
245 |
}
|
246 |
}
|
247 |
|
248 |
public function plugin_action_links( $links ) {
|
249 |
if ( is_network_admin() && is_plugin_active_for_network( $this->basename() ) ) {
|
250 |
+
array_unshift( $links, '<a href="' . network_admin_url( 'settings.php#rwl-page-input' ) . '">' . __( 'Settings', 'rename-wp-login' ) . '</a>' );
|
251 |
} elseif ( ! is_network_admin() ) {
|
252 |
+
array_unshift( $links, '<a href="' . admin_url( 'options-permalink.php#rwl-page-input' ) . '">' . __( 'Settings', 'rename-wp-login' ) . '</a>' );
|
253 |
}
|
254 |
|
255 |
return $links;
|
258 |
public function plugins_loaded() {
|
259 |
global $pagenow;
|
260 |
|
261 |
+
load_plugin_textdomain( 'rename-wp-login' );
|
262 |
+
|
263 |
if (
|
264 |
! is_multisite() && (
|
265 |
strpos( $_SERVER['REQUEST_URI'], 'wp-signup' ) !== false ||
|
266 |
strpos( $_SERVER['REQUEST_URI'], 'wp-activate' ) !== false
|
267 |
)
|
268 |
) {
|
269 |
+
wp_die( __( 'This feature is not enabled.', 'rename-wp-login' ) );
|
270 |
}
|
271 |
|
272 |
$request = parse_url( $_SERVER['REQUEST_URI'] );
|
294 |
global $pagenow;
|
295 |
|
296 |
if ( is_admin() && ! is_user_logged_in() && ! defined( 'DOING_AJAX' ) ) {
|
297 |
+
wp_die( __( 'You must log in to access the admin area.', 'rename-wp-login' ) );
|
298 |
}
|
299 |
|
300 |
$request = parse_url( $_SERVER['REQUEST_URI'] );
|