Changeset 5562
- Timestamp:
- 05/27/2007 05:57:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-writing.php
r4977 r5562 32 32 <td><select name="default_category" id="default_category"> 33 33 <?php 34 $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");34 $categories = get_categories('get=all'); 35 35 foreach ($categories as $category) : 36 if ($category-> cat_ID== get_option('default_category')) $selected = " selected='selected'";36 if ($category->term_id == get_option('default_category')) $selected = " selected='selected'"; 37 37 else $selected = ''; 38 echo "\n\t<option value='$category-> cat_ID' $selected>$category->cat_name</option>";38 echo "\n\t<option value='$category->term_id' $selected>$category->name</option>"; 39 39 endforeach; 40 40 ?> … … 45 45 <td><select name="default_link_category" id="default_link_category"> 46 46 <?php 47 $categories = get_terms('link_category', 'get=all'); 47 48 foreach ($categories as $category) : 48 if ($category-> cat_ID== get_option('default_link_category')) $selected = " selected='selected'";49 if ($category->term_id == get_option('default_link_category')) $selected = " selected='selected'"; 49 50 else $selected = ''; 50 echo "\n\t<option value='$category-> cat_ID' $selected>$category->cat_name</option>";51 echo "\n\t<option value='$category->term_id' $selected>$category->name</option>"; 51 52 endforeach; 52 53 ?>
Note: See TracChangeset
for help on using the changeset viewer.