WordPress.org

Make WordPress Core

Ticket #39032: 39032.diff

File 39032.diff, 449 bytes (added by georgestephanis, 5 years ago)
  • src/wp-includes/theme.php

     
    17861786                $r = wp_update_post( wp_slash( $post_data ), true );
    17871787        } else {
    17881788                $r = wp_insert_post( wp_slash( $post_data ), true );
     1789                wp_update_post( $r ); // Trigger creation of a revision. See #30854
    17891790        }
    17901791
    17911792        if ( $r instanceof WP_Error ) {