Exemple #1
0
/**
 * Return the URL to a specified template file
 *
 * Converts filename to URL after finding location and then returns it
 *
 * @since 1.0
 *
 * @param string $file Filename to find, relative to template directory
 * @return string Absolute URL to the file
 */
function get_template_file($file)
{
    return Templates::path_to_url(Templates::get_file($file));
}
 /**
  * Return the URL to a specified file
  *
  * Equivalent of {@link get_file} for URLs
  * @param string $file_name Filename to attempt to find
  * @return string|boolean Path to file found, false if none found
  */
 public static function get_url($file_name)
 {
     if ($path = Templates::get_file($file_name)) {
         return Templates::path_to_url($path);
     }
     return false;
 }