Changeset 1940 for trunk/wp-admin/link-add.php
- Timestamp:
- 12/12/2004 08:41:19 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/link-add.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/link-add.php
r1818 r1940 2 2 require_once('admin.php'); 3 3 4 $title = 'Add Link';4 $title = __('Add Link'); 5 5 $this_file = 'link-manager.php'; 6 6 $parent_file = 'link-manager.php'; 7 7 8 8 function category_dropdown($fieldname, $selected = 0) { 9 global $wpdb;10 11 $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle FROM $wpdb->linkcategories ORDER BY cat_id");12 echo ' <select name="'.$fieldname.'" size="1">'."\n";13 foreach ($results as $row) {14 echo " <option value=\"".$row->cat_id."\"";15 if ($row->cat_id == $selected)16 echo " selected";17 echo ">".$row->cat_id.": ".htmlspecialchars($row->cat_name);18 if ($row->auto_toggle == 'Y')19 echo ' (auto toggle)';20 echo "</option>\n";21 }22 echo "</select>\n";9 global $wpdb; 10 11 $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle FROM $wpdb->linkcategories ORDER BY cat_id"); 12 echo "\n<select name='$fieldname' size='1'>\n"; 13 foreach ($results as $row) { 14 echo "\n\t<option value='$row->cat_id'"; 15 if ($row->cat_id == $selected) 16 echo " selected='selected'"; 17 echo ">$row->cat_id : " . wp_specialchars($row->cat_name); 18 if ($row->auto_toggle == 'Y') 19 echo ' (auto toggle)'; 20 echo "</option>"; 21 } 22 echo "\n</select>\n"; 23 23 } 24 24 … … 50 50 51 51 <?php if ($_GET['added']) : ?> 52 <div class="updated"><p> Link added.</p></div>52 <div class="updated"><p><?php _e('Link added.'); ?></p></div> 53 53 <?php endif; ?> 54 54 <div class="wrap"> … … 60 60 <tr> 61 61 <th width="33%" scope="row"><?php _e('URI:') ?></th> 62 <td width="67%"><input type="text" name="linkurl" value="<?php echo $_GET['linkurl']; ?>" style="width: 95%;" /></td>62 <td width="67%"><input type="text" name="linkurl" value="<?php echo wp_specialchars($_GET['linkurl'], 1); ?>" style="width: 95%;" /></td> 63 63 </tr> 64 64 <tr> 65 65 <th scope="row"><?php _e('Link Name:') ?></th> 66 <td><input type="text" name="name" value="<?php echo urldecode($_GET['name']); ?>" style="width: 95%" /></td>66 <td><input type="text" name="name" value="<?php echo wp_specialchars( urldecode($_GET['name']), 1 ); ?>" style="width: 95%" /></td> 67 67 </tr> 68 68 <tr>
Note: See TracChangeset
for help on using the changeset viewer.