WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/21/2019 06:04:55 PM (8 months ago)
Author:
SergeyBiryukov
Message:

Post Formats: Prevent Bulk Edit from unintentionally changing post format to Standard even if set to "No change".

Correct the logic in [41187].

Props birgire, mukesh27, lanche86.
Fixes #44914. See #41396.

File:
1 edited

Legend:

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

    r44574 r44670  
    611611        if ( isset( $shared_post_data['post_format'] ) ) {
    612612            set_post_format( $post_ID, $shared_post_data['post_format'] );
    613             unset( $post_data['tax_input']['post_format'] );
    614         }
     613        }
     614
     615        // Prevent wp_insert_post() from overwriting post format with the old data.
     616        unset( $post_data['tax_input']['post_format'] );
    615617
    616618        $updated[] = wp_update_post( $post_data );
Note: See TracChangeset for help on using the changeset viewer.