I saw on the internet that hiding the version of wordpress that we are using for our sites is good for the security. That is why I have made few changes in all my wordpress based sites: these changes were the removal of version information from all pages.
Anyway, for this reason, I needed to find the the_generator function. I checked files like functions.php etc but had no luck in finding this function.
After searching quite few files, I finally found this function.
In “wp-includes” directory: search for this file:
general-templates.php
Open this file and scroll down till the end. Here you can see both these functions:
the_generator
and
get_the_generator
If you are also trying to remove the version information from your wordpress blogs like me, then you will have to make small changes in “get_the_generator” function.