[wp-trac] [WordPress Trac] #28172: edit_post() should call {un}stick_post() before calling wp_update_post()

WordPress Trac noreply at wordpress.org
Thu Jan 26 17:48:29 UTC 2023


#28172: edit_post() should call {un}stick_post() before calling wp_update_post()
-------------------------------------------------+-------------------------
 Reporter:  pbiron                               |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Posts, Post Types                    |     Version:  4.0
 Severity:  normal                               |  Resolution:
 Keywords:  needs-unit-tests has-patch changes-  |     Focuses:
  requested                                      |
-------------------------------------------------+-------------------------

Comment (by pbiron):

 Replying to [comment:14 desrosj]:
 > I am thinking that a better solution here may be to add support for a
 new argument within `$postarr` for `wp_{insert|update}_post()` (maybe
 `is_sticky`?) that indicates if a post should be updated to be sticky or
 not.
 >
 > This would simplify this a lot and make it easier to filter the intended
 sticky state going forward.

 That's an interesting idea @desrosj.

 This ticket is so old I forget many of the particulars of what I was
 encountering when I first opened it.  But one thing I do remember was that
 it was hard to come up with a fix that maintained BC behavior.  So, as
 @SergeyBiryukov
 [https://wordpress.slack.com/archives/C02RQBWTW/p1674745936339779
 indicated in today's bug scrub] some unit tests will be very important.

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


More information about the wp-trac mailing list