[wp-trac] [WordPress Trac] #30854: `wp_insert_post` doesn't save revision for new published post

WordPress Trac noreply at wordpress.org
Tue Nov 16 23:02:09 UTC 2021


#30854: `wp_insert_post` doesn't save revision for new published post
-------------------------------------------------+-------------------------
 Reporter:  JamesDiGioia                         |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.9
Component:  Revisions                            |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests has-        |     Focuses:
  testing-info needs-testing needs-dev-note      |
  commit                                         |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * keywords:  has-patch has-unit-tests has-testing-info needs-testing needs-
     dev-note =>
     has-patch has-unit-tests has-testing-info needs-testing needs-dev-note
     commit


Comment:

 @adamsilverstein Yeah, I think it's fine. I'll action the commit in the
 next few hours.

 I saw some examples of the `remove_action` on support sites but couldn't
 find anything in the plugin repo so it should be fine.

 In the dev note, let's provide a specific code example for sites that have
 moved revision saving to `wp_after_insert_post` so they can include meta
 data in revisions and avoid off-by-one errors in the rest api.

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


More information about the wp-trac mailing list