mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
Posts, Post Types: Add $old_status parameter to {$new_status}_{$post->post_type} action.
Follow-up to [5797], [28106], [31461]. Props aaroncampbell, audrasjb, desrosj, johnbillion, sebastianpisula, swissspidy. Fixes #36180. git-svn-id: https://develop.svn.wordpress.org/trunk@52067 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -5284,11 +5284,13 @@ function wp_transition_post_status( $new_status, $old_status, $post ) {
|
||||
* transitioned to a status, use the {@see 'transition_post_status'} hook instead.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @since 5.9.0 Added `$old_status` parameter.
|
||||
*
|
||||
* @param int $post_id Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param int $post_id Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param string $old_status Old post status.
|
||||
*/
|
||||
do_action( "{$new_status}_{$post->post_type}", $post->ID, $post );
|
||||
do_action( "{$new_status}_{$post->post_type}", $post->ID, $post, $old_status );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user