wp_register_style & wp_enqueue_style called incorrectly
-
Hi there,
Thanks for all your effort in putting together this plugin.
I found an issue and thought I should report it. Although this may not be an actual problem for most users, when using this plugin on a development server with xdebug enabled, a notice is thrown by WordPress. The notice is the following:
Notice: wp_register_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.ww.wp.xz.cn/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.)The notice comes from lines 9 and 10 in the wcff-options class. You’re actually registering and enqueuing the style without putting it in one of the hooks mentioned in the notice above, so that’s where the problem is.
The topic ‘wp_register_style & wp_enqueue_style called incorrectly’ is closed to new replies.