WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my attempt to alter navigations current-menu-item class, I found a possible solution http://stackoverflow.com/a/7941864/520265 ,

add_filter('nav_menu_css_class', 'my_css_attributes_filter', 100, 1);

He makes use of a filter who is called with a tag 'nav_menu_css_class' , But it got me wondering, where can you find information about what filters are available to use?

http://codex.wordpress.org/Function_Reference/wp_nav_menu does not mention anything about filters...

share|improve this question
up vote 4 down vote accepted

There are multiple was to find filters:

  1. Use an IDE (see Eclipse example), set WordPress as a separate project and search in this project for apply_filters or do_action.

  2. Get a program to search in all files of a directory (grep, Notepad++) and do the same search with that.

  3. Read the source code. If you start with wp_nav_menu() and follow the functions called in its definition you will find the filters and actions you need.

share|improve this answer
Great, source code it is , thanks! (will accept in couple of minutes) – David Dec 15 '12 at 19:52
Try grin, it's the best way to read source code IMHO :) (if on Linux, just install it from your package manager) – webaware Dec 16 '12 at 2:50

Some of the available filters are listed in the WordPress Codex

Adam Brown hosts a much more complete list of action and filter hooks.

You can also search through the source, as @toscho mentioned.

share|improve this answer
usefull link, thanks! – David Dec 16 '12 at 6:59

Also you can use the plugin Debug Objects; the plugin list action and filter hooks on the current page or all hooks.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.