Updated class.theme.php to check for enabled applications

Third time is the charm