pre_post_update WordPress Action Hook

The pre_post_update hook is triggered before a post is updated in the database. It is passed the new post ID, the post object, and the original post ID.

do_action( 'pre_post_update', int $post_ID, array $data ) #

Fires immediately before an existing post is updated in the database.


Parameters

$post_ID

(int)Post ID.

$data

(array)Array of unslashed post data.


Top ↑

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.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More