Quantcast
Channel: Topic Tag: error | WordPress.org
Viewing all articles
Browse latest Browse all 31591

ade11 on "[Plugin: Insert Headers and Footers] Error about wp_register_style"

$
0
0

With WP3.6, I get this error:

ihaf.php, line #19:
wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks.

It goes on to say this has been there since WP3.3...

It relates to loading admin's ihaf.css.

Moving the offending wp_register_style and wp_enqueue_style to the admin_init() function within your InsertHeadersAndFooters class clears the error, and still loads the ihaf.css, albeit quite early.

http://wordpress.org/plugins/insert-headers-and-footers/


Viewing all articles
Browse latest Browse all 31591

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>