/**
* Return the fullpath to an export module's Javascript file.
*
* @param string $type
*
* @return string
*/
function getExportScriptPath($type)
{
$fullpath = false;
if (CustomCss::isCustomCss()) {
$fullpath = CustomCss::getCustomCssFolder() . "/{$type}.js";
if (!is_file($fullpath)) {
$fullpath = false;
}
}
if (!$fullpath) {
$fullpath = realpath(get_stylesheet_directory() . "/export/{$type}/script.js");
if (CustomCss::isCustomCss() && CustomCss::isRomanized() && $type == 'prince') {
$fullpath = realpath(get_stylesheet_directory() . "/export/{$type}/script-romanize.js");
}
}
return $fullpath;
}