• Resolved fiddyp

    (@fiddyp)


    I have written a plugin that parses a comment authors feed and appends a titled link to their last blog post at the time of comment submit and it’s working nicely (CommentLuv) with comments but it’s also appending the last post when the post receives a trackback ??

    there is a small if statement in the function that is called by the filter preprocess_comment that I use to see if the commenter left a site url, if they didn’t I just return the comment contents

    if(!$author_url){
    return $comment_data;
    }

    I thought that changing it to

    if(!$author_url || is_trackback()) {
    return $comment_data;
    }

    would stop the function from carrying on if it had been called with preprocess_comment on a trackback but it doesn’t ??

    how can I tell if the preprocess_comment filter has been triggered by a trackback so I can tell my function not to bother with trying to parse the feed of the trackback-er ?

Viewing 1 replies (of 1 total)
  • Thread Starter fiddyp

    (@fiddyp)

    it’s ok, I fixed it!
    here’s what I put

    if ($user_level > 7 || $comment_data['comment_type'] == 'pingback' || $incoming_comment['comment_type'] == 'trackback') {
    return $comment_data;
    }

    that stops it doing anything if the user posting is an admin or it is a trackback

Viewing 1 replies (of 1 total)
  • The topic ‘is_trackback function’ is closed to new replies.