Returns the Log Out URL.

Returns the URL that allows the user to log out of the site.

Signature

wp_logout_url( $redirect = '' )
redirect
 (string) Path to redirect to on logout.
Default: ''

Return

(string) A log out URL.

Source

function wp_logout_url($redirect = '') {
	$args = array( 'action' => 'logout' );
	if ( !empty($redirect) ) {
		$args['redirect_to'] = urlencode( $redirect );
	}

	$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
	$logout_url = wp_nonce_url( $logout_url, 'log-out' );

	/**
	 * Filter the logout URL.
	 *
	 * @since 2.8.0
	 *
	 * @param string $logout_url The Log Out URL.
	 * @param string $redirect   Path to redirect to on logout.
	 */
	return apply_filters( 'logout_url', $logout_url, $redirect );
}
WP Trac GitHub

Link here