Example #1
0
function get_cached_filename($name)
{
    return get_cached_path() . $name . '.cache';
}
Example #2
0
function merge_js_files()
{
    $jquery = file_get_contents(__DIR__ . '/js/jquery.min.js');
    $settings = file_get_contents(get_cached_path() . 'settings.js');
    $append_str = "function load_jquery(){{$jquery}}\n\n{$settings}\n\n";
    $loader = file_get_contents(__DIR__ . '/js/loader.js');
    $new_output = preg_replace('/}\\)\\(\\);}/i', '', $loader);
    $new_output .= $append_str . '})();}';
    file_put_contents(get_cached_path() . 'loader.js', $new_output);
}