[wp-trac] [WordPress Trac] #34706: Introduce an edit_post_{$post->post_type} action
WordPress Trac
noreply at wordpress.org
Tue Nov 17 00:03:27 UTC 2015
#34706: Introduce an edit_post_{$post->post_type} action
-------------------------------+-----------------------------
Reporter: garrett-eclipse | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
Hello,
I was in the post.php file and found all the action hooks for when a post
is saved. Noticed there's a new save_post_{$post->post_type} hook as of
3.7.0 and thought it would be nice to have similar done for edit_post so
can tie into CPT directly with the filter.
Would look something like;
{{{#!php
<?php
/**
* Fires once an existing post has been updated.
*
* The dynamic portion of the hook name, `$post->post_type`,
refers to
* the post type slug.
*
* @since 3.7.0
*
* @param int $post_ID Post ID.
* @param WP_Post $post Post object.
*/
do_action( "edit_post_{$post->post_type}", $post_ID, $post );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34706>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list