Added wp_trash_post to move posts to trash and not delete them
Added post status to api call