WordPress.org

Make WordPress Core

Ticket #5607: remove_admin_notices11.diff

File remove_admin_notices11.diff, 4.7 KB (added by filosofo, 8 years ago)
  • wp-admin/edit-link-form.php

     
    1414function xfn_check($class, $value = '', $deprecated = '') { 
    1515        global $link; 
    1616 
    17         $link_rel = $link->link_rel; 
     17        $link_rel = ( isset($link->link_rel) ) ? $link->link_rel : null; 
    1818        $rels = preg_split('/\s+/', $link_rel); 
    1919 
    2020        if ('' != $value && in_array($value, $rels) ) { 
     
    5151<h3 class="dbx-handle"><?php _e('Target') ?></h3> 
    5252<div class="dbx-content"> 
    5353<label for="link_target_blank" class="selectit"> 
    54 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> /> 
     54<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo((isset($link->link_target) && $link->link_target == '_blank') ? 'checked="checked"' : ''); ?> /> 
    5555<code>_blank</code></label> 
    5656<label for="link_target_top" class="selectit"> 
    57 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo(($link->link_target == '_top') ? 'checked="checked"' : ''); ?> /> 
     57<input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo((isset($link->link_target) && $link->link_target == '_top') ? 'checked="checked"' : ''); ?> /> 
    5858<code>_top</code></label> 
    5959<label for="link_target_none" class="selectit"> 
    60 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo(($link->link_target == '') ? 'checked="checked"' : ''); ?> /> 
     60<input id="link_target_none" type="radio" name="link_target" value="" <?php echo((isset($link->link_target) && $link->link_target == '') ? 'checked="checked"' : ''); ?> /> 
    6161<?php _e('none') ?></label> 
    6262</div> 
    6363</fieldset> 
     
    8484</tr> 
    8585<tr> 
    8686<th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('Address:') ?></label></th> 
    87 <td width="80%"><input type="text" name="link_url" id="link_url" value="<?php echo $link->link_url; if ( empty( $link->link_url ) ) echo 'http://'; ?>" style="width: 95%" /></td> 
     87<td width="80%"><input type="text" name="link_url" id="link_url" value="<?php echo ( empty( $link->link_url ) ) ? 'http://' : $link->link_url; ?>" style="width: 95%" /></td> 
    8888</tr> 
    8989<tr> 
    9090<th scope="row" valign="top"><label for="link_description"><?php _e('Description:') ?></label></th> 
    91 <td><input type="text" name="link_description" id="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td> 
     91<td><input type="text" name="link_description" id="link_description" value="<?php echo ( ! empty( $link->link_description ) ) ? $link->link_description : ''; ?>" style="width: 95%" /></td> 
    9292</tr> 
    9393</table> 
    9494 
     
    104104<table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    105105        <tr> 
    106106                <th width="20%" scope="row"><?php _e('rel:') ?></th> 
    107                 <td width="80%"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo $link->link_rel; ?>" /></td> 
     107                <td width="80%"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo ( ! empty($link->link_rel) ) ? $link->link_rel : ''; ?>" /></td> 
    108108        </tr> 
    109109        <tr> 
    110110                <th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th> 
     
    217217<table class="editform" width="100%" cellspacing="2" cellpadding="5"> 
    218218        <tr> 
    219219                <th width="20%" scope="row"><?php _e('Image Address:') ?></th> 
    220                 <td width="80%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td> 
     220                <td width="80%"><input type="text" name="link_image" size="50" value="<?php echo ( isset($link->link_image) ) ? $link->link_image : ''; ?>" style="width: 95%" /></td> 
    221221        </tr> 
    222222        <tr> 
    223223                <th scope="row"><?php _e('RSS Address:') ?> </th> 
    224                 <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td> 
     224                <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> 
    225225        </tr> 
    226226        <tr> 
    227227                <th scope="row"><?php _e('Notes:') ?></th> 
    228                 <td><textarea name="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td> 
     228                <td><textarea name="link_notes" cols="50" rows="10" style="width: 95%"><?php echo ( isset($link->link_notes) ) ? $link->link_notes : ''; ?></textarea></td> 
    229229        </tr> 
    230230        <tr> 
    231231                <th scope="row"><?php _e('Rating:') ?></th> 
     
    233233                <?php 
    234234                        for ($r = 0; $r < 10; $r++) { 
    235235                                echo('            <option value="'.$r.'" '); 
    236                                 if ($link->link_rating == $r) 
     236                                if (isset($link->link_rating) && $link->link_rating == $r) 
    237237                                        echo 'selected="selected"'; 
    238238                                echo('>'.$r.'</option>'); 
    239239                        }