Title: Please stop using the wp_print_scripts action hook to load your javascript
Last modified: August 20, 2016

---

# Please stop using the wp_print_scripts action hook to load your javascript

 *  [Chris Olbekson](https://wordpress.org/support/users/c3mdigital/)
 * (@c3mdigital)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/please-stop-using-the-wp_print_scripts-action-hook-to-load-your-javascript/)
 * This plugin is using the wp_print_scripts and wp_print_styles action hooks to
   load all javascript and css. wp_print_scripts fires on every page load which 
   causes all your javascript to load everywhere including every single admin page.
 * Please read [http://make.wordpress.org/core/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/](http://make.wordpress.org/core/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/)
   
   and update your plugin to use the admin_enqueue_scripts hook for you admin side
   javascript and wp_enqueue_scripts for your front facing javascript.
 * Thank you,
 * [http://wordpress.org/extend/plugins/wp-lightbox-2/](http://wordpress.org/extend/plugins/wp-lightbox-2/)

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

 *  [Pankaj Jha](https://wordpress.org/support/users/masdiblogs/)
 * (@masdiblogs)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/please-stop-using-the-wp_print_scripts-action-hook-to-load-your-javascript/#post-3458143)
 * Hi Chris Olbekson, thanks for for your advice. I will fix in next release !
 *  [Pankaj Jha](https://wordpress.org/support/users/masdiblogs/)
 * (@masdiblogs)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/please-stop-using-the-wp_print_scripts-action-hook-to-load-your-javascript/#post-3458159)
 * That Chris Olbekson,
 * I release the fix for this WP Lightbox 2 (version 2.28).
 * Thanks for the great suggestion.

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

The topic ‘Please stop using the wp_print_scripts action hook to load your javascript’
is closed to new replies.

 * ![](https://ps.w.org/wp-lightbox-2/assets/icon-128x128.png?rev=1093845)
 * [WP Lightbox 2](https://wordpress.org/plugins/wp-lightbox-2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-lightbox-2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-lightbox-2/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-lightbox-2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-lightbox-2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-lightbox-2/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Pankaj Jha](https://wordpress.org/support/users/masdiblogs/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/please-stop-using-the-wp_print_scripts-action-hook-to-load-your-javascript/#post-3458159)
 * Status: not a support question