added support for saving drafted posts

 added - in filename output since drafted posts doesn’t use post_name
added support for saving drafted posts

changed filename to post_title and string replaced the spaces with ‘-‘
due to drafted posts not using post_name