W3TC CDN Plugin custom paths with custom site_url
-
Hi,
We are having a problem with custom paths on the CDN section of the plugin. Since we have a custom dir for the wordpress installation and the content dir it’s outside the wordpress folder the CDN replace urls functions are not finding the plugins assets.
i.e. this file structure
//All wordpress files
/wordpress///content files
/content/plugins
/content/themesUsing this setup the site url used on line 921 of file Cdn_Plugin.php
$site_path = Util_Environment::site_url_uri();
will have this: “https://example.com/wordpress”
So if we have in the custom paths something like {plugins_dir}/*.jpg
The regexp would be looking on https://example.com/wordpres/content/plugins/*.jpg” when it should be “https://example.com/content/plugins/*.jpg.
Is it possible to have a filter call on line 1016 of file Cdn_Plugin.php
Util_Environment::preg_quote( $site_path ) . '(' .
Instead of that having something like:
Util_Environment::preg_quote( apply_filters( 'w3tc_custom_path_site_url', $site_path ) ) . '(' .
That way we can process the site url as needed?
Or even better have a filter outside the loop so that the filter is made only once. Thanks for a great plugin!
Best,
Aldo
- The topic ‘W3TC CDN Plugin custom paths with custom site_url’ is closed to new replies.