[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 15:32:11 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 |
-------------------------------------------------+-------------------------
Changes (by desrosj):
* keywords: needs-unit-tests has-patch => needs-unit-tests has-patch
changes-requested
Comment:
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28172#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list