Welcome, visitor! Log in
 

Source View: submitpost_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

Line Code
151  <input type="hidden" id="hiddenaction" name="action" value="<?php echo esc_attr($form_action) ?>" />
152  <input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr($form_action) ?>" />
153  <input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
154  <input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr($post->post_type) ?>" />
155  <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr($post->post_status) ?>" />
156  <input name="referredby" type="hidden" id="referredby" value="<?php echo esc_url(stripslashes(wp_get_referer())); ?>" />
157  <?php
158  if ( 'draft' != $post->post_status )
159       wp_original_referer_field(true, 'previous');
160  
161  echo $form_extra ?>
162  
163  <div id="poststuff" class="metabox-holder<?php echo 2 == $screen_layout_columns ? ' has-right-sidebar' : ''; ?>">
164  <div id="side-info-column" class="inner-sidebar">
165  
166  <?php do_action('submitpost_box'); ?>
167  
168  <?php $side_meta_boxes = do_meta_boxes('post', 'side', $post); ?>
169  </div>
170  
171  <div id="post-body">
172  <div id="post-body-content">
173  <div id="titlediv">
174  <div id="titlewrap">
175       <label class="screen-reader-text" for="title"><?php _e('Title') ?></label>
176       <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
177  </div>
178  <div class="inside">
179  <?php
180  $sample_permalink_html = get_sample_permalink_html($post->ID);
181  if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts' ) ) ) { ?>