Title: Code Injection
Last modified: August 9, 2018

---

# Code Injection

 *  Resolved [Florian Ziegler](https://wordpress.org/support/users/florianziegler/)
 * (@florianziegler)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/code-injection-6/)
 * Hey guys,
 * I realized your “resource manager” is injecting code after the output is generated.
 * I am not sure this is ok.
 * If you want to do it that way, couldn’t you at least check if any of “your stuff”
   is supposed to be loaded? (Eg. if one of your galleries is used on a page.)
 * To clarify: We have a post type and corresponding template in our plugin picu
   that doesn’t need any of your styles and scripts. We should not be forced to 
   use a filter or define a constant to prevent your plugin from injecting code 
   into our output.
 * We would very much appreciate if you’d fix this. Thanks!
 * Cheers
    Florian

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

 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/code-injection-6/#post-10597713)
 * Hi [@florianziegler](https://wordpress.org/support/users/florianziegler/) –
 * We understand your concern and we apologize for the inconvenience. We have a 
   handful of features that make detection impossible or very difficult, for example;
   users can use our NextGEN Lightbox to open not just our galleries, but WordPress
   Media images as well and this would require the resource manager to load. The
   resource manager exists because there is a lot of WordPress Themes with badly
   written code, and so we rely on this workaround to keep our plugin loading as
   smoothly as possible. Our hope is that when gutenberg becomes the standard we
   can drop the resource and shortcode managers entirely. We appreciate your patience
   and understanding on this, [@florianziegler](https://wordpress.org/support/users/florianziegler/).
   🙂
 * – Becky
 *  Thread Starter [Florian Ziegler](https://wordpress.org/support/users/florianziegler/)
 * (@florianziegler)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/code-injection-6/#post-10620965)
 * Hey Becky,
 * thanks for getting back to us.
 * We have issues with those poorly written themes as well, so I understand where
   you are coming from. And I get that you guys have thousands of installs and probably
   a huge amount of support requests because of theme incompatibilities.
 * But, while it might be practical for you, in turn it causes problems for other
   plugins (like ours), whereas proper enqueuing and dequeuing of stylesheets and
   scripts does not.
 * At least you provide a filter that we can use to disable the resource manger 
   for our post type. 🙂
 * Best
    Florian

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

The topic ‘Code Injection’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Florian Ziegler](https://wordpress.org/support/users/florianziegler/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/code-injection-6/#post-10620965)
 * Status: resolved