• iltaen

    (@iltaen)


    Hello,

    Firstly, thanks for awesome plugin!

    But I found small bug: when I enable “WP_DEBUG” mode and activate your plugin, I see this message:

    Notice: 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.

    I tried to fix it:
    I open the fontawesome.php file and move lines

    wp_register_style( ‘fontawesone-admin-style’, FONTAW_URL.’css/font-awesome.css’, array(), FONTAW_VERSION );
    wp_enqueue_style( ‘fontawesone-admin-style’ );

    into the “add_button()” function (to bottom) and it’s work fine now, but I’m not sure that it’s good solution.

    I hope you check this and update the plugin 🙂

    Thanks,
    iltaen

    https://wordpress.org/plugins/incredible-font-awesome/

Viewing 1 replies (of 1 total)
  • KTS915

    (@kts915)

    @iltaen Thanks for this tip!

    I think there is also a typo: in the above functions, fontawesone should be fontawesome.

    Note that this happens twice.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_register_style was called incorrectly’ is closed to new replies.