src/class-wp-register.php
protected static function prepare_files( $type ) {

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

		self::get_processed_files();

		foreach ( self::$data[ $type ] as $id => $file ) {

			$path = self::get_path_from_url( $file['url'] );

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

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

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

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

			} elseif ( self::is_external_url( $file['url'] ) ) {
				continue;
			}

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

		return $params;
	}
protected static function prepare_files( $type ) {

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

		self::get_processed_files();

		foreach ( self::$data[ $type ] as $id => $file ) {

			$path = self::get_path_from_url( $file['url'] );

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

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

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

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

			} elseif ( self::is_external_url( $file['url'] ) ) {
				continue;
			}

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

		return $params;
	}
protected static function prepare_files ( $ type ) { $ params [ 'type' ] = $ type ; $ params [ 'routes' ] = self :: get_routes_to_folder ( $ type ) ; self :: get_processed_files ( ) ; foreach ( self :: $ data [ $ type ] as $ id => $ file ) { $ path = self :: get_path_from_url ( $ file [ 'url' ] ) ; $ params [ 'files' ] [ $ id ] = basename ( $ file [ 'url' ] ) ; $ params [ 'urls' ] [ $ id ] = $ file [ 'url' ] ; $ params [ 'paths' ] [ $ id ] = $ path ; if ( is_file ( $ path ) && self :: is_modified_file ( $ path ) ) { unset ( $ params [ 'urls' ] [ $ id ] ) ; continue ; } $ path = $ params [ 'routes' ] [ 'path' ] . $ params [ 'files' ] [ $ id ] ; if ( is_file ( $ path ) ) { if ( self :: is_modified_hash ( $ file [ 'url' ] , $ path ) ) { continue ; } $ params [ 'paths' ] [ $ id ] = $ path ; } elseif ( self :: is_external_url ( $ file [ 'url' ] ) ) { continue ; } unset ( $ params [ 'urls' ] [ $ id ] ) ; } return $ params ; }
Check files and prepare paths and urls.

@since 1.0.4

@param string $type → script|style.

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