function sfc_login_logout() { // check for FB cookies, if not found, do nothing $cookie = sfc_cookie_parse(); if (empty($cookie)) { return; } // we have an FB login, log them out with a redirect add_action('sfc_async_init', 'sfc_login_logout_js'); ?> <html><head></head><body> <?php sfc_add_base_js(); ?> </body></html> <?php exit; }
function sfc_login_logout() { $options = get_option('sfc_options'); // check for FB cookies, if not found, do nothing $cookie = sfc_cookie_parse(); if (empty($cookie)) { return; } // force remove the cookie, since FB can't be relied on to do it properly $domain = '.' . parse_url(home_url('/'), PHP_URL_HOST); setcookie('fbsr_' . $options['appid'], ' ', time() - 31536000, "/", $domain); // we have an FB login, log them out with a redirect add_action('sfc_async_init', 'sfc_login_logout_js'); ?> <html><head></head><body> <?php sfc_add_base_js(array('cookie' => false)); ?> </body></html> <?php exit; }