Title: Fix Suggestion
Last modified: August 21, 2016

---

# Fix Suggestion

 *  [lenasterg](https://wordpress.org/support/users/lenasterg/)
 * (@lenasterg)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/fix-suggestion/)
 * Hi.
    Thanks for the great plugin. A small annoying bug. When trying it with WP_DEBUG
   enable the plugin throws an `Notice: wp_enqueue_script was called incorrectly.
   Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts,
   admin_enqueue_scripts, or init hooks`
 * in order to fix this juct move the ~47-55 lines of rt-prettyphoto.php
 *     ```
       /* Adding plugin javascript active file */
           wp_enqueue_script('rt-wpp-plugin-active', RT_WPP_PLUGIN_PATH . 'js/jquery.prettyPhoto.js', array('jquery'));
           /* Adding plugin javascript active file */
           wp_enqueue_script('rt-wpp-plugin-script-active', RT_WPP_PLUGIN_PATH . 'js/wpp-active.js', array('jquery'));
   
           /* Adding Plugin custm CSS file */
           wp_enqueue_style('rt-wpp-plugin-style', RT_WPP_PLUGIN_PATH . 'css/prettyPhoto.css');
       ```
   
 * inside the function rt_wpp_latest_jquery().
    Actually from this function you 
   should delete the `wp_enqueue_script('jquery');` , cause you don’t need to do
   this.
 * Bests Lena
 * [http://wordpress.org/plugins/rt-prettyphoto/](http://wordpress.org/plugins/rt-prettyphoto/)

The topic ‘Fix Suggestion’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/rt-prettyphoto_563e3c.svg)
 * [Royal PrettyPhoto](https://wordpress.org/plugins/rt-prettyphoto/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rt-prettyphoto/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rt-prettyphoto/)
 * [Active Topics](https://wordpress.org/support/plugin/rt-prettyphoto/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rt-prettyphoto/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rt-prettyphoto/reviews/)

## Tags

 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * 0 replies
 * 1 participant
 * Last reply from: [lenasterg](https://wordpress.org/support/users/lenasterg/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/fix-suggestion/)
 * Status: not resolved