Make WordPress Core

Ticket #33014: post.php.patch

File post.php.patch, 1.0 KB (added by AramZS, 10 years ago)

Patch to update the documentation of wp_transition_post_status to make it clearer what the function actually does.

  • post.php

     
    40094009}
    40104010
    40114011/**
    4012  * Transition the post status of a post.
     4012 * Perform action hooks that occur just before the transition the post status of a post.
    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 only fires do_action hooks, it does not actually transition
     4017 * the post.
    40174018 *
    40184019 * For instance: When publishing a post for the first time, the post status may transition
    40194020 * from 'draft' – or some other status – to 'publish'. However, if a post is already
     
    40224023 *
    40234024 * @since 2.3.0
    40244025 *
    4025  * @param string  $new_status Transition to this post status.
     4026 * @param string  $new_status Transitioning to this post status.
    40264027 * @param string  $old_status Previous post status.
    40274028 * @param WP_Post $post Post data.
    40284029 */