Filters the logout URL.
Parameters
$logout_urlstring- The HTML-encoded logout URL.
$redirectstring- Path to redirect to on logout.
Source
return apply_filters( 'logout_url', $logout_url, $redirect );
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
Filters the logout URL.
$logout_urlstring$redirectstringreturn apply_filters( 'logout_url', $logout_url, $redirect );
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Example migrated from Codex:
The following example changes the logout URL to a URL path relative to the home URL while keeping the same redirect URL.