Update PVTemplate.php

Adding isset to libraries to be loaded and improving meta tag replacement