how to hide particular comment programmatically not sure why:

function MY_MODULE_comment_view_alter(&amp;$build) {
    $build['#comment'] -&gt; status = 0;    
}


does not work. It displays comment on the red background, however comment is still visible for all users with 'view comments' rights. What I would like to achieve is simply hide comment so it's not visible.
You achieve this by adding a comment_post_render callback function to the build that outputs nothing:

function MY_MODULE_comment_view_alter(&amp;$build) {
  $build['#post_render'][] = 'MY_MODULE_comment_post_render';
}

function MY_MODULE_comment_post_render() {
  // Nothing here.
}