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 |
---|---|
5653 |
|
5654 | /** |
5655 | * Fires when a post's status is transitioned from private to published. |
5656 | * |
5657 | * @since 1.5.0 |
5658 | * @deprecated 2.3.0 Use 'private_to_publish' instead. |
5659 | * |
5660 | * @param int $post_id Post ID. |
5661 | */ |
5662 | do_action('private_to_published', $post->ID); |
5663 | } |
5664 |
|
5665 | // If published posts changed clear the lastpostmodified cache. |
5666 | if ( 'publish' == $new_status || 'publish' == $old_status) { |
5667 | foreach ( array( 'server', 'gmt', 'blog' ) as $timezone ) { |
5668 | wp_cache_delete( "lastpostmodified:$timezone", 'timeinfo' ); |
5669 | wp_cache_delete( "lastpostdate:$timezone", 'timeinfo' ); |
5670 | wp_cache_delete( "lastpostdate:$timezone:{$post->post_type}", 'timeinfo' ); |
5671 | } |