logout_redirect filter-hookWP 4.2.0

Filters the log out redirect URL.

Usage

add_filter( 'logout_redirect', 'wp_kama_logout_redirect_filter', 10, 3 );

/**
 * Function for `logout_redirect` filter-hook.
 * 
 * @param string  $redirect_to           The redirect destination URL.
 * @param string  $requested_redirect_to The requested redirect destination URL passed as a parameter.
 * @param WP_User $user                  The WP_User object for the user that's logging out.
 *
 * @return string
 */
function wp_kama_logout_redirect_filter( $redirect_to, $requested_redirect_to, $user ){

	// filter...
	return $redirect_to;
}
$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.

Changelog

Since 4.2.0 Introduced.

Where the hook is called

In file: /wp-login.php
logout_redirect
wp-login.php 774
$redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user );

Where the hook is used in WordPress

Usage not found.