Title: debug notices &#8211; wp_register_script was called incorrectly
Last modified: August 21, 2016

---

# debug notices – wp_register_script was called incorrectly

 *  [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [12 years ago](https://wordpress.org/support/topic/debug-notices-wp_register_script-was-called-incorrectly/)
 * Please update your plugin like this:
 *     ```
       function reg_scripts() {
           $script_path = $this->plugin_url . '/javascripts/jquery.colorbox-min.js';
           wp_register_script( 'colorbox', $script_path, array('jquery') );
       }
       function add_filters_and_hooks() {
           add_action('wp_enqueue_scripts', array( $this, 'reg_scripts' ));
       ```
   
 * [https://wordpress.org/plugins/smart-youtube/](https://wordpress.org/plugins/smart-youtube/)

The topic ‘debug notices – wp_register_script was called incorrectly’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/smart-youtube_cccccc.svg)
 * [Smart YouTube PRO](https://wordpress.org/plugins/smart-youtube/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-youtube/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-youtube/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-youtube/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-youtube/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-youtube/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/debug-notices-wp_register_script-was-called-incorrectly/)
 * Status: not resolved