Title: Filtered before posting?
Last modified: August 18, 2016

---

# Filtered before posting?

 *  [RobotHero](https://wordpress.org/support/users/robothero/)
 * (@robothero)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/filtered-before-posting/)
 * I’ve seen some pretty fancy stuff done with add_filter, but I think what I want
   needs something else.
    I want to scan the post for keywords and replace them.
   But, say that I want to grab a link from another feed every time I mention the
   name of the feed. Now, I want to do this replacement before the post is put in
   the DB, because I need to use the link that appeared in the feed at the time 
   I posted, not at the time my post is viewed. (Am I clear?) What would I want 
   to use?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [RobotHero](https://wordpress.org/support/users/robothero/)
 * (@robothero)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/filtered-before-posting/#post-43197)
 * Okay, I think I’ll change the format_to_post function in functions.php, adding
   $content = apply_filters(‘format_to_post’, $content);
    And then I should be able
   to use my-hacks.php to define the specific stuff. `function format_to_post($content){
   global $post_autobr,$comment_autobr; $content = addslashes($content); if ($post_autobr
   || $comment_autobr) { $content = autobrize($content); } $content = apply_filters('
   format_to_post', $content); return $content; }
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/filtered-before-posting/#post-43198)
 * Good idea, I’ll add that.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Filtered before posting?’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * Last activity: [22 years, 1 month ago](https://wordpress.org/support/topic/filtered-before-posting/#post-43198)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
