Title: wp_enqueue_scripts minor bug
Last modified: January 3, 2018

---

# wp_enqueue_scripts minor bug

 *  Resolved [peterbreen](https://wordpress.org/support/users/peterbreen/)
 * (@peterbreen)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-minor-bug/)
 * Hi. Thanks so much for making this plugin. It’s worked really well for us.
 * I think I found a minor bug. It might have only started with one of the new WordPress
   versions. With debug mode on, I get the following error at the top of the admin:
 * Notice: wp_enqueue_style 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 for more information.(
   This message was added in version 3.3.0.) in /var/www/dev2/public_html/wp-includes/
   functions.php on line 4146.
 * I replaced line 42 of the main plugin file with:
 * add_action(‘enqueue’, ‘wp_enqueue_scripts’);
    function enqueue() { wp_enqueue_style(‘
   modern_footnotes’, plugin_dir_url(__FILE__) . ‘styles.min.css’, array(), ‘1.1.0’);
   wp_enqueue_script(‘modern_footnotes’, plugin_dir_url(__FILE__) . ‘modern-footnotes.
   min.js’, array(‘jquery’), ‘1.1.0’, TRUE); }
 * This resolved the problem!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwp_enqueue_scripts-minor-bug%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [prismtechstudios](https://wordpress.org/support/users/prismtechstudios/)
 * (@prismtechstudios)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-minor-bug/#post-9840635)
 * Thank you for catching this! I’ve got this fixed in the newest version, which
   I just released.

Viewing 1 replies (of 1 total)

The topic ‘wp_enqueue_scripts minor bug’ is closed to new replies.

 * ![](https://ps.w.org/modern-footnotes/assets/icon-128x128.jpg?rev=1634981)
 * [Modern Footnotes](https://wordpress.org/plugins/modern-footnotes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/modern-footnotes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/modern-footnotes/)
 * [Active Topics](https://wordpress.org/support/plugin/modern-footnotes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/modern-footnotes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/modern-footnotes/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [prismtechstudios](https://wordpress.org/support/users/prismtechstudios/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/wp_enqueue_scripts-minor-bug/#post-9840635)
 * Status: resolved