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 |
---|---|
699 | } |
700 |
|
701 | usort( $result, 'sort_cats' ); |
702 |
|
703 | return $result; |
704 | } |
705 |
|
706 | function write_nested_categories( $categories ) { |
707 | foreach ( $categories as $category ) { |
708 | echo '<li id="category-', $category['cat_ID'], '"><label for="in-category-', $category['cat_ID'], '" class="selectit"><input value="', $category['cat_ID'], '" type="checkbox" name="post_category[]" id="in-category-', $category['cat_ID'], '"', ($category['checked'] ? ' checked="checked"' : "" ), '/> ', wp_specialchars( apply_filters('the_category', $category['cat_name'] )), "</label></li>"; |
709 |
|
710 | if ( $category['children'] ) { |
711 | echo "<ul>\n"; |
712 | write_nested_categories( $category['children'] ); |
713 | echo "</ul>\n"; |
714 | } |
715 | } |
716 | } |
717 |
|