Remove default css class with filter


Hello !

In the ThemeButler Child Theme, I've found this filter in the functions.php :

add_filter( 'nav_menu_css_class', '__return_false' );

I was wondering if there is a list of filters like this one, that could provide an easy way to remove some Beans css default classes ?

Thanks !

Mat


Hey Mat,

This is actually a WordPress filterΒ πŸ™‚ WP filters and actions are referenced in the WP codex.

Personally, when I look to modify something I look in the code and track back up to function where the value is set which basically leads me to the filter. If you see a filter or action in the code and you are not really sure what it does, Google it! The first result is usually the reference whether it is a Beans or WP hook.

If you ever get stuck, you are definitely on the right forum to ask for help πŸ™‚


Thank you for your very smart and cool reply to my silly question ! πŸ™‚

Mat


There is no such thing as silly questions!

Finding actions and filters is a very common task while building with WP and Beans and it is totally the right approach to avoid ugly hacks πŸ˜‰

Happy coding,

Write a reply

Login or register to write a reply, it's free!