PHP_Framework

Wh1t3projects' PHP framework. Small PHP framework for building web apps and websites

View the Project on GitHub

Syntax: theme_js(string $jsFile)

Get the external path (user-accessible) to the specified JS file. The file must be located inside the JS folder of the theme. If inside a sub-folder, it must be specified as a relative path.


Parameters

$jsFile
The file to get the path to.


Return values

The external path to the specified file.


Examples:

Print the path to the helper.js file
echo theme_js('helper.js');

Print the script element of the BODY with the path to helper.js from footer.php (can be anywhere else, including header.php)
<script type="text/javascript" src="<?php echo theme_js('helper.js');?>" </script>