protected static function prepareFiles($type, $place)
    {
        self::getProcessedFiles();

        $params['type'] = $type;
        $params['place'] = $place;
        $params['routes'] = self::getRoutesToFolder($type);

        foreach (self::$data[$type][$place] as $id => $file) {
            $path = self::getPathFromUrl($file['url']);

            $params['urls'][$id] = $file['url'];
            $params['files'][$id] = basename($file['url']);
            $params['paths'][$id] = $path;

            if (is_file($path) && self::isModifiedFile($path)) {
                unset($params['urls'][$id]);
                continue;
            }

            $path = $params['routes']['path'] . $params['files'][$id];

            if (is_file($path)) {
                if (self::isModifiedHash($file['url'], $path)) {
                    continue;
                }
                $params['paths'][$id] = $path;
            } elseif (self::isExternalUrl($file['url'])) {
                continue;
            }

            unset($params['urls'][$id]);
        }

        return $params;
    }
protected static function prepareFiles($type, $place)
    {
        self::getProcessedFiles();

        $params['type'] = $type;
        $params['place'] = $place;
        $params['routes'] = self::getRoutesToFolder($type);

        foreach (self::$data[$type][$place] as $id => $file) {
            $path = self::getPathFromUrl($file['url']);

            $params['urls'][$id] = $file['url'];
            $params['files'][$id] = basename($file['url']);
            $params['paths'][$id] = $path;

            if (is_file($path) && self::isModifiedFile($path)) {
                unset($params['urls'][$id]);
                continue;
            }

            $path = $params['routes']['path'] . $params['files'][$id];

            if (is_file($path)) {
                if (self::isModifiedHash($file['url'], $path)) {
                    continue;
                }
                $params['paths'][$id] = $path;
            } elseif (self::isExternalUrl($file['url'])) {
                continue;
            }

            unset($params['urls'][$id]);
        }

        return $params;
    }
protected static function prepareFiles ( $ type , $ place ) { self :: getProcessedFiles ( ) ; $ params [ 'type' ] = $ type ; $ params [ 'place' ] = $ place ; $ params [ 'routes' ] = self :: getRoutesToFolder ( $ type ) ; foreach ( self :: $ data [ $ type ] [ $ place ] as $ id => $ file ) { $ path = self :: getPathFromUrl ( $ file [ 'url' ] ) ; $ params [ 'urls' ] [ $ id ] = $ file [ 'url' ] ; $ params [ 'files' ] [ $ id ] = basename ( $ file [ 'url' ] ) ; $ params [ 'paths' ] [ $ id ] = $ path ; if ( is_file ( $ path ) && self :: isModifiedFile ( $ path ) ) { unset ( $ params [ 'urls' ] [ $ id ] ) ; continue ; } $ path = $ params [ 'routes' ] [ 'path' ] . $ params [ 'files' ] [ $ id ] ; if ( is_file ( $ path ) ) { if ( self :: isModifiedHash ( $ file [ 'url' ] , $ path ) ) { continue ; } $ params [ 'paths' ] [ $ id ] = $ path ; } elseif ( self :: isExternalUrl ( $ file [ 'url' ] ) ) { continue ; } unset ( $ params [ 'urls' ] [ $ id ] ) ; } return $ params ; }
Check files and prepare paths and urls.

@since 1.1.5

@param string $type  → script|style
@param string $place → header|footer

@return array|false → paths, urls and outdated files
Check files and prepare paths and urls .