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 |
---|---|
405 | * term name. |
406 | * |
407 | * @since 1.2.0 |
408 | * |
409 | * @see wp_dropdown_categories() |
410 | * |
411 | * @param string $element Category name. |
412 | * @param WP_Term|null $category The category object, or null if there's no corresponding category. |
413 | */ |
414 | $show_option_none = apply_filters( 'list_cats', $r['show_option_none'], null ); |
415 | $output .= "\t<option value='" . esc_attr( $option_none_value ) . "' selected='selected'>$show_option_none</option>\n"; |
416 | } |
417 |
|
418 | if ( ! empty( $categories ) ) { |
419 |
|
420 | if ( $r['show_option_all'] ) { |
421 |
|
422 | /** This filter is documented in wp-includes/category-template.php */ |
423 | $show_option_all = apply_filters( 'list_cats', $r['show_option_all'], null ); |
424 | $selected = ( '0' === strval( $r['selected'] ) ) ? " selected='selected'" : ''; |
425 | $output .= "\t<option value='0'$selected>$show_option_all</option>\n"; |
426 | } |
427 |
|
428 | if ( $r['show_option_none'] ) { |
429 |
|
430 | /** This filter is documented in wp-includes/category-template.php */ |
431 | $show_option_none = apply_filters( 'list_cats', $r['show_option_none'], null ); |
432 | $selected = selected( $option_none_value, $r['selected'], false ); |
433 | $output .= "\t<option value='" . esc_attr( $option_none_value ) . "'$selected>$show_option_none</option>\n"; |
434 | } |
435 |
|
436 | if ( $r['hierarchical'] ) { |
437 | $depth = $r['depth']; // Walk the full depth. |
438 | } else { |
439 | $depth = -1; // Flat. |
440 | } |