Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: category_description

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

This hook occurs 2 times in this file.

Line Code
169           $previouscat = $currentcat;
170      }
171 }
172
173 function category_description($category = 0) {
174      global $cat;
175      if ( !$category )
176           $category = $cat;
177      $category = & get_category($category);
178      return apply_filters('category_description', $category->category_description, $category->cat_ID);
179 }
180
181 // out of the WordPress loop
182 function dropdown_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc',
183           $optiondates = 0, $optioncount = 0, $hide_empty = 1, $optionnone=FALSE,
184           $selected=0, $hide=0) {
185      global $wpdb;
186      if ( ($file == 'blah') || ($file == '') )
187           $file = get_settings('home') . '/';
 
Line Code
320      $thelist = "";
321
322      foreach ( (array) $categories as $category ) {
323           if ( ( intval($hide_empty) == 0 || $category->category_count) && (!$hierarchical || $category->category_parent == $child_of) ) {
324                $num_found++;
325                $link = '<a href="'.get_category_link($category->cat_ID).'" ';
326                if ( $use_desc_for_title == 0 || empty($category->category_description) )
327                     $link .= 'title="'. sprintf(__("View all posts filed under %s"), attribute_escape($category->cat_name)) . '"';
328                else
329                     $link .= 'title="' . attribute_escape(apply_filters('category_description',$category->category_description,$category)) . '"';
330                $link .= '>';
331                $link .= apply_filters('list_cats', $category->cat_name, $category).'</a>';
332
333                if ( (! empty($feed_image)) || (! empty($feed)) ) {
334
335                     $link .= ' ';
336
337                     if ( empty($feed_image) )
338                          $link .= '(';