If user is editor, this function auto-shoots when user visits his dashboard!
How is this possible? This function should only work when user successfully posts comment, so what is happening? could be wordpress bug?
function redirect_after_comment($location)
{
//This should run only when comment is confirmed. But for user level Editor, this function auto shoots!
}
add_filter('get_comment_link','redirect_after_comment');
- User role is EDITOR
- user logins, goes to dashboard.
- Anything inside this function runs. For example return...
get_comment_link()in the title, but referenceredirect_after_comment()in the question body. Also: can you provide a bit more detail about what actually happens? – Chip Bennett Nov 15 '12 at 19:32if(is_admin()) return;as first line of function – Mridul Aggarwal Nov 15 '12 at 19:37