Update functions.php

Validate incoming version