Source View: submitlink_box

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
92 <div id="publishing-action">
93 <?php if ( !empty($link->link_id) ) { ?>
94      <input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php _e('Update Link') ?>" />
95 <?php } else { ?>
96      <input name="save" type="submit" class="button-primary" id="publish" tabindex="4" accesskey="p" value="<?php _e('Add Link') ?>" />
97 <?php } ?>
98 </div>
99 <div class="clear"></div>
100 </div>
101 <?php do_action('submitlink_box'); ?>
102 <div class="clear"></div>
103 </div>
104 <?php
105 }
106 add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', 'link', 'side', 'core');
107
108 /**
109  * Display link categories form fields.
110  *
 
Line Code
359 wp_nonce_field( $nonce_action );
360 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
361 wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
362
363 <div id="poststuff" class="metabox-holder">
364
365 <div id="side-info-column" class="inner-sidebar">
366 <?php
367
368 do_action('submitlink_box');
369 $side_meta_boxes = do_meta_boxes( 'link', 'side', $link );
370
371 ?>
372 </div>
373
374 <div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>">
375 <div id="post-body-content" class="has-sidebar-content">
376 <div id="namediv" class="stuffbox">
377 <h3><label for="link_name"><?php _e('Name') ?></label></h3>