Files
wp-rocket/inc/Engine/Media/Lazyload/CSS/Front/FileResolver.php
T
2026-10-12 20:35:25 -06:00

24 lines
383 B
PHP

<?php
namespace WP_Rocket\Engine\Media\Lazyload\CSS\Front;
class FileResolver {
/**
* Resolves the name from the file from its URL.
*
* @param string $url URL from the file to resolve.
* @return string
*/
public function resolve( string $url ): string {
$path = rocket_url_to_path( strtok( $url, '?' ) );
if ( ! $path ) {
return '';
}
return $path;
}
}