WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] hook before comment commited (5 posts)

  1. agharbeia
    Member
    Posted 7 years ago #

    Is there a hook in the API that allows action to be taken before a comment is inserted into the database?

    If I am sure I want to refuse certain comments, for example, based on their content or other criteria, instead of marking them as spam or hooking to comment_post and deleting them from the database causing unnecessary overhead and indexing?

  2. Michael Bishop

    Posted 7 years ago #

    http://wphooks.flatearth.org/

    Maybe that will help?

  3. agharbeia
    Member
    Posted 7 years ago #

    Thank you, milkb.

    Is there a plan to incorporate that information in the codex?

    I mean, there's nothing preventing this from happening except maybe the needed volunteered effort, no?

    A question (if you happen to know): Since the whole of the information there seems to be 'unofficial', does "undocumented" merely mean that there is no information about that specific hook/filter in there yet, or does it mean that the hook/filter is itself undocumented and using it is considered a hack?

    Regards,

  4. Undocumented just means no one's typed up a description for it. Often it's because it's a rarely used hook or one that's obvious.

    and using it is considered a hack?

    I don't get what you mean...

    All hooks/filters were officially added and are officially supported.

  5. agharbeia
    Member
    Posted 7 years ago #

    All hooks/filters were officially added and are officially supported.

    This answers my question. Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic