title: Wordpress Set featured Image from frontend
body: <p>I updated wordpress to version 3.5 and one of my functions not working anymore.</p>
  
  <p>I have a page with post form from frontend where users can submit posts to one category.</p>
  
  <p>After the upgrade to 3.5, I can create post fine and upload image too in the media library but, the function that I use to attach the uploaded image like featured image to the post not working for some reason that I can't find.</p>
  
  <p>I use this code to set featured image after the post is sucessful created and the image is uploaded to the media library. I can capture the <code>$post_id</code> and the <code>$attach_id
  set_post_thumbnail( $post_id, $attach_id );</code></p>
  
  <p>I made change to the code too but without luck</p>
  
  <p><code>add_post_meta( $post_id, '_thumbnail_id', $attach_id,true );</code></p>
  
  <p>I manually add <code>post_meta</code> to the post in the database the image is appearing as featured fine but I must set the <code>_edit_lock</code> first.</p>
  
  <p>When I add this code the <code>_edit_lock</code> is inserted in the <code>post_meta</code> but not the <code>_thumbnail_id</code></p>
  
  <pre><code>add_post_meta( $post_id, '_thumbnail_id', $attach_id,true );
  add_post_meta( $post_id, '_edit_lock', time().':1',true);
  </code></pre>
  
  <p>In WordPress 3.5 is any restrictions about <code>_thumbnail_id post_meta</code> execution from fronted ?</p>