Correct the documentation for _publish_post_hook(). Remove unused global declaration. props roulandf. fixes #23376.