Changeset 52067 – WordPress Trac (original) (raw)

Timestamp:

11/09/2021 01:29:58 AM (4 years ago)

hellofromTonya

Message:

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.

File:

Legend:

Unmodified

Added

Removed

r52062 r52067
5285 5285 *
5286 5286 * @since 2.3.0
5287 *
5288 * @param int $post_id Post ID.
5289 * @param WP_Post $post Post object.
5287 * @since 5.9.0 Added `$old_status` parameter.
5288 *
5289 * @param int $post_id Post ID.
5290 * @param WP_Post $post Post object.
5291 * @param string $old_status Old post status.
5290 5292 */
5291 do_action( "{$new_status}_{$post->post_type}", post−>ID,post->ID, post>ID,post );
5293 do_action( "{$new_status}_{$post->post_type}", post−>ID,post->ID, post>ID,post, $old_status );
5292 5294 }
5293 5295

Note: See TracChangeset for help on using the changeset viewer.