Welcome, visitor! Log in
 

WordPress hook directory
publish_post

Warning! This hook has been renamed!

As of WP version 2.3, this hook has been renamed to {$new_status}_{$post->post_type}.

Description

Runs when a post is published, or if it is edited and its status is "published". Action function arguments: post ID.

This description was scraped automatically from the WordPress filter reference or action reference. If it looks like this is the wrong description, please tell me so I can fix my code.

WordPress version history for publish_post

This database has information for all major versions from WP 1.2.1 through 3.8.

Version File Line Type
1.2.1 wp-mail.php 129 View hook in source action
1.2.1 wp-admin/post.php 357 View hook in source action
1.2.1 wp-admin/post.php 769 View hook in source action
1.5.2 xmlrpc.php 585 View hook in source action
1.5.2 xmlrpc.php 675 View hook in source action
1.5.2 wp-admin/post.php 196 View hook in source action
1.5.2 wp-admin/post.php 435 View hook in source action
1.5.2 wp-includes/functions-post.php 62 View hook in source action
2.0 wp-includes/functions-post.php 182 View hook in source action
2.0.11 wp-includes/functions-post.php 183 View hook in source action
2.1 wp-includes/post.php 672 View hook in source action
2.2 wp-includes/post.php 672 View hook in source action
2.3 Renamed. See {$new_status}_{$post->post_type}

Related Hooks

We find related hooks using word stems. publish_post has 2 significant word stem(s): publish, post. Note that some of the hooks below may not appear in all versions of WP.