PHP Notice
-
Hi, when in WP debuging mode, in plugin overview, I’ll get following notice:
Notice: wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until thewp_enqueue_scripts,admin_enqueue_scripts, orlogin_enqueue_scriptshooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.)UPDATE:
You should enqueue styles and script ideally with a hook, see here: https://codex.wordpress.org/Function_Reference/wp_enqueue_script#Using_a_Hook
I’ve fixed that for you, could you please update your plugin?
4 changed files you’ll find here
The topic ‘PHP Notice’ is closed to new replies.