raw
mp-wp_genesis           1 <?php
mp-wp_genesis 2 /**
mp-wp_genesis 3 * Edit links form for inclusion in administration panels.
mp-wp_genesis 4 *
mp-wp_genesis 5 * @package WordPress
mp-wp_genesis 6 * @subpackage Administration
mp-wp_genesis 7 */
mp-wp_genesis 8
mp-wp_genesis 9 if ( ! empty($link_id) ) {
mp-wp_genesis 10 $heading = sprintf( __( '<a href="%s">Links</a> / Edit Link' ), 'link-manager.php' );
mp-wp_genesis 11 $submit_text = __('Update Link');
mp-wp_genesis 12 $form = '<form name="editlink" id="editlink" method="post" action="link.php">';
mp-wp_genesis 13 $nonce_action = 'update-bookmark_' . $link_id;
mp-wp_genesis 14 } else {
mp-wp_genesis 15 $heading = sprintf( __( '<a href="%s">Links</a> / Add New Link' ), 'link-manager.php' );
mp-wp_genesis 16 $submit_text = __('Add Link');
mp-wp_genesis 17 $form = '<form name="addlink" id="addlink" method="post" action="link.php">';
mp-wp_genesis 18 $nonce_action = 'add-bookmark';
mp-wp_genesis 19 }
mp-wp_genesis 20
mp-wp_genesis 21 /**
mp-wp_genesis 22 * Display checked checkboxes attribute for xfn microformat options.
mp-wp_genesis 23 *
mp-wp_genesis 24 * @since 1.0.1
mp-wp_genesis 25 *
mp-wp_genesis 26 * @param string $class
mp-wp_genesis 27 * @param string $value
mp-wp_genesis 28 * @param mixed $deprecated Not used.
mp-wp_genesis 29 */
mp-wp_genesis 30 function xfn_check($class, $value = '', $deprecated = '') {
mp-wp_genesis 31 global $link;
mp-wp_genesis 32
mp-wp_genesis 33 $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: '';
mp-wp_genesis 34 $rels = preg_split('/\s+/', $link_rel);
mp-wp_genesis 35
mp-wp_genesis 36 if ('' != $value && in_array($value, $rels) ) {
mp-wp_genesis 37 echo ' checked="checked"';
mp-wp_genesis 38 }
mp-wp_genesis 39
mp-wp_genesis 40 if ('' == $value) {
mp-wp_genesis 41 if ('family' == $class && strpos($link_rel, 'child') === false && strpos($link_rel, 'parent') === false && strpos($link_rel, 'sibling') === false && strpos($link_rel, 'spouse') === false && strpos($link_rel, 'kin') === false) echo ' checked="checked"';
mp-wp_genesis 42 if ('friendship' == $class && strpos($link_rel, 'friend') === false && strpos($link_rel, 'acquaintance') === false && strpos($link_rel, 'contact') === false) echo ' checked="checked"';
mp-wp_genesis 43 if ('geographical' == $class && strpos($link_rel, 'co-resident') === false && strpos($link_rel, 'neighbor') === false) echo ' checked="checked"';
mp-wp_genesis 44 if ('identity' == $class && in_array('me', $rels) ) echo ' checked="checked"';
mp-wp_genesis 45 }
mp-wp_genesis 46 }
mp-wp_genesis 47
mp-wp_genesis 48 /**
mp-wp_genesis 49 * Display link create form fields.
mp-wp_genesis 50 *
mp-wp_genesis 51 * @since 2.7.0
mp-wp_genesis 52 *
mp-wp_genesis 53 * @param object $link
mp-wp_genesis 54 */
mp-wp_genesis 55 function link_submit_meta_box($link) {
mp-wp_genesis 56 ?>
mp-wp_genesis 57 <div class="submitbox" id="submitlink">
mp-wp_genesis 58
mp-wp_genesis 59 <div id="minor-publishing">
mp-wp_genesis 60
mp-wp_genesis 61 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
mp-wp_genesis 62 <div style="display:none;">
mp-wp_genesis 63 <input type="submit" name="save" value="<?php echo attribute_escape( __('Save') ); ?>" />
mp-wp_genesis 64 </div>
mp-wp_genesis 65
mp-wp_genesis 66 <div id="minor-publishing-actions">
mp-wp_genesis 67 <div id="preview-action">
mp-wp_genesis 68 <?php if ( !empty($link->link_id) ) { ?>
mp-wp_genesis 69 <a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank" tabindex="4"><?php _e('Visit Link'); ?></a>
mp-wp_genesis 70 <?php } ?>
mp-wp_genesis 71 </div>
mp-wp_genesis 72 <div class="clear"></div>
mp-wp_genesis 73 </div>
mp-wp_genesis 74
mp-wp_genesis 75 <div id="misc-publishing-actions">
mp-wp_genesis 76 <div class="misc-pub-section misc-pub-section-last">
mp-wp_genesis 77 <label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label>
mp-wp_genesis 78 </div>
mp-wp_genesis 79 </div>
mp-wp_genesis 80
mp-wp_genesis 81 </div>
mp-wp_genesis 82
mp-wp_genesis 83 <div id="major-publishing-actions">
mp-wp_genesis 84 <?php do_action('post_submitbox_start'); ?>
mp-wp_genesis 85 <div id="delete-action">
mp-wp_genesis 86 <?php
mp-wp_genesis 87 if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?>
mp-wp_remove-all-... 88 <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>"><?php _e('Delete'); ?></a>
mp-wp_genesis 89 <?php } ?>
mp-wp_genesis 90 </div>
mp-wp_genesis 91
mp-wp_genesis 92 <div id="publishing-action">
mp-wp_genesis 93 <?php if ( !empty($link->link_id) ) { ?>
mp-wp_genesis 94 <input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php _e('Update Link') ?>" />
mp-wp_genesis 95 <?php } else { ?>
mp-wp_genesis 96 <input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php _e('Add Link') ?>" />
mp-wp_genesis 97 <?php } ?>
mp-wp_genesis 98 </div>
mp-wp_genesis 99 <div class="clear"></div>
mp-wp_genesis 100 </div>
mp-wp_genesis 101 <?php do_action('submitlink_box'); ?>
mp-wp_genesis 102 <div class="clear"></div>
mp-wp_genesis 103 </div>
mp-wp_genesis 104 <?php
mp-wp_genesis 105 }
mp-wp_genesis 106 add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', 'link', 'side', 'core');
mp-wp_genesis 107
mp-wp_genesis 108 /**
mp-wp_genesis 109 * Display link categories form fields.
mp-wp_genesis 110 *
mp-wp_genesis 111 * @since 2.6.0
mp-wp_genesis 112 *
mp-wp_genesis 113 * @param object $link
mp-wp_genesis 114 */
mp-wp_genesis 115 function link_categories_meta_box($link) { ?>
mp-wp_remove-all-... 116 <div id="categories-all">
mp-wp_genesis 117 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
mp-wp_genesis 118 <?php
mp-wp_genesis 119 if ( isset($link->link_id) )
mp-wp_genesis 120 wp_link_category_checklist($link->link_id);
mp-wp_genesis 121 else
mp-wp_genesis 122 wp_link_category_checklist();
mp-wp_genesis 123 ?>
mp-wp_genesis 124 </ul>
mp-wp_genesis 125 </div>
mp-wp_genesis 126 <?php
mp-wp_genesis 127 }
mp-wp_genesis 128 add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', 'link', 'normal', 'core');
mp-wp_genesis 129
mp-wp_genesis 130 /**
mp-wp_genesis 131 * Display form fields for changing link target.
mp-wp_genesis 132 *
mp-wp_genesis 133 * @since 2.6.0
mp-wp_genesis 134 *
mp-wp_genesis 135 * @param object $link
mp-wp_genesis 136 */
mp-wp_genesis 137 function link_target_meta_box($link) { ?>
mp-wp_genesis 138 <fieldset><legend class="hidden"><?php _e('Target') ?></legend>
mp-wp_genesis 139 <label for="link_target_blank" class="selectit">
mp-wp_genesis 140 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />
mp-wp_genesis 141 <code>_blank</code></label><br />
mp-wp_genesis 142 <label for="link_target_top" class="selectit">
mp-wp_genesis 143 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ($link->link_target == '_top') ? 'checked="checked"' : ''); ?> />
mp-wp_genesis 144 <code>_top</code></label><br />
mp-wp_genesis 145 <label for="link_target_none" class="selectit">
mp-wp_genesis 146 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ($link->link_target == '') ? 'checked="checked"' : ''); ?> />
mp-wp_genesis 147 <?php _e('none') ?></label>
mp-wp_genesis 148 </fieldset>
mp-wp_genesis 149 <p><?php _e('Choose the frame your link targets. Essentially this means if you choose <code>_blank</code> your link will open in a new window.'); ?></p>
mp-wp_genesis 150 <?php
mp-wp_genesis 151 }
mp-wp_genesis 152 add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', 'link', 'normal', 'core');
mp-wp_genesis 153
mp-wp_genesis 154 /**
mp-wp_genesis 155 * Display xfn form fields.
mp-wp_genesis 156 *
mp-wp_genesis 157 * @since 2.6.0
mp-wp_genesis 158 *
mp-wp_genesis 159 * @param object $link
mp-wp_genesis 160 */
mp-wp_genesis 161 function link_xfn_meta_box($link) {
mp-wp_genesis 162 ?>
mp-wp_genesis 163 <table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5">
mp-wp_genesis 164 <tr>
mp-wp_genesis 165 <th style="width: 20%;" scope="row"><label for="link_rel"><?php _e('rel:') ?></label></th>
mp-wp_genesis 166 <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>
mp-wp_genesis 167 </tr>
mp-wp_genesis 168 <tr>
mp-wp_genesis 169 <td colspan="2">
mp-wp_genesis 170 <table cellpadding="3" cellspacing="5" class="form-table">
mp-wp_genesis 171 <tr>
mp-wp_genesis 172 <th scope="row"> <?php _e('identity') ?> </th>
mp-wp_genesis 173 <td><fieldset><legend class="hidden"> <?php _e('identity') ?> </legend>
mp-wp_genesis 174 <label for="me">
mp-wp_genesis 175 <input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> />
mp-wp_genesis 176 <?php _e('another web address of mine') ?></label>
mp-wp_genesis 177 </fieldset></td>
mp-wp_genesis 178 </tr>
mp-wp_genesis 179 <tr>
mp-wp_genesis 180 <th scope="row"> <?php _e('friendship') ?> </th>
mp-wp_genesis 181 <td><fieldset><legend class="hidden"> <?php _e('friendship') ?> </legend>
mp-wp_genesis 182 <label for="contact">
mp-wp_genesis 183 <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact', 'radio'); ?> /> <?php _e('contact') ?></label>
mp-wp_genesis 184 <label for="acquaintance">
mp-wp_genesis 185 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance', 'radio'); ?> /> <?php _e('acquaintance') ?></label>
mp-wp_genesis 186 <label for="friend">
mp-wp_genesis 187 <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend', 'radio'); ?> /> <?php _e('friend') ?></label>
mp-wp_genesis 188 <label for="friendship">
mp-wp_genesis 189 <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship', '', 'radio'); ?> /> <?php _e('none') ?></label>
mp-wp_genesis 190 </fieldset></td>
mp-wp_genesis 191 </tr>
mp-wp_genesis 192 <tr>
mp-wp_genesis 193 <th scope="row"> <?php _e('physical') ?> </th>
mp-wp_genesis 194 <td><fieldset><legend class="hidden"> <?php _e('physical') ?> </legend>
mp-wp_genesis 195 <label for="met">
mp-wp_genesis 196 <input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> />
mp-wp_genesis 197 <?php _e('met') ?></label>
mp-wp_genesis 198 </fieldset></td>
mp-wp_genesis 199 </tr>
mp-wp_genesis 200 <tr>
mp-wp_genesis 201 <th scope="row"> <?php _e('professional') ?> </th>
mp-wp_genesis 202 <td><fieldset><legend class="hidden"> <?php _e('professional') ?> </legend>
mp-wp_genesis 203 <label for="co-worker">
mp-wp_genesis 204 <input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> />
mp-wp_genesis 205 <?php _e('co-worker') ?></label>
mp-wp_genesis 206 <label for="colleague">
mp-wp_genesis 207 <input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> />
mp-wp_genesis 208 <?php _e('colleague') ?></label>
mp-wp_genesis 209 </fieldset></td>
mp-wp_genesis 210 </tr>
mp-wp_genesis 211 <tr>
mp-wp_genesis 212 <th scope="row"> <?php _e('geographical') ?> </th>
mp-wp_genesis 213 <td><fieldset><legend class="hidden"> <?php _e('geographical') ?> </legend>
mp-wp_genesis 214 <label for="co-resident">
mp-wp_genesis 215 <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident', 'radio'); ?> />
mp-wp_genesis 216 <?php _e('co-resident') ?></label>
mp-wp_genesis 217 <label for="neighbor">
mp-wp_genesis 218 <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor', 'radio'); ?> />
mp-wp_genesis 219 <?php _e('neighbor') ?></label>
mp-wp_genesis 220 <label for="geographical">
mp-wp_genesis 221 <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical', '', 'radio'); ?> />
mp-wp_genesis 222 <?php _e('none') ?></label>
mp-wp_genesis 223 </fieldset></td>
mp-wp_genesis 224 </tr>
mp-wp_genesis 225 <tr>
mp-wp_genesis 226 <th scope="row"> <?php _e('family') ?> </th>
mp-wp_genesis 227 <td><fieldset><legend class="hidden"> <?php _e('family') ?> </legend>
mp-wp_genesis 228 <label for="child">
mp-wp_genesis 229 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child', 'radio'); ?> />
mp-wp_genesis 230 <?php _e('child') ?></label>
mp-wp_genesis 231 <label for="kin">
mp-wp_genesis 232 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin', 'radio'); ?> />
mp-wp_genesis 233 <?php _e('kin') ?></label>
mp-wp_genesis 234 <label for="parent">
mp-wp_genesis 235 <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent', 'radio'); ?> />
mp-wp_genesis 236 <?php _e('parent') ?></label>
mp-wp_genesis 237 <label for="sibling">
mp-wp_genesis 238 <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling', 'radio'); ?> />
mp-wp_genesis 239 <?php _e('sibling') ?></label>
mp-wp_genesis 240 <label for="spouse">
mp-wp_genesis 241 <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse', 'radio'); ?> />
mp-wp_genesis 242 <?php _e('spouse') ?></label>
mp-wp_genesis 243 <label for="family">
mp-wp_genesis 244 <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family', '', 'radio'); ?> />
mp-wp_genesis 245 <?php _e('none') ?></label>
mp-wp_genesis 246 </fieldset></td>
mp-wp_genesis 247 </tr>
mp-wp_genesis 248 <tr>
mp-wp_genesis 249 <th scope="row"> <?php _e('romantic') ?> </th>
mp-wp_genesis 250 <td><fieldset><legend class="hidden"> <?php _e('romantic') ?> </legend>
mp-wp_genesis 251 <label for="muse">
mp-wp_genesis 252 <input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> />
mp-wp_genesis 253 <?php _e('muse') ?></label>
mp-wp_genesis 254 <label for="crush">
mp-wp_genesis 255 <input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> />
mp-wp_genesis 256 <?php _e('crush') ?></label>
mp-wp_genesis 257 <label for="date">
mp-wp_genesis 258 <input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> />
mp-wp_genesis 259 <?php _e('date') ?></label>
mp-wp_genesis 260 <label for="romantic">
mp-wp_genesis 261 <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> />
mp-wp_genesis 262 <?php _e('sweetheart') ?></label>
mp-wp_genesis 263 </fieldset></td>
mp-wp_genesis 264 </tr>
mp-wp_genesis 265 </table>
mp-wp_genesis 266 </td>
mp-wp_genesis 267 </tr>
mp-wp_genesis 268 </table>
mp-wp_genesis 269 <p><?php _e('If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.'); ?></p>
mp-wp_genesis 270 <?php
mp-wp_genesis 271 }
mp-wp_genesis 272 add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', 'link', 'normal', 'core');
mp-wp_genesis 273
mp-wp_genesis 274 /**
mp-wp_genesis 275 * Display advanced link options form fields.
mp-wp_genesis 276 *
mp-wp_genesis 277 * @since 2.6.0
mp-wp_genesis 278 *
mp-wp_genesis 279 * @param object $link
mp-wp_genesis 280 */
mp-wp_genesis 281 function link_advanced_meta_box($link) {
mp-wp_genesis 282 ?>
mp-wp_genesis 283 <table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5">
mp-wp_genesis 284 <tr class="form-field">
mp-wp_genesis 285 <th valign="top" scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th>
mp-wp_genesis 286 <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>
mp-wp_genesis 287 </tr>
mp-wp_genesis 288 <tr class="form-field">
mp-wp_genesis 289 <th valign="top" scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th>
mp-wp_genesis 290 <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>
mp-wp_genesis 291 </tr>
mp-wp_genesis 292 <tr class="form-field">
mp-wp_genesis 293 <th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th>
mp-wp_genesis 294 <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>
mp-wp_genesis 295 </tr>
mp-wp_genesis 296 <tr class="form-field">
mp-wp_genesis 297 <th valign="top" scope="row"><label for="link_rating"><?php _e('Rating') ?></label></th>
mp-wp_genesis 298 <td><select name="link_rating" id="link_rating" size="1">
mp-wp_genesis 299 <?php
mp-wp_genesis 300 for ($r = 0; $r < 10; $r++) {
mp-wp_genesis 301 echo(' <option value="'.$r.'" ');
mp-wp_genesis 302 if ( isset($link->link_rating) && $link->link_rating == $r)
mp-wp_genesis 303 echo 'selected="selected"';
mp-wp_genesis 304 echo('>'.$r.'</option>');
mp-wp_genesis 305 }
mp-wp_genesis 306 ?></select>&nbsp;<?php _e('(Leave at 0 for no rating.)') ?>
mp-wp_genesis 307 </td>
mp-wp_genesis 308 </tr>
mp-wp_genesis 309 </table>
mp-wp_genesis 310 <?php
mp-wp_genesis 311 }
mp-wp_genesis 312 add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'normal', 'core');
mp-wp_genesis 313
mp-wp_genesis 314 do_action('do_meta_boxes', 'link', 'normal', $link);
mp-wp_genesis 315 do_action('do_meta_boxes', 'link', 'advanced', $link);
mp-wp_genesis 316 do_action('do_meta_boxes', 'link', 'side', $link);
mp-wp_genesis 317
mp-wp_genesis 318 require_once ('admin-header.php');
mp-wp_genesis 319
mp-wp_genesis 320 ?>
mp-wp_genesis 321
mp-wp_genesis 322
mp-wp_genesis 323 <div class="wrap">
mp-wp_genesis 324 <?php screen_icon(); ?>
mp-wp_genesis 325 <h2><?php echo wp_specialchars( $title ); ?></h2>
mp-wp_genesis 326
mp-wp_genesis 327 <?php if ( isset( $_GET['added'] ) ) : ?>
mp-wp_genesis 328 <div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div>
mp-wp_genesis 329 <?php endif; ?>
mp-wp_genesis 330
mp-wp_genesis 331 <?php
mp-wp_genesis 332 if ( !empty($form) )
mp-wp_genesis 333 echo $form;
mp-wp_genesis 334 if ( !empty($link_added) )
mp-wp_genesis 335 echo $link_added;
mp-wp_genesis 336
mp-wp_genesis 337 wp_nonce_field( $nonce_action );
mp-wp_genesis 338 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
mp-wp_genesis 339 wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
mp-wp_genesis 340
mp-wp_genesis 341 <div id="poststuff" class="metabox-holder">
mp-wp_genesis 342
mp-wp_genesis 343 <div id="side-info-column" class="inner-sidebar">
mp-wp_genesis 344 <?php
mp-wp_genesis 345
mp-wp_genesis 346 do_action('submitlink_box');
mp-wp_genesis 347 $side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
mp-wp_genesis 348
mp-wp_genesis 349 ?>
mp-wp_genesis 350 </div>
mp-wp_genesis 351
mp-wp_genesis 352 <div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
mp-wp_genesis 353 <div id="post-body-content" class="has-sidebar-content">
mp-wp_genesis 354 <div id="namediv" class="stuffbox">
mp-wp_genesis 355 <h3><label for="link_name"><?php _e('Name') ?></label></h3>
mp-wp_genesis 356 <div class="inside">
mp-wp_genesis 357 <input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" />
mp-wp_genesis 358 <p><?php _e('Example: Nifty blogging software'); ?></p>
mp-wp_genesis 359 </div>
mp-wp_genesis 360 </div>
mp-wp_genesis 361
mp-wp_genesis 362 <div id="addressdiv" class="stuffbox">
mp-wp_genesis 363 <h3><label for="link_url"><?php _e('Web Address') ?></label></h3>
mp-wp_genesis 364 <div class="inside">
mp-wp_genesis 365 <input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" />
mp-wp_genesis 366 <p><?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?></p>
mp-wp_genesis 367 </div>
mp-wp_genesis 368 </div>
mp-wp_genesis 369
mp-wp_genesis 370 <div id="descriptiondiv" class="stuffbox">
mp-wp_genesis 371 <h3><label for="link_description"><?php _e('Description') ?></label></h3>
mp-wp_genesis 372 <div class="inside">
mp-wp_genesis 373 <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo isset($link->link_description) ? $link->link_description : ''; ?>" id="link_description" />
mp-wp_genesis 374 <p><?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?></p>
mp-wp_genesis 375 </div>
mp-wp_genesis 376 </div>
mp-wp_genesis 377
mp-wp_genesis 378 <?php
mp-wp_genesis 379
mp-wp_genesis 380 do_meta_boxes('link', 'normal', $link);
mp-wp_genesis 381
mp-wp_genesis 382 do_meta_boxes('link', 'advanced', $link);
mp-wp_genesis 383
mp-wp_genesis 384 if ( $link_id ) : ?>
mp-wp_genesis 385 <input type="hidden" name="action" value="save" />
mp-wp_genesis 386 <input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
mp-wp_genesis 387 <input type="hidden" name="order_by" value="<?php echo attribute_escape($order_by); ?>" />
mp-wp_genesis 388 <input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
mp-wp_genesis 389 <?php else: ?>
mp-wp_genesis 390 <input type="hidden" name="action" value="add" />
mp-wp_genesis 391 <?php endif; ?>
mp-wp_genesis 392
mp-wp_genesis 393 </div>
mp-wp_genesis 394 </div>
mp-wp_genesis 395 </div>
mp-wp_genesis 396
mp-wp_genesis 397 </form>
mp-wp_genesis 398 </div>