[RESOLVED] Notice: wp_enqueue_script was called incorrectly.
-
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'); 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.
The topic ‘[RESOLVED] Notice: wp_enqueue_script was called incorrectly.’ is closed to new replies.