this function changes the post to draft, you only have to call it and pass the post id where you want the function to work
function postToDraft($post_id){
$post = array( 'ID' => $post_id, 'post_status' => 'draft' );
wp_update_post($post);
}
this function changes the post to draft, you only have to call it and pass the post id where you want the function to work
function postToDraft($post_id){
$post = array( 'ID' => $post_id, 'post_status' => 'draft' );
wp_update_post($post);
}