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.
Line | Code |
---|---|
52 | * @param int $depth Depth of category. Used for padding. |
53 | * @param array $args Uses 'selected', 'show_count', and 'value_field' keys, if they exist. |
54 | * See wp_dropdown_categories(). |
55 | * @param int $id Optional. ID of the current category. Default 0 (unused). |
56 | */ |
57 | public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { |
58 | $pad = str_repeat( ' ', $depth * 3 ); |
59 |
|
60 | /** This filter is documented in wp-includes/category-template.php */ |
61 | $cat_name = apply_filters( 'list_cats', $category->name, $category ); |
62 |
|
63 | if ( isset( $args['value_field'] ) && isset( $category->{$args['value_field']} ) ) { |
64 | $value_field = $args['value_field']; |
65 | } else { |
66 | $value_field = 'term_id'; |
67 | } |
68 |
|
69 | $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . '"'; |
70 |
|