Make WordPress Core


Ignore:
Timestamp:
06/08/2021 11:23:12 PM (3 years ago)
Author:
whyisjake
Message:

Revisions: Check and return errors for insertions to revisions.

Fixes #30009.

Props rmccue, adamsilverstein, coreymckrill, whyisjake.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/revision.php

    r50949 r51124  
    332332    $post = wp_slash( $post ); // Since data is from DB.
    333333
    334     $revision_id = wp_insert_post( $post );
     334    $revision_id = wp_insert_post( $post, true );
    335335    if ( is_wp_error( $revision_id ) ) {
    336336        return $revision_id;
Note: See TracChangeset for help on using the changeset viewer.