Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: link_category

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
217           //Split the bookmarks into ul's for each category
218           $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));
219
220           foreach ( (array) $cats as $cat ) {
221                $params = array_merge($r, array('category'=>$cat->term_id));
222                $bookmarks = get_bookmarks($params);
223                if ( empty($bookmarks) )
224                     continue;
225                $output .= str_replace(array('%id', '%class'), array("linkcat-$cat->term_id", $class), $category_before);
226                $catname = apply_filters( "link_category", $cat->name );
227                $output .= "$title_before$catname$title_after\n\t<ul class='xoxo blogroll'>\n";
228                $output .= _walk_bookmarks($bookmarks, $r);
229                $output .= "\n\t</ul>\n$category_after\n";
230           }
231      } else {
232           //output one single list using title_li for the title
233           $bookmarks = get_bookmarks($r);
234
235           if ( !empty($bookmarks) ) {