logout_redirect WordPress Filter Hook

The logout_redirect Wordpress hook allows you to redirect a user after they have logged out of your site. This can be useful if you want to send them to a specific page, or if you want to redirect them to the home page.

apply_filters( 'logout_redirect', string $redirect_to, string $requested_redirect_to, WP_User $user ) #

Filters the log out redirect URL.


Parameters

$redirect_to

(string)The redirect destination URL.

$requested_redirect_to

(string)The requested redirect destination URL passed as a parameter.

$user

(WP_User)The WP_User object for the user that's logging out.


Top ↑

Source

File: wp-login.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
4.2.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.