WordPress.org

Forums

Post status transitions: updating the Codex (1 post)

  1. lukejanicke
    Member
    Posted 9 months ago #

    I have made some major updates to the Codex. Would someone like to double check my work? And is it reasonable to ask that in a post in this forum? I’m new-ish to WordPress development, and some of the changes relate to depreciated code that is older than my involvement with WordPress.

    The changes all involve post status transitions.

    Post Status Transitions

    Pretty major updates through here. Tried to make it clear that there are three kinds of post status transition action hooks. They are all called by the function wp_transition_post_status() in wp-includes/post.php.

    Plugin API/Action Reference/publish post

    So, in fact, this action hook was not depreciated. I added an explanation why and an example of correct usage.

    Plugin API/Action Reference/publish page

    As above except with no example.

    Plugin API/Action Reference

    I updated the existing entries and added the missing action hooks.

    • transition_post_status – Added.
    • (old status)_to_(new status) – Updated.
    • (status)_(post_type) – Added.
    • publish_post – Updated (not depreciated).
    • publish_page – Updated (not depreciated).

Reply

You must log in to post.

About this Topic