Revisions: Check and return errors for insertions to revisions.
Fixes #30009. Props rmccue, adamsilverstein, coreymckrill, whyisjake. Built from https://develop.svn.wordpress.org/trunk@51124 git-svn-id: http://core.svn.wordpress.org/trunk@50733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
38e4f333c0
commit
011a598fa1
|
@ -331,7 +331,7 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
|
||||||
$post = _wp_post_revision_data( $post, $autosave );
|
$post = _wp_post_revision_data( $post, $autosave );
|
||||||
$post = wp_slash( $post ); // Since data is from DB.
|
$post = wp_slash( $post ); // Since data is from DB.
|
||||||
|
|
||||||
$revision_id = wp_insert_post( $post );
|
$revision_id = wp_insert_post( $post, true );
|
||||||
if ( is_wp_error( $revision_id ) ) {
|
if ( is_wp_error( $revision_id ) ) {
|
||||||
return $revision_id;
|
return $revision_id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-alpha-51123';
|
$wp_version = '5.8-alpha-51124';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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