Adds check

Fixes #1056
Update functions.php
Update functions.php
Update functions.php
Update functions.php
Merge pull request #1166 from chriscct7/hotfix/1056

Fixes #1056