WP-API/WP-API — pull request #514 by Shelob9 (2014-10-05 22:45:21+00:00)
Title: #492

This PR adds a new function that takes a response from a GET request for an individual post, prepares it for `wp_insert_post()` and then creates the post using `wp_insert_post()`.

The one thing it doesn't do is handle taxonomies. Instead it places that part of the original response on a hook and unsets that part of the response. I didn't think it was safe to assume the term IDs will match on the current site to what is on the site that the incoming JSON data is from.

Possible solutions to this that I see:
1) Make term insert optional. That way if the IDs are known to match, than the end user can choose to allow use them.
2) Provide a second function for setting the terms that would allow for ID switching.