Changeset 11197 for trunk/wp-includes/post.php
- Timestamp:
- 05/05/2009 05:53:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r11125 r11197 1818 1818 * Transition the post status of a post. 1819 1819 * 1820 * Calls hooks to transition post status. If the new post status is not the same 1821 * as the previous post status, then two hooks will be ran, the first is 1822 * 'transition_post_status' with new status, old status, and post data. The 1823 * next action called is 'OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the 1820 * Calls hooks to transition post status. 1821 * 1822 * The first is 'transition_post_status' with new status, old status, and post data. 1823 * 1824 * The next action called is 'OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the 1824 1825 * $new_status parameter and the OLDSTATUS is $old_status parameter; it has the 1825 1826 * post data. 1826 1827 * 1827 * The final action will run whether or not the post statuses are the same. The 1828 * action is named 'NEWSTATUS_POSTTYPE', NEWSTATUS is from the $new_status 1828 * The final action is named 'NEWSTATUS_POSTTYPE', NEWSTATUS is from the $new_status 1829 1829 * parameter and POSTTYPE is post_type post data. 1830 1830 * … … 1836 1836 */ 1837 1837 function wp_transition_post_status($new_status, $old_status, $post) { 1838 if ( $new_status != $old_status ) { 1839 do_action('transition_post_status', $new_status, $old_status, $post); 1840 do_action("${old_status}_to_$new_status", $post); 1841 } 1838 do_action('transition_post_status', $new_status, $old_status, $post); 1839 do_action("${old_status}_to_$new_status", $post); 1842 1840 do_action("${new_status}_$post->post_type", $post->ID, $post); 1843 1841 }
Note: See TracChangeset
for help on using the changeset viewer.