Coder Social home page Coder Social logo

Comments (3)

johnbillion avatar johnbillion commented on September 27, 2024

I would expect that most plugins that use the admin_enqueue_scripts hook enqueue scripts without checking for DOING_AJAX. Therefore the problem you're seeing with Query Monitor will also be seen in many other plugins that enqueue and localise scripts.

Unfortunately, this sounds like something your plugin needs to handle, rather than each individual plugin that enqueues scripts. What do you think?

from query-monitor.

thefuxia avatar thefuxia commented on September 27, 2024

Hm, yes, I could (and will probably) flush all existing registered scripts on $GLOBALS['wp_scripts']. But normally, plugins enqueue their scripts on the hook that is made for that: admin_enqueue_scripts, wp_enqueue_scripts, login_enqueue_scripts or customize_controls_enqueue_scripts. This is why QM was the only plugin adding its scripts to my plugin output.

Right now, QM enqueues its script on init. This is way too early, it doesnโ€™t even wait for the spam blog check. It should use the proper hooks to avoid side effects.

from query-monitor.

johnbillion avatar johnbillion commented on September 27, 2024

Ah you're right. Not sure how I missed that one! I'll get it fixed in the next version.

from query-monitor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.