[WP Hack] How to perform an action after marking a comment as spam?

Discussion in 'WordPress' started by lelkoun, Feb 6, 2011.

  1. #1
    I need to perform an action (copy comment's author ID and the IP address) after making a comment as spam.

    I just know that I should use a function called "wp_set_comment_status", but I am unable to figure out how to do it. Could you help me, please?

    How to make this work? ↓

    do_action('wp_set_comment_status', $comment_id, $comment_status);
    add_action('wp_set_comment_status', 'my_function', 2);
    Code (markup):
    Thank you!
     
    lelkoun, Feb 6, 2011 IP
  2. atnews

    atnews Peon

    Messages:
    277
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    wordpress comments system is bit difficult. USe disqus or intendebate comments. You can stop spam comments easily and there are many options available that can increase traffic.
     
    atnews, Feb 7, 2011 IP
  3. lelkoun

    lelkoun Active Member

    Messages:
    288
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    What are you talking about? How is this related to my post?
     
    lelkoun, Feb 7, 2011 IP