• Resolved polyfade

    (@polyfade)


    I am trying to remove the infamous bloat WordPress adds by removing unnecessary styles and scripts. Dashicons is one of those items. So I added the snippet to my theme.

    add_action('wp_print_styles', __NAMESPACE__ . '\\remove_dashicons', 100);
    
    function remove_dashicons()
    {
        if (!is_admin_bar_showing() && !is_customize_preview()) {
            wp_dequeue_style('dashicons');
            wp_deregister_style('dashicons');
        }
    }

    I can understand why dashicons might be required on the admin side, but why does Ninja Forms require dashicons on the client side?

    • This topic was modified 2 years, 5 months ago by polyfade.
    • This topic was modified 2 years, 5 months ago by polyfade.
Viewing 1 replies (of 1 total)
  • Yup, encountered the same issue as you. Ninja Forms won’t load its styles if you dequeue dashicons styles for anonymous users.

Viewing 1 replies (of 1 total)
  • The topic ‘Why does Ninja forms still require dashicons on the client side?’ is closed to new replies.