we checked the file in the theme and there is no problem, it works also with WP 4.7. The function “add_action” is an important WordPress function and included of course also in 4.7
Have you changed something in this file? Do you use plugins? What version of the theme do you use?