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