apply_filters( 'wp_insert_post_data', array $data , array $postarr , array $unsanitized_postarr , bool $update )
Filters slashed post data just before it is inserted into the database.
Parameters
- $data
-
An array of slashed, sanitized, and processed post data.
- $postarr
-
An array of sanitized (and slashed) but otherwise unmodified post data.
- $unsanitized_postarr
-
An array of slashed yet *unsanitized* and unprocessed post data as originally passed to wp_insert_post().
- $update
-
Whether this is an existing post being updated.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
6.0.0 | The $update parameter was added. |
5.4.1 | The $unsanitized_postarr parameter was added. |
2.7.0 | Introduced. |