johnbillion / query-monitor

The developer tools panel for WordPress

Home Page:https://querymonitor.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identify drop-ins as components

crstauf opened this issue · comments

Is it possible to identify drop-ins (ex: object-cache.php) as a component? My host's object cache drop-in has a deprecated warning, and I'm trying to silence it.

Oh, I guess I could set component as other and then full path to wp-content/object-cache.php as the context. Trying that now.

Yep, that appears to have worked. Would be nice to have drop-ins identified as components still.

Yeah that should be possible.

Drop-ins have to live at WP_CONTENT_DIR/{name}.php so the path is known.

Hmm, QM_Util defines files in WP_CONTENT_DIR as other. Is changing other to dropin all that needs to be done, or add a more specific qualifier?

self::$file_dirs['other'] = WP_CONTENT_DIR;

Good question. A file in the root of that directory is likely to be a drop-in, but not certain. QM could probably use _get_dropins() (or a copy of its file list) to be sure.