/** * 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; }
/** * 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) { if (Container::get('Sass')->isCurrentThemeCompatible(2)) { // Check for v2 themes $fullpath = realpath(get_stylesheet_directory() . "/assets/scripts/{$type}/script.js"); } else { $fullpath = realpath(get_stylesheet_directory() . "/export/{$type}/script.js"); } if (CustomCss::isCustomCss() && CustomCss::isRomanized() && 'prince' == $type) { $fullpath = realpath(get_stylesheet_directory() . "/export/{$type}/script-romanize.js"); } } return $fullpath; }