There's a bug in the
relevanssi_default_post_ok function. The problem is that, although it receives a
$post_ok value from earlier filter function(s), it disregards this received value and overwrites it with true or false depending on its own tests.
The easiest solution is to add a, let's say,
$my_post_ok = true; declaration at the beginning of the function, then use this variable in the 6 instances where
$post_ok was originally used, and finally end the function with a
return ( $my_post_ok && $post_ok );. This way an originally
$post_ok value won't suddenly become
true and make posts that should be hidden reappear in the search.
What do you think?