I recently asked a question about an error I was getting for doing theme updates where the user did not have permission. I would like to write a credential check, much like how wordpress does theirs.
essentially when you update WordPress you either have the worlds most insecure set up and it will just update when you click the button or it will do the smart thing and ask you for your ftp credentials.
My theme is built on the same concept except I don't know how to ask you for your ftp credentials. Now I know there are wordpress functions that do the update of themes for you, except I check my version number in a custom way, I also get the zip from my hosting and I don't use wordpress theme repo for any of this, so the one quick fix function won't work.
So my question is:
How do you write a custom credential check function that basically checks if you need ftp or not.