I added some foreign key to wp_comments db table. Some comments could be indipendent from post. For these comments I’ve comment_post_ID set to 0. So i need something like:
add_filter("manage_comments_default_column","myplugin_my_filter", 10, 2);
function myplugin_my_filter($default, $comment_ID){
if($default == "response"){
//and if comment with id=$comment_ID isn't related to a post
echo "";
}
}
Does exist some similar hook?
—Edit—
Temporary solved using:
/*
unlink 'response' column and add a 'response'
substitute column called 'article'
*/
add_filter("manage_edit-comments_columns", "myplugin_manage-columns");
/*
if comment has a post related show a link to
that post in 'article' field
else leave 'article' field empty
*/
add_filter("manage_comments_custom_column","myplugin_manage-content-columns", 10, 2);
But I hope for a better solution.