Log in modal issue with hook
-
I am using a hook to override your current log in page so I can show error messages to the user. The page itself works well, but now there is an issue when an unlogged in user attempts to like a page, the modal is now not showing. Looking at the response, the login page html is being returned with a line of JSON at the bottom. When the hook is not active, only the JSON by itself is returned.
For some reason, the hook inserts the html into the modal response. Any ideas?
Code below:
add_filter( 'wp_ulike_pro_public_templates', 'log_in_filter', 1, 2);function log_in_filter($content, $template_name) { if( $template_name == 'form/login' ){ $content = load_template(locate_template('/ulike/form/login.php')); } return $content; }
The topic ‘Log in modal issue with hook’ is closed to new replies.