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
67
68 <div id="poststuff">
69
70 <div class="submitbox" id="submitpage">
71
72 <div id="previewview">
73 <?php if ( 'publish' == $post->post_status ) { ?>
74 <a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank"  tabindex="4"><?php _e('View this Page'); ?></a>
75 <?php } elseif ( 'edit' == $action ) { ?>
76 <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>
77 <?php } ?>
78 </div>
79
80 <div class="inside">
81 <p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
82 <p>
83 <select name='post_status' tabindex='4' id='post_status'>
84 <?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages')
85 // 'publish' option will be selected for published AND private posts (checkbox overrides dropdown)