For non-AirPrint enabled printer Apple does not have any in built API. I learned that we can add a WiFi module to a printer. So my question is:
I found the following one: https://github.com/opentable/star-printing.
But from the documentation I could not understand: is it only for AirPrint enabled printers?
Below are the ways I can connect a desktop printer using iPad I guess.
Trying to answer all your questions:
If I add a wifi module, will my printer be AirPrint enabled?
Can a non-AirPrint printer be made into an AirPrint printer?
No. You need an AirPrint compatible printer, simply making it available over WiFi does not make it an AirPrint printer, and you cannot change the device to make it an AirPrint printer.
If not, can I still use it?
Yes. However, it will require that you directly open connection with the printer (via a socket) and send the data that way. It's really not too hard to do. There are likely some libraries available, but I haven't specifically tried. The code to open the port and send a data blob is pretty trivial, assuming you have the PCL data already.
Can I connect to a WiFi printer?
Yes, as described above.
... Bluetooth?
Yes, but only on MFi (Made For iOS) printers.
... Bonjour
Yes, via the built in print dialog.
... Networked
This could probably be done the same way as the WiFi printing, but I haven't tried it yet.
Hope that helps, let me know if I can clarify anything.