Inpsyde\MultilingualPress\Asset\DebugAwareAssetURL::get_file PHP Method

get_file() private method

Returns the name of the minified version of the given file if it exists and not debugging, otherwise the unmodified file.
private get_file ( string $file, string $dir_path ) : string
$file string File name (e.g., admin.css).
$dir_path string Local path to the directory containing the file.
return string Name of the minified or unmodified file, depending on debugging settings.
    private function get_file($file, $dir_path)
    {
        if (\Inpsyde\MultilingualPress\is_script_debug_mode()) {
            return $file;
        }
        $minified_file = $this->get_minified_file($file);
        if ($minified_file === $file) {
            return $file;
        }
        if (is_readable("{$dir_path}/{$minified_file}")) {
            return $minified_file;
        }
        return $file;
    }