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 |
---|---|
352 | $tab_index_attribute = " tabindex=\"$tab_index\""; |
353 |
|
354 | $categories = get_categories( $r ); |
355 |
|
356 | $output = ''; |
357 | if ( ! empty( $categories ) ) { |
358 | $output = "<select name='$name' id='$name' class='$class' $tab_index_attribute>\n"; |
359 |
|
360 | if ( $show_option_all ) { |
361 | $show_option_all = apply_filters( 'list_cats', $show_option_all ); |
362 | $selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : ''; |
363 | $output .= "\t<option value='0'$selected>$show_option_all</option>\n"; |
364 | } |
365 |
|
366 | if ( $show_option_none ) { |
367 | $show_option_none = apply_filters( 'list_cats', $show_option_none ); |
368 | $selected = ( '-1' === strval($r['selected']) ) ? " selected='selected'" : ''; |
369 | $output .= "\t<option value='-1'$selected>$show_option_none</option>\n"; |
370 | } |
371 |
|
372 | if ( $hierarchical ) |
373 | $depth = $r['depth']; // Walk the full depth. |
374 | else |
375 | $depth = -1; // Flat. |
376 |
|