You should use $templates_path instead of $template_url when building the path for is_file() -- the latter may work for you, but it only does because allow_url_fopen is enabled. If it is disabled (as it should be!), your code does not work.
It makes more sense to check the local filesystem instead of an URL, anyway. :-)
You should use $templates_path instead of $template_url when building the path for is_file() -- the latter may work for you, but it only does because allow_url_fopen is enabled. If it is disabled (as it should be!), your code does not work.
It makes more sense to check the local filesystem instead of an URL, anyway. :-)