Title: private_to_published
Published: April 25, 2014
Last modified: May 20, 2026

---

# do_action_deprecated( ‘private_to_published’, int $post_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#wp--skip-link--target)

This hook has been deprecated since 2.3.0. Use {@see ‘private_to_publish’} instead.

Fires when a post’s status is transitioned from private to published.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#parameters)󠁿

 `$post_id`int

Post ID.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#source)󠁿

    ```php
    do_action_deprecated( 'private_to_published', array( $post->ID ), '2.3.0', 'private_to_publish' );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/post.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/post.php#L7948)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/post.php#L7948-L7948)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#related)󠁿

| Used by | Description | 
| [_transition_post_status()](https://developer.wordpress.org/reference/functions/_transition_post_status/)`wp-includes/post.php` |

Hook for managing future post transitions to published.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/private_to_published/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.3.0](https://developer.wordpress.org/reference/since/2.3.0/) | Deprecated. Use ['private_to_publish'](https://developer.wordpress.org/reference/hooks/private_to_publish/) instead. | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fprivate_to_published%2F)
before being able to contribute a note or feedback.