Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: preview_post_link

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.

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
75      
76      if ($post->post_status == 'static')
77           include('edit-page-form.php');
78      else
79           include('edit-form-advanced.php');
80
81      ?>
82      <div id='preview' class='wrap'>
83      <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?> <small class="quickjump"><a href="#write-post"><?php _e('edit &uarr;'); ?></a></small></h2>
84           <iframe src="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
85      </div>
86      <?php
87      break;
88
89 case 'editattachment':
90      $post_id = (int) $_POST['post_ID'];
91
92      check_admin_referer('update-attachment_' . $post_id);
93