mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Posts: When using wp_update_post() on a attachment post_type item, pass the $wp_error parameter through to wp_insert_attachment().
Props MyThemeShop. Fixes #41513. git-svn-id: https://develop.svn.wordpress.org/trunk@42383 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a7488c9441
commit
9fed02f896
@ -3806,7 +3806,7 @@ function wp_update_post( $postarr = array(), $wp_error = false ) {
|
||||
}
|
||||
|
||||
if ( $postarr['post_type'] == 'attachment' ) {
|
||||
return wp_insert_attachment( $postarr );
|
||||
return wp_insert_attachment( $postarr, false, 0, $wp_error );
|
||||
}
|
||||
|
||||
return wp_insert_post( $postarr, $wp_error );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user