Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37177
    Miguel Muscat
    Guest

    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

    #37184
    Marko Vasiljevic
    Keymaster

    Hello 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!

    #37839
    Miguel
    Guest

    Hi Marko.

    Sure, here are the links:

    https://spotlightwp.com
    https://wordpress.org/plugins/spotlight-social-photo-feeds

    Yes. 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!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Plugin integration for JS minification’ is closed to new replies.