Ajax hook function in functions.php