login_url
Filter HookDescription
Filters the login URL.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 467 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$login_url
|
The login URL. Not HTML-encoded. |
string
|
$redirect
|
The path to redirect to on login, if supplied. |
bool
|
$force_reauth
|
Whether to force reauthorization, even if a cookie is present. |
Usage Examples
Basic Usage
<?php
// Hook into login_url
add_filter('login_url', 'my_custom_filter', 10, 3);
function my_custom_filter($login_url, $redirect, $force_reauth) {
// Your custom filtering logic here
return $login_url;
}
Source Code Context
wp-includes/general-template.php:467
- How this hook is used in WordPress core
<?php
462 *
463 * @param string $login_url The login URL. Not HTML-encoded.
464 * @param string $redirect The path to redirect to on login, if supplied.
465 * @param bool $force_reauth Whether to force reauthorization, even if a cookie is present.
466 */
467 return apply_filters( 'login_url', $login_url, $redirect, $force_reauth );
468 }
469
470 /**
471 * Returns the URL that allows the user to register on the site.
472 *
PHP Documentation
<?php
/**
* Filters the login URL.
*
* @since 2.8.0
* @since 4.2.0 The `$force_reauth` parameter was added.
*
* @param string $login_url The login URL. Not HTML-encoded.
* @param string $redirect The path to redirect to on login, if supplied.
* @param bool $force_reauth Whether to force reauthorization, even if a cookie is present.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.