diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index d6b6bc6649..2f1d8425f2 100644
a
|
b
|
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4376 | 4376 | * @param bool $add_trashed_suffix Whether to attempt to add the suffix. |
4377 | 4377 | * @param string $post_name The name of the post being updated. |
4378 | 4378 | * @param int $post_id Post ID. |
| 4379 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4379 | 4380 | */ |
4380 | | $add_trashed_suffix = apply_filters( 'add_trashed_suffix_to_trashed_posts', true, $post_name, $post_id ); |
| 4381 | $add_trashed_suffix = apply_filters( 'add_trashed_suffix_to_trashed_posts', true, $post_name, $post_id, $postarr ); |
4381 | 4382 | |
4382 | 4383 | if ( $add_trashed_suffix ) { |
4383 | 4384 | wp_add_trashed_suffix_to_post_name_for_trashed_posts( $post_name, $post_id ); |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4474 | 4475 | * |
4475 | 4476 | * @param int $post_id Post ID. |
4476 | 4477 | * @param array $data Array of unslashed post data. |
| 4478 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4477 | 4479 | */ |
4478 | | do_action( 'pre_post_update', $post_id, $data ); |
| 4480 | do_action( 'pre_post_update', $post_id, $data, $postarr ); |
4479 | 4481 | |
4480 | 4482 | if ( false === $wpdb->update( $wpdb->posts, $data, $where ) ) { |
4481 | 4483 | if ( $wp_error ) { |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4658 | 4660 | * @since 2.0.0 |
4659 | 4661 | * |
4660 | 4662 | * @param int $post_id Attachment ID. |
| 4663 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4661 | 4664 | */ |
4662 | | do_action( 'edit_attachment', $post_id ); |
| 4665 | do_action( 'edit_attachment', $post_id, $postarr ); |
4663 | 4666 | |
4664 | 4667 | $post_after = get_post( $post_id ); |
4665 | 4668 | |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4671 | 4674 | * @param int $post_id Post ID. |
4672 | 4675 | * @param WP_Post $post_after Post object following the update. |
4673 | 4676 | * @param WP_Post $post_before Post object before the update. |
| 4677 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4674 | 4678 | */ |
4675 | | do_action( 'attachment_updated', $post_id, $post_after, $post_before ); |
| 4679 | do_action( 'attachment_updated', $post_id, $post_after, $post_before, $postarr ); |
4676 | 4680 | } else { |
4677 | 4681 | |
4678 | 4682 | /** |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4681 | 4685 | * @since 2.0.0 |
4682 | 4686 | * |
4683 | 4687 | * @param int $post_id Attachment ID. |
| 4688 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4684 | 4689 | */ |
4685 | | do_action( 'add_attachment', $post_id ); |
| 4690 | do_action( 'add_attachment', $post_id, $postarr ); |
4686 | 4691 | } |
4687 | 4692 | |
4688 | 4693 | return $post_id; |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4704 | 4709 | * |
4705 | 4710 | * @param int $post_id Post ID. |
4706 | 4711 | * @param WP_Post $post Post object. |
| 4712 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4707 | 4713 | */ |
4708 | | do_action( "edit_post_{$post->post_type}", $post_id, $post ); |
| 4714 | do_action( "edit_post_{$post->post_type}", $post_id, $post, $postarr ); |
4709 | 4715 | |
4710 | 4716 | /** |
4711 | 4717 | * Fires once an existing post has been updated. |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4714 | 4720 | * |
4715 | 4721 | * @param int $post_id Post ID. |
4716 | 4722 | * @param WP_Post $post Post object. |
| 4723 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4717 | 4724 | */ |
4718 | | do_action( 'edit_post', $post_id, $post ); |
| 4725 | do_action( 'edit_post', $post_id, $post, $postarr ); |
4719 | 4726 | |
4720 | 4727 | $post_after = get_post( $post_id ); |
4721 | 4728 | |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4727 | 4734 | * @param int $post_id Post ID. |
4728 | 4735 | * @param WP_Post $post_after Post object following the update. |
4729 | 4736 | * @param WP_Post $post_before Post object before the update. |
| 4737 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4730 | 4738 | */ |
4731 | | do_action( 'post_updated', $post_id, $post_after, $post_before ); |
| 4739 | do_action( 'post_updated', $post_id, $post_after, $post_before, $postarr ); |
4732 | 4740 | } |
4733 | 4741 | |
4734 | 4742 | /** |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4747 | 4755 | * @param int $post_id Post ID. |
4748 | 4756 | * @param WP_Post $post Post object. |
4749 | 4757 | * @param bool $update Whether this is an existing post being updated. |
| 4758 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4750 | 4759 | */ |
4751 | | do_action( "save_post_{$post->post_type}", $post_id, $post, $update ); |
| 4760 | do_action( "save_post_{$post->post_type}", $post_id, $post, $update, $postarr ); |
4752 | 4761 | |
4753 | 4762 | /** |
4754 | 4763 | * Fires once a post has been saved. |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4758 | 4767 | * @param int $post_id Post ID. |
4759 | 4768 | * @param WP_Post $post Post object. |
4760 | 4769 | * @param bool $update Whether this is an existing post being updated. |
| 4770 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4761 | 4771 | */ |
4762 | | do_action( 'save_post', $post_id, $post, $update ); |
| 4772 | do_action( 'save_post', $post_id, $post, $update, $postarr ); |
4763 | 4773 | |
4764 | 4774 | /** |
4765 | 4775 | * Fires once a post has been saved. |
… |
… |
function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true ) |
4769 | 4779 | * @param int $post_id Post ID. |
4770 | 4780 | * @param WP_Post $post Post object. |
4771 | 4781 | * @param bool $update Whether this is an existing post being updated. |
| 4782 | * @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data. |
4772 | 4783 | */ |
4773 | | do_action( 'wp_insert_post', $post_id, $post, $update ); |
| 4784 | do_action( 'wp_insert_post', $post_id, $post, $update, $postarr ); |
4774 | 4785 | |
4775 | 4786 | if ( $fire_after_hooks ) { |
4776 | 4787 | wp_after_insert_post( $post, $update, $post_before ); |