[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 15:07:13 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 Denis-de-Bernardy):
At a conceptual level, side effects like this belong after (or on, or
immediately before) the save_post hook, not before it. Consider filtering
the option's value instead. There's a hook for that in get_option().
(Don't forget to cache the result using e.g. A transient that gets deleted
on save_post. That way, your plugin won't leave side-effects when
disabled.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28172#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list