Using a wordpress plugin called WordPress Social Login I have allowed users to comment by logging in with various social networks.
The problem is after the authentication takes place in a new window and that window closes, the original window then refreshes. I would like this window not to refresh and instead triggers some javascript to re load certain sections of it.
I have found the line in authentication.php where it closes the window, but cannot find what makes it refresh the current page.
After a lot of PHP is done, this takes place…
<html>
<head>
<script>
function init() {
window.opener.wsl_wordpress_social_login({
'action' : 'wordpress_social_login',
'provider' : '<?php echo $provider ?>'
});
window.close();
}
</script>
</head>
<body onLoad="init();">
</body>
</html>
That closes the pop up. What makes the main window then refresh and how can I stop it.
I’m sure the parent window does not check if the child window is closed but the popup has something like:
<body onunload="opener.location=(opener.location)">or
window.opener.location.href = window.opener.location.href;somewhere in a script.