can't delete the preview button
You don't need to use custom code to delete the preview button.  On the Content Type administration page at admin/structure/types/manage/your_content_type, you can selection Disabled for Preview before submitting under Submission form settings.  This will remove the preview button for that content type.