interpret GET-params makes no sense, so let's discard them for awhile. $params = strrchr( $url, '?' ); $url = $params ? substr( $url, 0, -strlen( $params ) ) : $url; // fix relative url. $url = $converter->convert( $url ); // now that the path has been converted, re-apply GET-params. $url .= $params; } /* * Urls with control characters above 0x7e should be quoted. * According to Mozilla's parser, whitespace is only allowed at the * end of unquoted urls. * Urls with `)` (as could happen with data: uris) should also be * quoted to avoid being confused for the url() closing parentheses. * And urls with a # have also been reported to cause issues. * Urls with quotes inside should also remain escaped. * * @see https://developer.mozilla.org/nl/docs/Web/CSS/url#The_url()_functional_notation * @see https://hg.mozilla.org/mozilla-central/rev/14abca4e7378 * @see https://github.com/matthiasmullie/minify/issues/193 */ $url = trim( $url ); if ( preg_match( '/[\s\)\'"#\x{7f}-\x{9f}]/u', $url ) ) { $url = $match['quotes'] . $url . $match['quotes']; } // build replacement. $search[] = $match[0]; if ( 'url' === $type ) { $replace[] = 'url(' . $url . ')'; } elseif ( 'import' === $type ) { $replace[] = '@import "' . $url . '"'; } } // replace urls. return str_replace( $search, $replace, $content ); } }
Fatal error: Trait 'WP_Rocket\Optimization\CSS\Path_Rewriter' not found in /home/payon/public_html/wp-content/plugins/wp-rocket/inc/Engine/Optimization/CacheDynamicResource.php on line 15