Support » Plugin: WP Scripts & Styles Optimizer » Need this kind of improvement

  • Gulshan Kumar

    (@thegulshankumar)


    Hey,

    Why I tried this plugin? Because I wanted to keep TOC css in the footer, and no reason. But for one thing, I messed up with multiple things.

    1. I want that this plugin shouldn’t bother to show core admin script. Else, there should be a one click filter to hide it. Indeed, it forced me to set user level for core script, which I think it should do self.

    2. Another issue, I was just trying to keep jQuery in the head, but I don’t had need of jQuery migrate. So, I already removed it via functions.php but this plugin still load jQuery migrate which was not present before. Hence, this is a bug.

    Rest all, it’s awesome.

    Thanks & Regards,
    Gulshan

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hendrik Lersch

    (@riddler84)

    Hi Gulshan,
    thanks for your feedback.

    1. What you mean, when you say the plugin force you to set a user level? It’s just a notice that these JS or CSS files are located in the “wp-includes” folder and are most likely files that are enqueued by WordPress itself. But in fact they could be enqueued by any plugin too. What i want to say, it’s up to you, what you doing with these files. It’s just a warning message.

    2. Sadly it’s not a bug, but a needed behaviour in the way the plugin currently handles the de- and re-registering of files. jQuery is a special case, which i had to handle especially. The reason for that is, that in WordPress you can register a few scripts, in this case jquery-core and jquery-migrate and enqueue them at once by register an additional jquery handle and set the two registered jquery scripts as dependency values. If you then enqueue jquery, WordPress will force jquery-core and jquery-migrate to enqueue as well.

    I had to mimic this behaviour, otherwise things would be broken. But since jquery is not the only of this “special cases”, i had to find another, more flexible mechanic to handle these things, which will also solve a few other problems with planned features. The next minor version (which is almost a complete rewrite) will include this (and more).

    Best regards.

    Gulshan Kumar

    (@thegulshankumar)

    Thanks for the response.

    Kindly make your plugin simple like “Script to Footer” plugin. I am using this plugin right now, and truly it helps me for JS. But I wanted to use your plugin for CSS.

    I want that except style.css all should goes in the footer. Simple.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need this kind of improvement’ is closed to new replies.