On this page
do_action( 'pre_post_update', int $post_ID, array $data )
Fires immediately before an existing post is updated in the database.
Parameters
$post_IDint-
Post ID.
$dataarray-
Array of unslashed post data.
More Information
The hook is called just before $wpdb::update(), only on updates (not creates).
This might be useful for editing the contents of $wpdb->posts before the content is updated to the DB.
Source
File: wp-includes/post.php. View all references
do_action( 'pre_post_update', $post_ID, $data );
Related
Used By
| Used By | Description |
|---|---|
| wp_insert_post() wp-includes/post.php | Inserts or update a post. |
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_post_update