Ready to get started?Download WordPress


Slimbox Plugin
[RESOLVED] Notice: wp_enqueue_script was called incorrectly. (1 post)

  1. Zurd
    Posted 1 year ago #

    I just installed this plugin, I have debug at ON in wp-config.php and I saw this message :

    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.

    I was able to fix it by editing slimbox.php by adding this at the end:

    function thematic_enqueue_scripts() {
        wp_enqueue_script('jquery.slimbox', WP_PLUGIN_URL."/slimbox/javascript/jquery.slimbox.js", array('jquery'), '2.03');
        wp_enqueue_style('jquery.slimbox', WP_PLUGIN_URL."/slimbox/stylesheets/jquery.slimbox.css", false, '2.03');
    add_action('wp_enqueue_scripts', 'thematic_enqueue_scripts');

    I also removed the other lines at the end that we're doing this problem.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.