Skip to content

Instantly share code, notes, and snippets.

@danls
danls / clef2fa-wp-logout-redirect.php
Last active May 29, 2016 04:33 — forked from lolux/clef2fa-wp-logout-redirect.php
Redirect users who've enabled Clef to Clef logout page upon manual WP logout
// Note: This action redirects users who've enabled Clef to getclef.com/logout/
// after performing a manual logout from WordPress.
function redirect_to_Clef_logout_upon_wp_logout() {
$user = wp_get_current_user();
if (!!get_user_meta($user->ID, "clef_id", true)) {
wp_redirect('https://getclef.com/logout/');
exit;
}
}