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 |
|---|---|
| 97 | * @param array $args Optional. An array of arguments. See wp_list_categories(). |
| 98 | * Default empty array. |
| 99 | * @param int $current_object_id Optional. ID of the current category. Default 0. |
| 100 | */ |
| 101 | public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { |
| 102 | // Restores the more descriptive, specific name for use within this method. |
| 103 | $category = $data_object; |
| 104 | |
| 105 | /** This filter is documented in wp-includes/category-template.php */ |
| 106 | $cat_name = apply_filters( 'list_cats', esc_attr( $category->name ), $category ); |
| 107 | |
| 108 | // Don't generate an element if the category name is empty. |
| 109 | if ( '' === $cat_name ) { |
| 110 | return; |
| 111 | } |
| 112 | |
| 113 | $atts = array(); |
| 114 | $atts['href'] = get_term_link( $category ); |
| 115 | |