This is something I notice while I am working on PR #31 , WordPress register most of their scripts/styles that included in wp-includes folder with relative paths.
So a script like comment-reply can't be optimized successfully, when I dig more into this it seems that our way of guessing the URL/Path is wrong.
see this codes:
$has_host = (bool) parse_url( $src, PHP_URL_HOST );
if ( ! $has_host ) {
$src = 'http://' . $host_domain . $src;
}
and
// First attempt to get the file from the filesystem
$contents = false;
$is_self_hosted = self::is_self_hosted_src( $src );
if ( $is_self_hosted ) {
$src_abspath = ABSPATH . parse_url( $src, PHP_URL_PATH );
$contents = file_get_contents( $src_abspath );
}
This is something I notice while I am working on PR #31 , WordPress register most of their scripts/styles that included in wp-includes folder with relative paths.
So a script like comment-reply can't be optimized successfully, when I dig more into this it seems that our way of guessing the URL/Path is wrong.
see this codes:
and