WordPress.org

Make WordPress Core

Ticket #41396: 41396.diff

File 41396.diff, 809 bytes (added by Chouby, 3 years ago)
  • src/wp-admin/includes/post.php

     
    545545                        unset( $post_data['tax_input']['category'] );
    546546                }
    547547
     548                if ( isset( $post_data['post_format'] ) ) {
     549                        set_post_format( $post_ID, $post_data['post_format'] );
     550                }
     551
    548552                $post_data['post_type'] = $post->post_type;
    549553                $post_data['post_mime_type'] = $post->post_mime_type;
    550554                $post_data['guid'] = $post->guid;
     
    572576                        else
    573577                                unstick_post( $post_ID );
    574578                }
    575 
    576                 if ( isset( $post_data['post_format'] ) )
    577                         set_post_format( $post_ID, $post_data['post_format'] );
    578579        }
    579580
    580581        return array( 'updated' => $updated, 'skipped' => $skipped, 'locked' => $locked );