Title: is_trackback function
Last modified: August 18, 2016

---

# is_trackback function

 *  Resolved [fiddyp](https://wordpress.org/support/users/fiddyp/)
 * (@fiddyp)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/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](http://www.fiddyp.co.uk/commentluv-wordpress-plugin)) 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](https://wordpress.org/support/users/fiddyp/)
 * (@fiddyp)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/is_trackback-function/#post-623191)
 * 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.

## Tags

 * [action](https://wordpress.org/support/topic-tag/action/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [preprocess_comment](https://wordpress.org/support/topic-tag/preprocess_comment/)

 * 1 reply
 * 1 participant
 * Last reply from: [fiddyp](https://wordpress.org/support/users/fiddyp/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/is_trackback-function/#post-623191)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
