I'm nearly finished writing my conversion script to WordPress, however, I have a question about inserting content into the database.
Looking at posts.php inside wp-admin, I saw that the 'post_content' is put through this function:
$content = apply_filters('content_save_pre', $_POST['content']);
Well, I changed that to work with my conversion:
$wp_posts_post_content =apply_filters('content_save_pre', $story["CONTENT_SEARCH"]);
I then tried running my query, and got an error, something to do with the content. So I put in addslashes ():
$wp_posts_post_content = addslashes (apply_filters('content_save_pre', $story["CONTENT_SEARCH"]));
And the query went through fine.
But I'm confused. How comes the wp-admin/posts.php file does not addslashes? It obviously isn't done in the filter, and I can't see it anywhere?