• Resolved peterbreen

    (@peterbreen)


    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 to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wp_enqueue_scripts minor bug’ is closed to new replies.