Changeset 3589 for trunk/wp-includes/template-functions-category.php
- Timestamp:
- 03/02/2006 03:27:48 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-category.php
r3582 r3589 140 140 } 141 141 return $chain; 142 }143 144 // Deprecated.145 function the_category_ID($echo = true) {146 // Grab the first cat in the list.147 $categories = get_the_category();148 $cat = $categories[0]->cat_ID;149 150 if ( $echo )151 echo $cat;152 153 return $cat;154 }155 156 // Deprecated.157 function the_category_head($before='', $after='') {158 global $currentcat, $previouscat;159 // Grab the first cat in the list.160 $categories = get_the_category();161 $currentcat = $categories[0]->category_id;162 if ( $currentcat != $previouscat ) {163 echo $before;164 echo get_the_category_by_ID($currentcat);165 echo $after;166 $previouscat = $currentcat;167 }168 142 } 169 143 … … 385 359 } 386 360 387 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=FALSE) {388 $query = "optionall=$optionall&all=$all&sort_column=$sort_column&sort_order=$sort_order&list=$list&optiondates=$optiondates&optioncount=$optioncount&hide_empty=$hide_empty&use_desc_for_title=$use_desc_for_title&child_of=$child_of&feed=$feed&feed_image=$feed_image&exclude=$exclude&hierarchical=$hierarchical";389 return wp_list_cats($query);390 }391 392 361 function in_category($category) { // Check if the current post is in the given category 393 362 global $category_cache, $post;
Note: See TracChangeset
for help on using the changeset viewer.