Make WordPress Core

Ticket #36181: 36181.patch

File 36181.patch, 911 bytes (added by sebastian.pisula, 6 years ago)
  • wp-includes/post.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    34403440                }
    34413441        }
    34423442
    3443         if ( 'attachment' !== $postarr['post_type'] ) {
    3444                 wp_transition_post_status( $data['post_status'], $previous_status, $post );
    3445         } else {
     3443        if ( 'attachment' === $postarr['post_type'] ) {
    34463444                if ( $update ) {
    34473445                        /**
    34483446                         * Fires once an existing attachment has been updated.
     
    35383536         * @param bool    $update  Whether this is an existing post being updated or not.
    35393537         */
    35403538        do_action( 'wp_insert_post', $post_ID, $post, $update );
     3539
     3540        wp_transition_post_status( $data['post_status'], $previous_status, $post );
    35413541
    35423542        return $post_ID;
    35433543}