Changeset 2890 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 09/19/2005 12:47:58 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r2889 r2890 518 518 $link->link_rss = wp_specialchars($link->link_rss); 519 519 520 return $link; 521 } 522 523 function get_default_link_to_edit() { 524 if ( isset($_GET['linkurl']) ) 525 $link->link_url = wp_specialchars($_GET['linkurl'], 1); 526 else 527 $link->link_url = ''; 528 529 if ( isset($_GET['name']) ) 530 $link->link_name = wp_specialchars($_GET['name'], 1); 531 else 532 $link->link_name = ''; 533 520 534 return $link; 521 535 } … … 800 814 } 801 815 816 function link_category_dropdown($fieldname, $selected = 0) { 817 global $wpdb; 818 819 $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle FROM $wpdb->linkcategories ORDER BY cat_id"); 820 echo "\n<select name='$fieldname' size='1'>\n"; 821 foreach ($results as $row) { 822 echo "\n\t<option value='$row->cat_id'"; 823 if ($row->cat_id == $selected) 824 echo " selected='selected'"; 825 echo ">$row->cat_id : " . wp_specialchars($row->cat_name); 826 if ($row->auto_toggle == 'Y') 827 echo ' (auto toggle)'; 828 echo "</option>"; 829 } 830 echo "\n</select>\n"; 831 } 832 802 833 function wp_create_thumbnail($file, $max_side, $effect = '') { 803 834
Note: See TracChangeset
for help on using the changeset viewer.