The comments_array
filter as part of the comments_template()
function, the purpose of which is to load a comment template. It filters comments being prepared to be rendered in the comment section of singular type pages.
The preprocess_comment
and comment_post
actions (in that order) both fire as part of the wp_new_comment()
function, the purpose of which is to process/sanitize a new comment before sending it into the database.
As such, comments_array
, on one hand, preprocess_comment
and comment_post
on the other, are completely separate processes: one is retrieving data, the other is saving data. Depending on which direction the data is flowing, either the filter will fire, or the actions will fire, but they will never all fire together! Or, rather, the actions will fire when a new comment is saved, and then when the page reloads with the new comments saved, the filter will fire on the reload. But which comes first, the chicken or the egg, will depend on which point in the process you enter it.
Furthermore, you can’t influence which functions run on different hooks by changing the priorities. The priority only prioritizes functions that are attached to the same hook.