Forums

[resolved] How to get post id from pre_comment_content filter? (2 posts)

  1. xurdna
    Member
    Posted 4 months ago #

    Hi,

    I'm trying to get the post ID from within the callback function I used in pre_comment_content filter.

    Does anybody know how this can be done?

    Or if not possible, could anyone suggest another hook to accomplish this, while retaining the ability to perform some filtering to my comment?

    Thank you all in advance.

  2. xurdna
    Member
    Posted 4 months ago #

    I found it!

    Just used get_the_ID() function...

    Thanks.

Reply

You must log in to post.

About this Topic