[wp-trac] [WordPress Trac] #18833: Pass raw data into save_post/wp_insert_post
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 1 13:44:14 UTC 2011
#18833: Pass raw data into save_post/wp_insert_post
----------------------------+------------------------------
Reporter: rmccue | Owner: rmccue
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+------------------------------
Comment (by rmccue):
Replying to [comment:2 scribu]:
> Interesting suggestion. I think we should deprecate one of those filters
by passing the $postarr arg to only one of them.
I agree (although, I left the patch with both), and I'd say `save_post` is
the most appropriate, given that it is consistent with the `edit_post`
filter also used in the function.
Replying to [comment:3 sirzooro]:
> BTW, metaboxes needs to check its own nonces (or something similar)
because `wp_insert_post()` is called from many contexts, and many of them
does not include metaboxes at all (e.g. quickedit).
Instead of checking for a nonce, it can simply check for the values it
actually uses (i.e. `if (empty($postarr['myplugin_value'])) return;` )
which is what functions should be doing anyway.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18833#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list