[wp-trac] [WordPress Trac] #57810: Should wp_insert_post() function call 'wp_insert_post' action with 'update' equals true after creating post for the first time.

WordPress Trac noreply at wordpress.org
Sun Feb 26 00:55:07 UTC 2023


#57810: Should wp_insert_post() function call 'wp_insert_post' action with 'update'
equals true after creating post for the first time.
-------------------------------+-----------------------------
 Reporter:  zenithcity         |      Owner:  (none)
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  6.1.1
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 The wp_insert_post() function calls 'wp_insert_post' action hook with
 'update' equals true when creating post for the first time.

 Post was created using the Gutenberg editor.

 /* $update should only be true when updating post */
 `do_action( 'wp_insert_post', $post_ID, $post, $update );`

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


More information about the wp-trac mailing list