Function Reference/wp publish post
Description
Publish a post by transitioning the post status.
Usage
<?php wp_publish_post( $post_id ) ?>
Parameters
- $post_id
- (integer) (required) Post ID.
- Default: None
Return Values
- (null)
-
Examples
Notes
- Uses: $wpdb
- Uses: do_action() to call the following on $post_id and $post (post data):
Change Log
Since: 2.1.0
Source File
wp_publish_post() is located in wp-includes/post.php.
Related
wp_insert_post()