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

WordPress Trac noreply at wordpress.org
Thu May 8 22:35:01 UTC 2014


#28172: edit_post() should call {un}stick_post() before calling wp_update_post()
-------------------------------+------------------------------
 Reporter:  pbiron             |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by pbiron):

 Replying to [comment:6 Denis-de-Bernardy]:
 > Or, you could simply hook into `pre_update_option_sticky_posts` and run
 a sanity check on the array that is about to get stored, and return a
 trimmed version of the array.

 there are many possible '''workarounds''', but isn't it better to fix the
 problem than to work around it?

 and hooking into `pre_update_option_sticky_posts` would not be a simple
 matter because at that point I would not have the info on the post that
 was just saved...so I'd have to do something like: check the post_date of
 the latest revision for each of the sticky posts to figure out which one
 had just been edited, etc.  And that would totally violate the
 "conceptual" goal.

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


More information about the wp-trac mailing list