- AuthorPosts
- May 3, 2021 at 9:42 am #37177Miguel MuscatGuest
Hi there,
We’d like to have our plugins automatically add JS files to be excluded from minification to make our plugins be automatically compatible with W3 Total Cache, as currently they are not. Our JS is already minified and minifying it twice causes JS syntax errors in the browser.
Does W3 Total Cache have any WordPress filters or an integration API that can allow us to register its JS files to be excluded from minification?
Thanks
May 3, 2021 at 10:00 am #37184Marko VasiljevicKeymasterHello Miguel,
Thank you for reaching out, and for your interest in integrating with W3 Total Cache!
I am happy to help you with this. Can you please share the URL of the plugin you are referring to and please let me know if the use case for this is that once both plugins are installed, the mentioned JS files should be automatically excluded from minifying if the Minify is active?
Thanks!May 14, 2021 at 8:34 am #37839MiguelGuestHi Marko.
Sure, here are the links:
– https://spotlightwp.com
– https://wordpress.org/plugins/spotlight-social-photo-feedsYes. We want to have our plugin’s JS files be automatically added to W3 Total Cache’s list of minify exclusions, preferably as “hidden” exclusions that are added programmatically at runtime, rather than appending the values to the saved list in the database.
The reason is that we want to have the freedom to rename, move or delete our JS files without worrying about outdated exclusions. It’s much easier if our plugin just hooks into W3 Total Cache to add the exclusions that are appropriate for that particular version of our plugin. This is also why we want the integration to be from our end, rather than from W3 Total Cache’s end.
I hope that made sense!
- AuthorPosts
- The topic ‘Plugin integration for JS minification’ is closed to new replies.