• Hello forum. I am trying to make the following “plugin” to just send emails when a comment is made on the attachment page.

    I tried putting the function code inside an if is_attachemnt condition and it doesn’t work either…

    Does anyone knows the right way?

    Thanks

    
    function notify($comment_id) {
    
    $user_email = '[email protected]';
    
    $subject = $comment_id . get_option('blogname');
    
    $t1 = 'Someone commented on a your picture';
    
    $t2 = "click here to see the comment";
    
    text = $t1 . $t2;
    
    wp_mail( $user_email, $subject, $text );
    
    }
    add_action('comment_post', 'notify');
    
Viewing 1 replies (of 1 total)
  • Thread Starter mhhenn

    (@mhhenn)

    I can not believe that no one knows the answer…I have seem too many smart people around to believe on that.

    Please can anyone help?

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘plugin to send email on attachment page’ is closed to new replies.