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 |
---|---|
656 |
|
657 | // Set GUID |
658 | if ( ! $update ) |
659 | $wpdb->query("UPDATE $wpdb->posts SET guid = '" . get_permalink($post_ID) . "' WHERE ID = '$post_ID'"); |
660 |
|
661 | if ( $update) { |
662 | if ($previous_status != 'publish' && $post_status == 'publish') { |
663 | // Reset GUID if transitioning to publish. |
664 | $wpdb->query("UPDATE $wpdb->posts SET guid = '" . get_permalink($post_ID) . "' WHERE ID = '$post_ID'"); |
665 | do_action('private_to_published', $post_ID); |
666 | } |
667 |
|
668 | do_action('edit_post', $post_ID); |
669 | } |
670 |
|
671 | if ($post_status == 'publish' && $post_type == 'post') { |
672 | do_action('publish_post', $post_ID); |
673 | if ( defined('XMLRPC_REQUEST') ) |
674 | do_action('xmlrpc_publish_post', $post_ID); |