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 3 times in this file.
Line | Code |
---|---|
435 | * 'show_option_none', 'show_option_all', and various forms of the |
436 | * term name. |
437 | * |
438 | * @since 1.2.0 |
439 | * |
440 | * @see wp_dropdown_categories() |
441 | * |
442 | * @param string $element Taxonomy element to list. |
443 | */ |
444 | $show_option_none = apply_filters( 'list_cats', $r['show_option_none'] ); |
445 | $output .= "\t<option value='" . esc_attr( $option_none_value ) . "' selected='selected'>$show_option_none</option>\n"; |
446 | } |
447 |
|
448 | if ( ! empty( $categories ) ) { |
449 |
|
450 | if ( $r['show_option_all'] ) { |
451 |
|
452 | /** This filter is documented in wp-includes/category-template.php */ |
453 | $show_option_all = apply_filters( 'list_cats', $r['show_option_all'] ); |
454 | $selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : ''; |
455 | $output .= "\t<option value='0'$selected>$show_option_all</option>\n"; |
456 | } |
457 |
|
458 | if ( $r['show_option_none'] ) { |
459 |
|
460 | /** This filter is documented in wp-includes/category-template.php */ |
461 | $show_option_none = apply_filters( 'list_cats', $r['show_option_none'] ); |
462 | $selected = selected( $option_none_value, $r['selected'], false ); |
463 | $output .= "\t<option value='" . esc_attr( $option_none_value ) . "'$selected>$show_option_none</option>\n"; |
464 | } |
465 |
|
466 | if ( $r['hierarchical'] ) { |
467 | $depth = $r['depth']; // Walk the full depth. |
468 | } else { |
469 | $depth = -1; // Flat. |
470 | } |