Changeset 5642
- Timestamp:
- 06/03/2007 05:28:27 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/link-manager.php
r5523 r5642 77 77 <form id="cats" method="get" action=""> 78 78 <p><?php 79 $categories = get_ categories("hide_empty=1&type=link");79 $categories = get_terms('link_category', "hide_empty=1"); 80 80 $select_cat = "<select name=\"cat_id\">\n"; 81 81 $select_cat .= '<option value="all"' . (($cat_id == 'all') ? " selected='selected'" : '') . '>' . __('All') . "</option>\n"; 82 82 foreach ((array) $categories as $cat) 83 $select_cat .= '<option value="' . $cat-> cat_ID . '"' . (($cat->cat_ID == $cat_id) ? " selected='selected'" : '') . '>' . wp_specialchars(apply_filters('link_category', $cat->cat_name)) . "</option>\n";83 $select_cat .= '<option value="' . $cat->term_id . '"' . (($cat->term_id == $cat_id) ? " selected='selected'" : '') . '>' . wp_specialchars(apply_filters('link_category', $cat->name)) . "</option>\n"; 84 84 $select_cat .= "</select>\n"; 85 85 -
trunk/wp-includes/category.php
r5599 r5642 13 13 14 14 function &get_categories($args = '') { 15 // TODO Add back compat fields into each object. 16 // Set taxonomy to link_category if type=link 17 return get_terms('category', $args); 15 $defaults = array('type' => 'category'); 16 $args = wp_parse_args($args, $defaults); 17 18 $taxonomy = 'category'; 19 if ( 'link' == $args['type'] ) 20 $taxonomy = 'link_category'; 21 return get_terms($taxonomy, $args); 18 22 } 19 23
Note: See TracChangeset
for help on using the changeset viewer.