[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
Tue Mar 7 17:01:52 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             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by ironprogrammer):

 * keywords:   => reporter-feedback


Comment:

 Thank you for the the report, @zenithcity!

 Regarding the question around the `$update` parameter, the passing of
 `$update` in this manner has been around for some time
 ([https://wordpress.slack.com/archives/C03B0H5J0/p1678207719718809
 additional context]), and would likely remain for backward compatibility
 reasons.

 Are you able to provide more detail as to the console error/invalid JSON
 response? Is the `wp_insert_post` hook being used by custom code?

 > Please anyone who can remove an attachment should help me unlink the
 first added attachment (Screenshot_20230226_014746.png) from this ticket.
 I can't see the delete attachment button.
 The first attachment has been removed as requested.

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


More information about the wp-trac mailing list