login_url WordPress Filter Hook

The login_url hook allows you to change the URL that WordPress uses for the login page. This can be useful if you want to use a custom login page or if you want to change the URL for security purposes.

apply_filters( 'login_url', string $login_url, string $redirect, bool $force_reauth ) #

Filters the login URL.


Parameters

$login_url

(string)The login URL. Not HTML-encoded.

$redirect

(string)The path to redirect to on login, if supplied.

$force_reauth

(bool)Whether to force reauthorization, even if a cookie is present.


Top ↑

More Information

login_url is a filter applied to the url returned by the function wp_login_url()


Top ↑

Source

File: wp-includes/general-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.2.0The $force_reauth parameter was added.
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More