Advertisements

link_submit_meta_box

Definition:
function link_submit_meta_box($link) {}

Display link create form fields.

Parameters

  • object $link

Defined actions

  • post_submitbox_start
    do_action('post_submitbox_start');
  • submitlink_box
    do_action('submitlink_box');

Source code

function link_submit_meta_box($link) {

?>

<div class="submitbox" id="submitlink">



<div id="minor-publishing">



<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>

<div style="display:none;">

<?php submit_button( __( 'Save' ), 'button', 'save', false ); ?>

</div>



<div id="minor-publishing-actions">

<div id="preview-action">

<?php if ( !empty($link->link_id) ) { ?>

	<a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank" tabindex="4"><?php _e('Visit Link'); ?></a>

<?php } ?>

</div>

<div class="clear"></div>

</div>



<div id="misc-publishing-actions">

<div class="misc-pub-section misc-pub-section-last">

	<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>

</div>

</div>



</div>



<div id="major-publishing-actions">

<?php do_action('post_submitbox_start'); ?>

<div id="delete-action">

<?php

if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?>

	<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); ?>" onclick="if ( confirm('<?php echo esc_js(sprintf(__("You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>

<?php } ?>

</div>



<div id="publishing-action">

<?php if ( !empty($link->link_id) ) { ?>

	<input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php esc_attr_e('Update Link') ?>" />

<?php } else { ?>

	<input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php esc_attr_e('Add Link') ?>" />

<?php } ?>

</div>

<div class="clear"></div>

</div>

<?php do_action('submitlink_box'); ?>

<div class="clear"></div>

</div>

<?php

}

2259

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: