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