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 |
---|---|
418 | * term name. |
419 | * |
420 | * @since 1.2.0 |
421 | * |
422 | * @see wp_dropdown_categories() |
423 | * |
424 | * @param string $element Category name. |
425 | * @param WP_Term|null $category The category object, or null if there's no corresponding category. |
426 | */ |
427 | $show_option_none = apply_filters( 'list_cats', $parsed_args['show_option_none'], null ); |
428 | $output .= "\t<option value='" . esc_attr( $option_none_value ) . "' selected='selected'>$show_option_none</option>\n"; |
429 | } |
430 |
|
431 | if ( ! empty( $categories ) ) { |
432 |
|
433 | if ( $parsed_args['show_option_all'] ) { |
434 |
|
435 | /** This filter is documented in wp-includes/category-template.php */ |
436 | $show_option_all = apply_filters( 'list_cats', $parsed_args['show_option_all'], null ); |
437 | $selected = ( '0' === (string) $parsed_args['selected'] ) ? " selected='selected'" : ''; |
438 | $output .= "\t<option value='0'$selected>$show_option_all</option>\n"; |
439 | } |
440 |
|
441 | if ( $parsed_args['show_option_none'] ) { |
442 |
|
443 | /** This filter is documented in wp-includes/category-template.php */ |
444 | $show_option_none = apply_filters( 'list_cats', $parsed_args['show_option_none'], null ); |
445 | $selected = selected( $option_none_value, $parsed_args['selected'], false ); |
446 | $output .= "\t<option value='" . esc_attr( $option_none_value ) . "'$selected>$show_option_none</option>\n"; |
447 | } |
448 |
|
449 | if ( $parsed_args['hierarchical'] ) { |
450 | $depth = $parsed_args['depth']; // Walk the full depth. |
451 | } else { |
452 | $depth = -1; // Flat. |
453 | } |