Update index.php

fix error in admin menu hook and added hook and function earlier version