WordPress action hook · part of WordPress core
edit_post
A WordPress core action that 22 plugins also fire themselves, running on 1.3M+ sites between them.
“This action is documented in wp-includes/post.php”
How to use edit_post
It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'edit_post', function( $ID, $post ) {
// Your code runs here.
}, 10, 2 );Argument names come from Page Builder by SiteOrigin'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 →
22 plugins that fire edit_post
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Smart Slider 3800,000+ installs
do_action( 'edit_post', $postID, $post )Nextend/SmartSlider3/Application/Helper/HelperSliderChanged.php:104 -
Page Builder by SiteOrigin400,000+ installs
do_action( 'edit_post', $post->ID, $post )inc/admin.php:1277 -
BEAR30,000+ installs
do_action( 'edit_post', $product_id, $pp )classes/models/products.php:858 -
Editorial Calendar20,000+ installs
do_action( 'edit_post', $edcal_postid, $post )edcal.php:1354 -
Bulky10,000+ installs
do_action( 'edit_post', $product_id, $pp )admin/ajax.php:416 -
Admin Management Xtended5,000+ installs
do_action( 'edit_post', $postid, $post )admin-management-xtended.php:178 -
WOLF4,000+ installs
do_action( 'edit_post', $post_id, $pp )classes/models/posts.php:372 -
Seamless Donations is Sunset2,000+ installs
do_action( 'edit_post', $post_ID, $post )inc/utilities.php:1749 -
BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor1,000+ installs
do_action( 'edit_post', $saved_id, $post_obj )front-end/products/brikpanel-product-editor.php:10708 -
Expiring Posts1,000+ installs
do_action( 'edit_post', $post->ID, $post )expiring-posts.php:410 -
Syndication Links400+ installs
do_action( 'edit_post', $post_id, $post )includes/webmentions/class-synprovider-webmention.php:103 -
WordLift300+ installs
do_action( 'edit_post', $post->ID, $post )admin/wordlift-admin-save-post.php:98 -
MEGA AI200+ installs
do_action( 'edit_post', $post_id, $post_after )mega.php:8891 -
Live Blogging100+ installs
do_action( 'edit_post', $parent_post_id, $parent_post )live-blogging.php:821 -
ContentGecko Connector60+ installs
do_action( 'edit_post', $post_id, $post )includes/services/class-cg-post-service.php:824 -
Live Blogging Plus50+ installs
do_action( 'edit_post', $parent_post_id, $parent_post )live-blogging-plus.php:827 -
Depublish Posts30+ installs
do_action( 'edit_post', $post->ID, $post )src/Post.php:87 -
Post ID Optimizer10+ installs
do_action( 'edit_post', $post_ID, $post )post-poidopt.php:3918 -
Dynamic Functionalities10+ installs
do_action( 'edit_post', $post_id, $after )includes/features/class-link-health-editor.php:237 -
CRAI Content UpdaterFewer than 10 installs
do_action( 'edit_post', $original_id, $updated_post )includes/class-crai-updater.php:1366 -
Sidcraft Page Builder w/ AI MCPFewer than 10 installs
do_action( 'edit_post', $post_id, $post )includes/compatibility/class-cache.php:41 -
PerfLocaleFewer than 10 installs
do_action( 'edit_post', $post_id, $after )src/Translation/PostSlugCheck.php:135
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.