Minifying with virtually changed plugin/theme dir
-
Hi, I’ve got a little question:
I’m using a htaccess and php-script that changes (virtually) the locations of my plugin and theme directory from
/wp-content/plugins/plugin-name/
to/plugin/plugin-name/
and from/wp-content/themes/active-theme-name/assets/*
to/assets/*
Sadly the minifying function only sees the changed version of the inclusion paths.
Is there any chance to teach the plugin to use the original paths?the code in my htaccess is like follows:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^assets/(.*) /wp-content/themes/theme-name/assets/$1 [QSA,L] RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
The function to enable the rewrites can be found here: https://github.com/roots/roots/blob/6.5.0/lib/rewrites.php
I hope, I supplied all the information needed – and that there is a solution for my Problem.
- The topic ‘Minifying with virtually changed plugin/theme dir’ is closed to new replies.