[wp-trac] [WordPress Trac] #63115: wp_insert_post missing do_action for pre_post_insert

WordPress Trac noreply at wordpress.org
Mon Mar 17 09:48:39 UTC 2025


#63115: wp_insert_post missing do_action for pre_post_insert
-------------------------------+-----------------------------
 Reporter:  Hrohh              |      Owner:  (none)
     Type:  feature request    |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  6.7
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 Hi, it is possible add new action
 https://github.com/WordPress/wordpress-develop/blob/6.7/src/wp-
 includes/post.php#L4382-L5078
 to line 4792
 {{{#!php
 <?php
 do_action( 'pre_post_insert', $data );
 }}}

 like we have in update

 {{{#!php
 <?php
 do_action( 'pre_post_update', $post_id, $data );
 }}}

 It would be usefull for detection duplicate content in database for
 example. We can rewire our post_id.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63115>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list