Edit Post function.