Title: Getting an info message
Last modified: August 21, 2016

---

# Getting an info message

 *  [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/getting-an-info-message/)
 * Getting this message:
 * ( ! ) Notice: wp_register_script was called **incorrectly**. Scripts and styles
   should not be registered or enqueued until the `wp_enqueue_scripts`, `admin_enqueue_scripts`,
   or `login_enqueue_scripts` hooks.
 * Please see [Debugging in WordPress](http://codex.wordpress.org/Debugging_in_WordPress)
   for more information. (This message was added in version 3.3.) in …\wp-includes\
   functions.php on line 3049
 * The traceback implicates tpcmem.php line 95.
 * [https://wordpress.org/plugins/tpc-memory-usage/](https://wordpress.org/plugins/tpc-memory-usage/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/getting-an-info-message/#post-4852204)
 * This change to tcpmem.php fixes the information warning.
 *     ```
       // Add script-registration action
       add_action( 'init', 'tcpmem_enqueue_scripts' );
   
       function tcpmem_enqueue_scripts () {
           // Register scripts and styles
           wp_register_script('tpcmem', plugins_url('tpc-memory-usage/js/tpcmem.js'), array('jquery'), TPCMEM_VERSION, true);
           wp_register_script('tpcmem-overview', plugins_url('tpc-memory-usage/js/overview.js'), array('jquery-ui-tabs'), TPCMEM_VERSION, true);
           wp_register_script('tpcmem-tablesorter', plugins_url('tpc-memory-usage/js/jquery.tablesorter.min.js'), array('jquery'), '2.0.3', true);
           wp_register_script('tpcmem-reports', plugins_url('tpc-memory-usage/js/reports.js'), array('tpcmem-tablesorter'), TPCMEM_VERSION, true);
           wp_register_style('tpcmem', plugins_url('tpc-memory-usage/css/tpcmem.css'), array(), TPCMEM_VERSION);
       }
       ```
   
 * Note that the dashboard doesn’t work correctly if you use
 * `add_action( 'wp_enqueue_scripts', 'tcpmem_enqueue_scripts' );`
 * instead of
 * `add_action( 'init', 'tcpmem_enqueue_scripts' );`

Viewing 1 replies (of 1 total)

The topic ‘Getting an info message’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/tpc-memory-usage.svg)
 * [TPC! Memory Usage](https://wordpress.org/plugins/tpc-memory-usage/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tpc-memory-usage/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tpc-memory-usage/)
 * [Active Topics](https://wordpress.org/support/plugin/tpc-memory-usage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tpc-memory-usage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tpc-memory-usage/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [OllieJones](https://wordpress.org/support/users/olliejones/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/getting-an-info-message/#post-4852204)
 * Status: not resolved