Update functions.php

Previous flow did generate wrong output when more than one file uses deprecated functions.
Merge pull request #585 from sphoto/patch-23

Update functions.php