Fix Suggestion
-
Hi.
Thanks for the great plugin.
A small annoying bug.
When trying it with WP_DEBUG enable the plugin throws anNotice: 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
in order to fix this juct move the ~47-55 lines of rt-prettyphoto.php
/* Adding plugin javascript active file */ wp_enqueue_script('rt-wpp-plugin-active', RT_WPP_PLUGIN_PATH . 'js/jquery.prettyPhoto.js', array('jquery')); /* Adding plugin javascript active file */ wp_enqueue_script('rt-wpp-plugin-script-active', RT_WPP_PLUGIN_PATH . 'js/wpp-active.js', array('jquery')); /* Adding Plugin custm CSS file */ wp_enqueue_style('rt-wpp-plugin-style', RT_WPP_PLUGIN_PATH . 'css/prettyPhoto.css');
inside the function rt_wpp_latest_jquery().
Actually from this function you should delete the
wp_enqueue_script('jquery');
, cause you don’t need to do this.Bests Lena
- The topic ‘Fix Suggestion’ is closed to new replies.