edit_post_{$post->post_type} WordPress Action Hook

This hook allows you to perform custom actions when a post of the specified type is edited. You can use this to update custom fields, post meta, or anything else you need to do when a post is edited.

do_action( "edit_post_{$post->post_type}", int $post_ID, WP_Post $post ) #

Fires once an existing post has been updated.


Description

The dynamic portion of the hook name, $post->post_type, refers to the post type slug.

Possible hook names include:

  • edit_post_post
  • edit_post_page

Top ↑

Parameters

$post_ID

(int)Post ID.

$post

(WP_Post)Post object.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.1.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