logout_url
Filter HookDescription
Filters the logout URL.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 433 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$logout_url
|
The HTML-encoded logout URL. |
string
|
$redirect
|
Path to redirect to on logout. |
Usage Examples
Basic Usage
<?php
// Hook into logout_url
add_filter('logout_url', 'my_custom_filter', 10, 2);
function my_custom_filter($logout_url, $redirect) {
// Your custom filtering logic here
return $logout_url;
}
Source Code Context
wp-includes/general-template.php:433
- How this hook is used in WordPress core
<?php
428 * @since 2.8.0
429 *
430 * @param string $logout_url The HTML-encoded logout URL.
431 * @param string $redirect Path to redirect to on logout.
432 */
433 return apply_filters( 'logout_url', $logout_url, $redirect );
434 }
435
436 /**
437 * Retrieves the login URL.
438 *
PHP Documentation
<?php
/**
* Filters the logout URL.
*
* @since 2.8.0
*
* @param string $logout_url The HTML-encoded logout URL.
* @param string $redirect Path to redirect to on logout.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.