WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )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.
| 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) |