Added error handling for wp attachment insertion - method::insert_attachment()
Security:: Escaped get value
Security:: Escaped post and get values
Security:: Escaped more post and files array vars