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 |
---|---|
56 | * See wp_dropdown_categories(). |
57 | * @param int $current_object_id Optional. ID of the current category. Default 0. |
58 | */ |
59 | public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { |
60 | // Restores the more descriptive, specific name for use within this method. |
61 | $category = $data_object; |
62 | $pad = str_repeat( ' ', $depth * 3 ); |
63 |
|
64 | /** This filter is documented in wp-includes/category-template.php */ |
65 | $cat_name = apply_filters( 'list_cats', $category->name, $category ); |
66 |
|
67 | if ( isset( $args['value_field'] ) && isset( $category->{$args['value_field']} ) ) { |
68 | $value_field = $args['value_field']; |
69 | } else { |
70 | $value_field = 'term_id'; |
71 | } |
72 |
|
73 | $output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . '"'; |
74 |
|