is_trackback function
-
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 ?
- The topic ‘is_trackback function’ is closed to new replies.