Do not inject WordPress styles when not the active theme (and fix active theme detection)
Based on !11 (closed) by @haystack
- Adds a condition before injection the custom CSS in the hook config
- Provides a workaround in the
isActive
function, because frontend page detection is not reliable for WP (I tried to debug, but the core code is weird) - Adds a comment in the CSS so that people can guess where it is from (I can imagine this must have caused some frustration to hunt down)