[wp-trac] [WordPress Trac] #15036: Add 2nd boolean of wp_error to wp_update_post() to allow passthru to wp_insert_post()
WordPress Trac
wp-trac at lists.automattic.com
Tue Oct 5 04:51:30 UTC 2010
#15036: Add 2nd boolean of wp_error to wp_update_post() to allow passthru to
wp_insert_post()
--------------------------+-------------------------------------------------
Reporter: mikeschinkel | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Currently `wp_insert_post()` accepts `wp_error` as a second parameter; if
`true` is passed then `wp_insert_post()` is allowed to return a `WP_Error`
object, if `false` it can only return a zero (0) on failure.
`wp_update_post()` currently sets values and then delegates the work of
updating to `wp_insert_post()`. ''Unfortunately'' `wp_update_post()` does
'''''not''''' accept a second boolean parameter of `wp_error` meaning it
cannot receive back the same failure information that `wp_insert_post()`
can.
'''So this request is very simple: accept `wp_error` as an optional second
parameter for `wp_update_post()` with a default of `false` and then to
pass wp_error on through to `wp_insert_post()`.'''
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15036>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list