WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 233 | $tab_index_attribute = " tabindex=\"$tab_index\""; |
| 234 | |
| 235 | $categories = get_categories($r); |
| 236 | |
| 237 | $output = ''; |
| 238 | if ( ! empty($categories) ) { |
| 239 | $output = "<select name='$name' id='$name' class='$class' $tab_index_attribute>\n"; |
| 240 | |
| 241 | if ( $show_option_all ) { |
| 242 | $show_option_all = apply_filters('list_cats', $show_option_all); |
| 243 | $output .= "\t<option value='0'>$show_option_all</option>\n"; |
| 244 | } |
| 245 | |
| 246 | if ( $show_option_none) { |
| 247 | $show_option_none = apply_filters('list_cats', $show_option_none); |
| 248 | $output .= "\t<option value='-1'>$show_option_none</option>\n"; |
| 249 | } |
| 250 | |
| 251 | if ( $hierarchical ) |
| 252 | $depth = $r['depth']; // Walk the full depth. |
| 253 | else |
| 254 | $depth = -1; // Flat. |
| 255 | |
| 256 | $output .= walk_category_dropdown_tree($categories, $depth, $r); |