Improve function description for `wp_transition_post_status()`.
The documentation should make it clear that the function does not modify the post object in the database, but only fires hooks related to the transition. Props AramZS. Fixes #33014. git-svn-id: https://develop.svn.wordpress.org/trunk@33296 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
51e2bc173d
commit
cddbfd2727
|
@ -4009,11 +4009,14 @@ function wp_set_post_categories( $post_ID = 0, $post_categories = array(), $appe
|
|||
}
|
||||
|
||||
/**
|
||||
* Transition the post status of a post.
|
||||
* Fires actions related to the transitioning of a post's status.
|
||||
*
|
||||
* When a post is saved, the post status is "transitioned" from one status to another,
|
||||
* though this does not always mean the status has actually changed before and after
|
||||
* the save.
|
||||
* the save. This function fires a number of action hooks related to that transition:
|
||||
* the generic 'transition_post_status' action, as well as the dynamic hooks
|
||||
* `"{$old_status}_to_{$new_status}"` and `"{$new_status}_{$post->post_type}"`. Note
|
||||
* that the function does not transition the post object in the database.
|
||||
*
|
||||
* For instance: When publishing a post for the first time, the post status may transition
|
||||
* from 'draft' – or some other status – to 'publish'. However, if a post is already
|
||||
|
|
Loading…
Reference in New Issue