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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
187 | } |
188 |
|
189 | add_meta($post_ID); |
190 |
|
191 | $wpdb->query("UPDATE $wpdb->posts SET guid = '" . get_permalink($post_ID) . "' WHERE ID = '$post_ID'"); |
192 |
|
193 | do_action('save_post', $post_ID); |
194 |
|
195 | if ('publish' == $post_status) { |
196 | do_action('publish_post', $post_ID); |
197 | if ($post_pingback) |
198 | register_shutdown_function('pingback', $content, $post_ID); |
199 | register_shutdown_function('do_enclose', $content, $post_ID ); |
200 | register_shutdown_function('do_trackbacks', $post_ID); |
201 | } |
202 |
|
203 | if ($post_status == 'static') { |
204 | generate_page_rewrite_rules(); |
205 | add_post_meta($post_ID, '_wp_page_template', $_POST['page_template'], true); |
Line | Code |
426 | $wpdb->query("INSERT INTO $wpdb->post2cat (post_id, category_id) VALUES ($post_ID, $new_cat)"); |
427 | } |
428 |
|
429 | if ($prev_status != 'publish' && $post_status == 'publish') |
430 | do_action('private_to_published', $post_ID); |
431 |
|
432 | do_action('edit_post', $post_ID); |
433 |
|
434 | if ($post_status == 'publish') { |
435 | do_action('publish_post', $post_ID); |
436 | register_shutdown_function('do_trackbacks', $post_ID); |
437 | register_shutdown_function('do_enclose', $content, $post_ID ); |
438 | if ( get_option('default_pingback_flag') ) |
439 | register_shutdown_function('pingback', $content, $post_ID); |
440 | } |
441 |
|
442 | if ($post_status == 'static') { |
443 | generate_page_rewrite_rules(); |
444 |
|