Add privacy and preview to edit link submitbox
git-svn-id: http://svn.automattic.com/wordpress/trunk@6935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a8632e6fa
commit
db202d383f
|
@ -60,6 +60,17 @@ function xfn_check($class, $value = '', $deprecated = '') {
|
|||
</div>
|
||||
|
||||
<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" name="save" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
|
||||
</p>
|
||||
|
@ -119,18 +130,6 @@ function xfn_check($class, $value = '', $deprecated = '') {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="linkvisiblediv" class="postbox <?php echo postbox_classes('linkvisiblediv', 'link'); ?>">
|
||||
<h3><?php _e('Visible') ?></h3>
|
||||
<div class="inside">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div id="linkxfndiv" class="postbox <?php echo postbox_classes('linkxfndiv', 'link'); ?>">
|
||||
<h3><?php _e('Link Relationship (XFN)') ?></h3>
|
||||
<div class="inside">
|
||||
|
|
|
@ -13,6 +13,8 @@ function edit_link( $link_id = '' ) {
|
|||
$_POST['link_name'] = wp_specialchars( $_POST['link_name'] );
|
||||
$_POST['link_image'] = wp_specialchars( $_POST['link_image'] );
|
||||
$_POST['link_rss'] = clean_url($_POST['link_rss']);
|
||||
if ( 'N' != $_POST['link_visible'] )
|
||||
$_POST['link_visible'] = 'Y';
|
||||
|
||||
if ( !empty( $link_id ) ) {
|
||||
$_POST['link_id'] = $link_id;
|
||||
|
|
Loading…
Reference in New Issue