• Resolved retroriff

    (@retroriff)


    Hello,

    I have disabled in my theme unnecessary scripts and css from plugins. They affect my performance and therefore it’s better to unregister them usign wp wp_dequeue_script and wp_deregister_style.

    However query Monitor marks with red flag that these scripts are missing. It would be great to disable this feature because it shouldn’t be noticed. Is it possible that the plugin could check that those attachments have been disabled by custom child theme?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the message.

    If you deregister a script without also unenqueueing it then QM is quite right to point out that something is broken.

    You should be able to just unenqueue scripts without deregistering them (or do both).

    Thread Starter retroriff

    (@retroriff)

    Great, that works. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disable Missing Scripts when they are deregistered’ is closed to new replies.