you want wp_insert_post_data
i did this, so when you publish a post it took you back a year ;)
Code:
function back_to_the_future($data,$postarr) {
$format = 'Y-m-d H:i:s';
$old_date = $data['post_date'];
$old_date_gmt = $data['post_date_gmt'];
$new_date = date($format, strtotime('-1 year',strtotime($old_date)));
$new_date_gmt = date( $format, strtotime('-1 year',strtotime($old_date_gmt)));
$data['post_date'] = $new_date;
$data['post_date_gmt'] = $new_date_gmt;
return $data;
}
add_filter('wp_insert_post_data','back_to_the_future',99,2);
in your case you would want to use post_content
like so
Code:
function change_post_content($data,$postarr) {
$post_content = strip_tags($data['post_content']);
$data['post_post_content'] = $post_content;
return $data;
}
add_filter('wp_insert_post_data','change_post_content',99,2);
which would strip html tags from post content, etc.
this will get you started.