WordPress action hook · part of WordPress core
post_updated
A WordPress core action that 17 plugins also fire themselves, running on 23K+ sites between them.
“This action is documented in wp-includes/post.php”
How to use post_updated
It's an action: your callback runs at that point and receives 3 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'post_updated', function( $post_id, $post, $post2 ) {
// Your code runs here.
}, 10, 3 );Argument names come from Royal MCP's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
17 plugins that fire post_updated
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Royal MCP10,000+ installs
do_action( 'post_updated', $post_id, $post, $post )includes/MCP/Support/Post_Write_Hooks.php:56 -
404 Solution: Redirection and Page Suggestions10,000+ installs
do_action( 'post_updated', (int)$before->ID, $after, $before )includes/services/WordPressPostMutationNotifications.php:103 -
Seamless Donations is Sunset2,000+ installs
do_action( 'post_updated', $post_ID, $post_after, $post_before )inc/utilities.php:1763 -
Greek Multi Tool1,000+ installs
do_action( 'post_updated', $post_id, $after, $before )includes/class-grmlt-converter.php:828 -
MEGA AI200+ installs
do_action( 'post_updated', $post_id, $post_after, $post_before )mega.php:8892 -
ContentGecko Connector60+ installs
do_action( 'post_updated', $post_id, $post, $post )includes/services/class-cg-post-service.php:829 -
Post ID Optimizer10+ installs
do_action( 'post_updated', $post_ID, $post_after, $post_before )post-poidopt.php:3931 -
Dynamic Functionalities10+ installs
do_action( 'post_updated', $post_id, $after, $post )includes/features/class-link-health-editor.php:238 -
ProRank SEO10+ installs
do_action( 'post_updated', $id, $after, $before )includes/Core/Content/PostContentWriter.php:76 -
PerfLocaleFewer than 10 installs
do_action( 'post_updated', $post_id, $after, $post )src/Translation/PostSlugCheck.php:139 -
Promo RevertFewer than 10 installs
do_action( 'post_updated', $page_id, $after, $before )includes/class-campaigns.php:856 -
CatalogFAQFewer than 10 installs
do_action( 'post_updated', $id, $updated, $post )src/Core.php:407 -
ZeopilotFewer than 10 installs
do_action( 'post_updated', $id, $post, $before )conditional-content.php:194 -
MATUQO Media ImporterFewer than 10 installs
do_action( 'post_updated', $id, $new, $old )includes/import.php:238 -
WingPilotFewer than 10 installs
do_action( 'post_updated', $post_id, $post, $post )includes/class-cache-purger.php:64 -
show.fm Podcast PlayerFewer than 10 installs
do_action( 'post_updated', $post->ID, $updated, $post )includes/class-migration-swap.php:163 -
IPS Order Media CleanupFewer than 10 installs
do_action( 'post_updated', $object_id, $post, $old )includes/classes/Media/Recovery/ReferenceJournal.php:63
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.