private_to_published
Deprecated since 2.3.0. It is no longer supported and may be removed in future releases. See
private_to_publish.Fires when a post's status is transitioned from private to published.
Usage
add_action( 'private_to_published', 'wp_kama_private_to_published_action', 10, 2 );
/**
* Function for `private_to_published` action-hook.
*
* @param int $post_id Post ID.
* @param $string
*
* @return void
*/
function wp_kama_private_to_published_action( $post_id, $string ){
// action...
}
- $post_id(int)
- Post ID.
- $string
- -
Changelog
| Since 1.5.0 | Introduced. |
| Deprecated since 2.3.0 | Use {@see 'private_to_publish'} instead. |
Where the hook is called
private_to_published
wp-includes/post.php 7948
do_action_deprecated( 'private_to_published', array( $post->ID ), '2.3.0', 'private_to_publish' );