Support » Plugin: Insert Headers and Footers » Error about wp_register_style

  • 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.

  • The topic ‘Error about wp_register_style’ is closed to new replies.