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
57
58 <div id="poststuff">
59
60 <div class="submitbox" id="submitpage">
61
62 <div id="previewview">
63 <?php if ( 'publish' == $post->post_status ) { ?>
64 <a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank"  tabindex="4"><?php _e('View this Page'); ?></a>
65 <?php } elseif ( 'edit' == $action ) { ?>
66 <a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Page'); ?></a>
67 <?php } ?>
68 </div>
69
70 <div class="inside">
71
72 <p><strong><?php _e('Publish Status') ?></strong></p>
73 <p>
74 <select name='post_status' tabindex='4'>
75 <?php if ( current_user_can('publish_posts') ) : ?>