WordPress.org

Make WordPress Core

Changeset 33296


Ignore:
Timestamp:
07/16/2015 02:34:42 PM (5 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r33262 r33296  
    40104010
    40114011/**
    4012  * Transition the post status of a post.
     4012 * Fires actions related to the transitioning of a post's status.
    40134013 *
    40144014 * When a post is saved, the post status is "transitioned" from one status to another,
    40154015 * though this does not always mean the status has actually changed before and after
    4016  * the save.
     4016 * the save. This function fires a number of action hooks related to that transition:
     4017 * the generic 'transition_post_status' action, as well as the dynamic hooks
     4018 * `"{$old_status}_to_{$new_status}"` and `"{$new_status}_{$post->post_type}"`. Note
     4019 * that the function does not transition the post object in the database.
    40174020 *
    40184021 * For instance: When publishing a post for the first time, the post status may transition
Note: See TracChangeset for help on using the changeset viewer.