diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-04 16:44:15 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-04 16:44:15 +0000 |
commit | 7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc (patch) | |
tree | c6fd23b598f3994eddb18cb1c0f2e8d95ff054fa /wp-admin/edit-link-form.php | |
parent | f650f48c048bfbbb2ae702b6425d87e39358d748 (diff) | |
download | wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.gz wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.xz wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.zip |
Merged with WordPress 2.5, unstable, only for testing
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1218 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/edit-link-form.php')
-rw-r--r-- | wp-admin/edit-link-form.php | 222 |
1 files changed, 140 insertions, 82 deletions
diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index e281d30..a68c6da 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -1,17 +1,17 @@ <?php if ( ! empty($link_id) ) { $heading = __('Edit Link'); - $submit_text = __('Save Changes »'); + $submit_text = __('Save Changes'); $form = '<form name="editlink" id="editlink" method="post" action="link.php">'; $nonce_action = 'update-bookmark_' . $link_id; } else { $heading = __('Add Link'); - $submit_text = __('Add Link »'); + $submit_text = __('Add Link'); $form = '<form name="addlink" id="addlink" method="post" action="link.php">'; $nonce_action = 'add-bookmark'; } -function xfn_check($class, $value = '', $type = 'check') { +function xfn_check($class, $value = '', $deprecated = '') { global $link; $link_rel = $link->link_rel; @@ -30,86 +30,138 @@ function xfn_check($class, $value = '', $type = 'check') { } ?> -<div class="wrap"> -<h2><?php echo $heading ?></h2> <?php echo $form ?> <?php wp_nonce_field($nonce_action); ?> +<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> + +<div class="wrap"> +<h2><?php echo $heading; ?></h2> <div id="poststuff"> -<div id="moremeta"> -<div id="grabit" class="dbx-group"> - -<fieldset id="categorydiv" class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Categories') ?></h3> -<div class="dbx-content"> -<p id="jaxcat"></p> -<ul id="linkcategorychecklist"><?php dropdown_link_categories(get_option('default_link_category')); ?></ul> + +<div class="submitbox" id="submitlink"> + +<div id="previewview"> +<?php if ( !empty($link_id) ) { ?> +<a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a> +<?php } ?> +</div> + +<div class="inside"> +<p><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></p> +</div> + +<p class="submit"> +<input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" /> +<?php +if ( ( 'edit' == $action) && current_user_can('manage_links') ) + echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&link_id=$link_id", 'delete-bookmark_' . $link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete link') . "</a>"; +?> +</p> + +<div class="side-info"> +<h5><?php _e('Related') ?></h5> + +<ul> +<li><a href="link-manager.php"><?php _e('Manage All Links') ?></a></li> +<li><a href="edit-link-categories.php"><?php _e('Manage All Link Categories') ?></a></li> +<li><a href="link-import.php"><?php _e('Import Links') ?></a></li> +<?php do_action('link_relatedlinks_list'); ?> +</ul> +</div> +<?php do_action('submitlink_box'); ?> +</div> + +<div id="post-body"> +<div id="namediv" class="stuffbox"> +<h3><?php _e('Name') ?></h3> +<div class="inside"> + <input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br /> + <?php _e('Example: Nifty blogging software'); ?> +</div> </div> -</fieldset> -<fieldset class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Target') ?></h3> -<div class="dbx-content"> +<div id="addressdiv" class="stuffbox"> +<h3><?php _e('Web Address') ?></h3> +<div class="inside"> + <input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br /> + <?php _e('Example: <code>http://wordpress.org/</code> — don’t forget the <code>http://</code>'); ?> +</div> +</div> + +<div id="descriptiondiv" class="stuffbox"> +<h3><?php _e('Description') ?></h3> +<div class="inside"> + <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo $link->link_description; ?>" id="link_description" /><br /> + <?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?> +</div> +</div> + +<div id="linkcategorydiv" class="postbox <?php echo postbox_classes('linkcategorydiv', 'link'); ?>"> +<h3><?php _e('Categories') ?></h3> +<div class="inside"> + +<div id="category-adder" class="wp-hidden-children"> + <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> + <p id="link-category-add" class="wp-hidden-child"> + <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" /> + <input type="button" id="category-add-sumbit" class="add:categorychecklist:linkcategorydiv button" value="<?php _e( 'Add' ); ?>" /> + <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> + <span id="category-ajax-response"></span> + </p> +</div> + +<ul id="category-tabs"> + <li class="ui-tabs-selected"><a href="#categories-all"><?php _e( 'All Categories' ); ?></a></li> + <li class="wp-no-js-hidden"><a href="#categories-pop"><?php _e( 'Most Used' ); ?></a></li> +</ul> + +<div id="categories-all" class="ui-tabs-panel"> + <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> + <?php dropdown_link_categories(); ?> + </ul> +</div> + +<div id="categories-pop" class="ui-tabs-panel" style="display: none;"> + <ul id="categorychecklist-pop" class="categorychecklist form-no-clear"> + <?php wp_popular_terms_checklist('link_category'); ?> + </ul> +</div> + +</div> +</div> + +<?php do_meta_boxes('link', 'normal', $link); ?> + +<h2><?php _e('Advanced Options'); ?></h2> + +<div id="linktargetdiv" class="postbox <?php echo postbox_classes('linktargetdiv', 'link'); ?>"> +<h3><?php _e('Target') ?></h3> +<div class="inside"> <label for="link_target_blank" class="selectit"> <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(($link->link_target == '_blank') ? 'checked="checked"' : ''); ?> /> -<code>_blank</code></label> +<code>_blank</code></label><br /> <label for="link_target_top" class="selectit"> <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo(($link->link_target == '_top') ? 'checked="checked"' : ''); ?> /> -<code>_top</code></label> +<code>_top</code></label><br /> <label for="link_target_none" class="selectit"> <input id="link_target_none" type="radio" name="link_target" value="" <?php echo(($link->link_target == '') ? 'checked="checked"' : ''); ?> /> <?php _e('none') ?></label> +<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> </div> -</fieldset> - -<fieldset class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Visible') ?></h3> -<div class="dbx-content"> -<label for="link_visible_yes" class="selectit"> -<input id="link_visible_yes" type="radio" name="link_visible" <?php if ($link->link_visible == 'Y') echo "checked='checked'"; ?> value="Y" /> -<?php _e('Yes') ?></label> -<label for="link_visible_no" class="selectit"> -<input id="link_visible_no" type="radio" name="link_visible" <?php if ($link->link_visible == 'N') echo "checked='checked'"; ?> value="N" /> -<?php _e('No') ?></label> </div> -</fieldset> -</div> -</div> - -<table class="editform" width="100%" cellspacing="2" cellpadding="5"> -<tr> -<th scope="row" valign="top"><label for="link_name"><?php _e('Name:') ?></label></th> -<td><input type="text" name="link_name" id="link_name" value="<?php echo $link->link_name; ?>" style="width: 95%" /></td> -</tr> -<tr> -<th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('Address:') ?></label></th> -<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> -</tr> -<tr> -<th scope="row" valign="top"><label for="link_description"><?php _e('Description:') ?></label></th> -<td><input type="text" name="link_description" id="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td> -</tr> -</table> - -<p class="submit"> -<input type="submit" name="submit" value="<?php echo $submit_text ?>" /> -</p> - -<div id="advancedstuff" class="dbx-group" > - -<fieldset id="xfn" class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Link Relationship (XFN)') ?></h3> -<div class="dbx-content"> -<table class="editform" width="100%" cellspacing="2" cellpadding="5"> +<div id="linkxfndiv" class="postbox <?php echo postbox_classes('linkxfndiv', 'link'); ?>"> +<h3><?php _e('Link Relationship (XFN)') ?></h3> +<div class="inside"> +<table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5"> <tr> - <th width="20%" scope="row"><?php _e('rel:') ?></th> - <td width="80%"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo $link->link_rel; ?>" /></td> + <th style="width: 20%;" scope="row"><?php _e('rel:') ?></th> + <td style="width: 80%;"><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"> + <td colspan="2"> + <table cellpadding="3" cellspacing="5" class="form-table"> <tr> <th scope="row"> <?php _e('identity') ?> </th> <td> @@ -208,28 +260,29 @@ function xfn_check($class, $value = '', $type = 'check') { </td> </tr> </table> +<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> +</div> </div> -</fieldset> -<fieldset id="advanced" class="dbx-box"> -<h3 class="dbx-handle"><?php _e('Advanced') ?></h3> -<div class="dbx-content"> -<table class="editform" width="100%" cellspacing="2" cellpadding="5"> - <tr> - <th width="20%" scope="row"><?php _e('Image Address:') ?></th> - <td width="80%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td> +<div id="linkadvanceddiv" class="postbox <?php echo postbox_classes('linkadvanceddiv', 'link'); ?>"> +<h3><?php _e('Advanced') ?></h3> +<div class="inside"> +<table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5"> + <tr class="form-field"> + <th valign="top" scope="row"><label for="link_image"><?php _e('Image Address') ?></label></th> + <td><input type="text" name="link_image" id="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td> </tr> - <tr> - <th scope="row"><?php _e('RSS Address:') ?> </th> + <tr class="form-field"> + <th valign="top" scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></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 class="form-field"> + <th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th> + <td><textarea name="link_notes" id="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"> + <tr class="form-field"> + <th valign="top" scope="row"><label for="link_rating"><?php _e('Rating') ?></label></th> + <td><select name="link_rating" id="link_rating" size="1"> <?php for ($r = 0; $r < 10; $r++) { echo(' <option value="'.$r.'" '); @@ -242,9 +295,10 @@ function xfn_check($class, $value = '', $type = 'check') { </tr> </table> </div> -</fieldset> </div> +<?php do_meta_boxes('link', 'advanced', $link); ?> + <?php if ( $link_id ) : ?> <input type="hidden" name="action" value="save" /> <input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" /> @@ -253,6 +307,10 @@ function xfn_check($class, $value = '', $type = 'check') { <?php else: ?> <input type="hidden" name="action" value="add" /> <?php endif; ?> + </div> -</form> </div> + +</div> + +</form> |