mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-10 13:49:12 +01: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. Built from https://develop.svn.wordpress.org/trunk@42383 git-svn-id: http://core.svn.wordpress.org/trunk@42212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
24a94c55ae
commit
ea74239f90
@ -3806,7 +3806,7 @@ function wp_update_post( $postarr = array(), $wp_error = false ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $postarr['post_type'] == 'attachment' ) {
|
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 );
|
return wp_insert_post( $postarr, $wp_error );
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-42382';
|
$wp_version = '5.0-alpha-42383';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user