-<div class="wrap">
- <?php echo $form ?>
- <?php wp_nonce_field($nonce_action); ?>
- <h2><?php echo $heading ?></h2>
-<fieldset class="options">
- <legend><?php _e('Basics') ?></legend>
- <table class="editform" width="100%" cellspacing="2" cellpadding="5">
- <tr>
- <th width="33%" scope="row"><?php _e('URI:') ?></th>
- <td width="67%"><input type="text" name="link_url" value="<?php echo $link->link_url; ?>" style="width: 95%;" /></td>
- </tr>
- <tr>
- <th scope="row"><?php _e('Link Name:') ?></th>
- <td><input type="text" name="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td>
- </tr>
- <tr>
- <th scope="row"><?php _e('Short description:') ?></th>
- <td><input type="text" name="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td>
- </tr>
- <tr>
- <th scope="row"><?php _e('Category:') ?></th>
- <td><?php link_category_dropdown('link_category', $link->link_category); ?></td>
- </tr>
-</table>
-</fieldset>
- <p class="submit">
- <input type="submit" name="submit" value="<?php echo $submit_text ?>" />
- </p>
- <fieldset class="options">
- <legend><?php _e('Link Relationship (XFN)') ?></legend>
- <table class="editform" width="100%" cellspacing="2" cellpadding="5">
- <tr>
- <th width="33%" scope="row"><?php _e('rel:') ?></th>
- <td width="67%"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo $link->link_rel; ?>" /></td>
- </tr>
- <tr>
- <th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th>
- <td>
- <table cellpadding="3" cellspacing="5">
- <tr>
- <th scope="row"> <?php _e('identity') ?> </th>
- <td>
- <label for="me">
- <input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
- <?php _e('another web address of mine') ?></label>
- </td>
- </tr>
- <tr>
- <th scope="row"> <?php _e('friendship') ?> </th>
- <td>
- <label for="contact">
- <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label>
- <label for="acquaintance">
- <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label>
- <label for="friend">
- <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label>
- <label for="friendship">
- <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label>
- </td>
- </tr>
- <tr>
- <th scope="row"> <?php _e('physical') ?> </th>
- <td>
- <label for="met">
- <input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />
- <?php _e('met') ?></label>
- </td>
- </tr>
- <tr>
- <th scope="row"> <?php _e('professional') ?> </th>
- <td>
- <label for="co-worker">
- <input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />
- <?php _e('co-worker') ?></label>
- <label for="colleague">
- <input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />
- <?php _e('colleague') ?></label>
- </td>
- </tr>
- <tr>
- <th scope="row"> <?php _e('geographical') ?> </th>
- <td>
- <label for="co-resident">
- <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> />
- <?php _e('co-resident') ?></label>
- <label for="neighbor">
- <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> />
- <?php _e('neighbor') ?></label>
- <label for="geographical">
- <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical', '', 'radio'); ?> />
- <?php _e('none') ?></label>
- </td>
- </tr>
- <tr>
- <th scope="row"> <?php _e('family') ?> </th>
- <td>
- <label for="child">
- <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child', 'radio'); ?> />
- <?php _e('child') ?></label>
- <label for="kin">
- <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin', 'radio'); ?> />
- <?php _e('kin') ?></label>
- <label for="parent">
- <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent', 'radio'); ?> />
- <?php _e('parent') ?></label>
- <label for="sibling">
- <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling', 'radio'); ?> />
- <?php _e('sibling') ?></label>
- <label for="spouse">
- <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse', 'radio'); ?> />
- <?php _e('spouse') ?></label>
- <label for="family">
- <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family', '', 'radio'); ?> />
- <?php _e('none') ?></label>
- </td>
- </tr>
- <tr>
- <th scope="row"> <?php _e('romantic') ?> </th>
- <td>
- <label for="muse">
- <input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />
- <?php _e('muse') ?></label>
- <label for="crush">
- <input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />
- <?php _e('crush') ?></label>
- <label for="date">
- <input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />
- <?php _e('date') ?></label>
- <label for="romantic">
- <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />
- <?php _e('sweetheart') ?></label>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-</fieldset>
- <p class="submit">
- <input type="submit" name="submit" value="<?php echo $submit_text ?>" />
- </p>
-<fieldset class="options">
- <legend><?php _e('Advanced') ?></legend>
- <table class="editform" width="100%" cellspacing="2" cellpadding="5">
- <tr>
- <th width="33%" scope="row"><?php _e('Image URI:') ?></th>
- <td width="67%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>
- </tr>
-<tr>
- <th scope="row"><?php _e('RSS URI:') ?> </th>
- <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>
- </tr>
- <tr>
- <th scope="row"><?php _e('Notes:') ?></th>
- <td><textarea name="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td>
- </tr>
- <tr>
- <th scope="row"><?php _e('Rating:') ?></th>
- <td><select name="link_rating" size="1">
+<div class="wrap">
+<h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h2>
+
+<?php if ( isset( $_GET['added'] ) ) : ?>
+<div id="message" class="updated"><p><?php _e('Link added.'); ?></p></div>
+<?php endif; ?>
+
+<?php
+if ( !empty($form) )
+ echo $form;
+if ( !empty($link_added) )
+ echo $link_added;
+
+wp_nonce_field( $nonce_action );
+wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
+wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
+
+<div id="poststuff">
+
+<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
+<div id="post-body-content">
+<div id="namediv" class="stuffbox">
+<h3><label for="link_name"><?php _ex('Name', 'link name') ?></label></h3>
+<div class="inside">
+ <input type="text" name="link_name" size="30" maxlength="255" value="<?php echo esc_attr($link->link_name); ?>" id="link_name" />
+ <p><?php _e('Example: Nifty blogging software'); ?></p>
+</div>
+</div>
+
+<div id="addressdiv" class="stuffbox">
+<h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
+<div class="inside">
+ <input type="text" name="link_url" size="30" maxlength="255" class="code" value="<?php echo esc_attr($link->link_url); ?>" id="link_url" />
+ <p><?php _e('Example: <code>http://wordpress.org/</code> — don’t forget the <code>http://</code>'); ?></p>
+</div>
+</div>
+
+<div id="descriptiondiv" class="stuffbox">
+<h3><label for="link_description"><?php _e('Description') ?></label></h3>
+<div class="inside">
+ <input type="text" name="link_description" size="30" maxlength="255" value="<?php echo isset($link->link_description) ? esc_attr($link->link_description) : ''; ?>" id="link_description" />
+ <p><?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?></p>
+</div>
+</div>
+</div><!-- /post-body-content -->
+
+<div id="postbox-container-1" class="postbox-container">
+<?php
+
+/**
+ * Fires before the Save meta box in the sidebar.
+ *
+ * @since 2.5.0
+ */
+do_action( 'submitlink_box' );
+$side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
+
+?>
+</div>
+<div id="postbox-container-2" class="postbox-container">