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 |
---|---|
57 | require_once('admin-header.php'); |
58 |
|
59 | if ( !current_user_can('edit_page', $page_ID) ) |
60 | die ( __('You are not allowed to edit this page.') ); |
61 |
|
62 | include('edit-page-form.php'); |
63 | ?> |
64 | <div id='preview' class='wrap'> |
65 | <h2 id="preview-post"><?php _e('Page Preview (updated when page is saved)'); ?></h2> |
66 | <iframe src="<?php echo attribute_escape(apply_filters('preview_page_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe> |
67 | </div> |
68 | <?php |
69 | break; |
70 |
|
71 | case 'editattachment': |
72 | $page_id = $post_ID = (int) $_POST['post_ID']; |
73 | check_admin_referer('update-attachment_' . $page_id); |
74 |
|
75 | // Don't let these be changed |