Dear All,
I am currently developing a plugin.
I got the following code from the codex
// Update post 37
$my_post = array();
$my_post['ID'] = 37;
$my_post['post_content'] = 'This is the updated content.';
// Update the post into the database
wp_update_post( $my_post );
I would like to know how to update post content directly from wp editor instead of defining it in the code.
I tested the following, but as result the post content was deleted and I end up with an empty post:
// Update post
$my_post = array();
$my_post['ID'] = 37;
$my_post['post_content'] = $_POST["syf_editor"];
// Update the post into the database
wp_update_post( $my_post );
wp_editor( $content, syf_editor, $settings = array() );
My main need is a way to get the data from wp editor.
Thanks for any hint on this matter.
Pietro