Changeset 8589 for trunk/wp-admin/edit-link-form.php
- Timestamp:
- 08/08/2008 05:05:10 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-link-form.php
r8025 r8589 15 15 global $link; 16 16 17 $link_rel = $link->link_rel;17 $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: ''; 18 18 $rels = preg_split('/\s+/', $link_rel); 19 19 … … 93 93 <h3><label for="link_description"><?php _e('Description') ?></label></h3> 94 94 <div class="inside"> 95 <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /><br />95 <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo ( isset( $link->link_description ) ? $link->link_description : ''); ?>" id="link_description" /><br /> 96 96 <?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?> 97 97 </div> … … 117 117 <div id="categories-all" class="ui-tabs-panel"> 118 118 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 119 <?php wp_link_category_checklist($link->link_id); ?> 119 <?php 120 if ( isset($link->link_id) ) 121 wp_link_category_checklist($link->link_id); 122 else 123 wp_link_category_checklist(); 124 ?> 120 125 </ul> 121 126 </div> … … 138 143 <fieldset><legend class="hidden"><?php _e('Target') ?></legend> 139 144 <label for="link_target_blank" class="selectit"> 140 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo (($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />145 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> /> 141 146 <code>_blank</code></label><br /> 142 147 <label for="link_target_top" class="selectit"> 143 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo (($link->link_target == '_top') ? 'checked="checked"' : ''); ?> />148 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_top') ? 'checked="checked"' : ''); ?> /> 144 149 <code>_top</code></label><br /> 145 150 <label for="link_target_none" class="selectit"> 146 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo (($link->link_target == '') ? 'checked="checked"' : ''); ?> />151 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ($link->link_target == '') ? 'checked="checked"' : ''); ?> /> 147 152 <?php _e('none') ?></label> 148 153 </fieldset> … … 157 162 <tr> 158 163 <th style="width: 20%;" scope="row"><label for="link_rel"><?php _e('rel:') ?></label></th> 159 <td style="width: 80%;"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo $link->link_rel; ?>" /></td>164 <td style="width: 80%;"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo ( isset( $link->link_rel ) ? $link->link_rel : ''); ?>" /></td> 160 165 </tr> 161 166 <tr> … … 270 275 <tr class="form-field"> 271 276 <th valign="top" scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th> 272 <td><input type="text" name="link_image" id="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>277 <td><input type="text" name="link_image" id="link_image" size="50" value="<?php echo ( isset( $link->link_image ) ? $link->link_image : ''); ?>" style="width: 95%" /></td> 273 278 </tr> 274 279 <tr class="form-field"> 275 280 <th valign="top" scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th> 276 <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>281 <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo ( isset( $link->link_rss ) ? $link->link_rss : ''); ?>" size="50" style="width: 95%" /></td> 277 282 </tr> 278 283 <tr class="form-field"> 279 284 <th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th> 280 <td><textarea name="link_notes" id="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td>285 <td><textarea name="link_notes" id="link_notes" cols="50" rows="10" style="width: 95%"><?php echo ( isset( $link->link_notes ) ? $link->link_notes : ''); ?></textarea></td> 281 286 </tr> 282 287 <tr class="form-field"> … … 286 291 for ($r = 0; $r < 10; $r++) { 287 292 echo(' <option value="'.$r.'" '); 288 if ( $link->link_rating == $r)293 if ( isset($link->link_rating) && $link->link_rating == $r) 289 294 echo 'selected="selected"'; 290 295 echo('>'.$r.'</option>');
Note: See TracChangeset
for help on using the changeset viewer.