title: How to control the the behaviour of wp_insert_post?
body: <p>I am using wp_insert_post to bulk insert posts into Wordpress, according to <a href="http://codex.wordpress.org/Function_Reference/wp_insert_post" rel="nofollow">http://codex.wordpress.org/Function_Reference/wp_insert_post</a> it seems like the method does many tag manipulation for the content supplied, for example, it will replace a <code>&lt;br&gt;</code> tag if it finds a newline <code>\n</code> character in the string. I wonder how could we turn this feature off, as in my case I have all the content pre-processed and I want Wordpress take them as is. The <code>kses_remove_filters()</code> and <code>'post_content_filtered' =&gt; true,</code> lines are my attempts to solve this problem, but it doesn't seem to work.</p>
  
  <pre><code>kses_remove_filters();
  $my_post = array(
  'post_title' =&gt; wp_strip_all_tags($json_str['title'][0]),
  'post_content' =&gt; $json_str['content'],
  'post_date' =&gt; $json_str['pdate'],
  'post_name' =&gt; $json_str['alias'][0],
  'post_status' =&gt; 'publish',
  'post_author' =&gt; 1,
  'post_category' =&gt; array(2, $catid),
  'post_content_filtered' =&gt; true,
  );
  wp_insert_post();
  </code></pre>