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

  1. Zurd
    Posted 3 years 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

  • Slimbox Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.